I have the same sensor. It doesn't report valid humidity, not sure about the other fields. The PM2.5 isn't updated but added as duplicate with every refresh in the "current states" section.
You do not get any duplicates on VOC or Formaldehyde? That might have made it "easier" to figure out because those two (and PM2.5) are added attributes while the other things like temperature, humidity, and CO2 are capabilities. Otherwise the field gets processed just like all the rest.
As for the Humidity... I looked at the logs you put in the Pastebin and found one instance of it listed... -21845 (-2184.5%). Crazy. If you spot any more of those can you let me know? Maybe there is something Tuya is doing with the data to represent it otherwise. But all the other humidity values are fairly consistent (ie: worthless at <1%).
The logs also show the device is spamming the system just as bad as the original one I worked with. There are many cases where it is sending back the same value multiple times per second.
Hello,
I ordered these Tuya sensors a few days back.. and installed this driver.. it works great ..except for the two things mentioned as well.
(1) a row for PM2.5 just gets added everytime ... on and on until I remain on the device page .. All other attributes get their values updated.. not a new row ...
I edited the driver.. and changed the attribute name from "PM2.5" to Just "ParticulateMatter"
and the issue of extra "PM2.5" rows went away.
would it be possible for you to update the driver to rename the attribute from PM2.5 to something just textual.. that solved the issue for me.
(2) the humidity walues are < 10% .. ( and many times -2184.5 ) I have ordered simple Humidity sensors to keep next to them and try to see if there is any correlation between actual humidity and the numbers reported by the Tuya device.
I also have a Airthings wave device .. I am going to move that from its original location.. to next to the Tuya.. that should help me "calibrate" it for CO2, VOC, Temperature and humidity as well..
will report back on the other sensors..
Doing Further comparison with airthings..
my preliminary findings are ...
the Cluster numbers seems to have changed for the 6-in-1 sensor.. (as compared to the one in the driver version 0.1.5 ..
this is my device
So far I have been able to confirm by keeping the airthings wave plus and tuya side by side..
"02" is Particulate Matter 2.5 (90% confident, waiting for more varied data points, airthings and tuya are different by only 5-10 ug/m3)
"16" is Humidity (90% confident, waiting for more varied data points)
"12" is Temperature (100% confidence, readings within 0.1 deg)
"13" is CO2 (100% confidence, but probably needs calibration, I breathed out on the sensor and that number changed along with airthings)
"15" is VOC ( Not sure yet )
"14" is formaldyhyde ( No way to confirm or deny )
Those cluster numbers are VERY different from the previous ones (including my own device that I based this on). I think it would need a substantial rework if it gets identified as that.
I used PM2.5 because that is what most people are used to. The added lines only occur if you leave the device page open. Refreshing it, they disappear (but new ones will appear on the page) and it does not affect Rules or the Dashboard, they will always have the latest value. But, this might be a clue on why this happens with some attributes...
The original formaldehyde was confirmed as #15 on mine, I bought a bottle to try it out with. Of course now I have a bottle I never intend to use again...
I will look into trying to update this... but it likely will be a few days.
yeah.. I temporarily updated the driver with the above mentioned cluster numbers.. will leave it on on a dev c-7.. rather than spamming my main hub
will keep it going for a couple of days and probably chart them to verify my findings and report back
Just after 1 night of getting my dev hub spammed non-stop.. I have decided to return the tuya sensor..
Although, CO2, VOC, Humidity and Temperature were ok-ok close to the readings on my airthings wave plus .. the hub spamming did it for me.. I cannot have my main hub spammed so much..
@snell thanks for your driver.. helped with setting the device up on hubitat.
Yeah, these devices are BRUTAL with the spamming and there is still no way I have seen to slow/disable them outside Tuya's "hidden" methods. I am told you can with their hub/app, but it is not via any standard ZigBee method.
Mine is left unplugged most of the time as a result.
So after a bit of investigation this morning I submitted a Feature Request asking that attributes with periods in them (and at the end of them) be handled properly by device pages. This may not be the ONLY character that gets the duplication problem but I could replicate it with a period every time (I had never seen the "attribute does not SHOW" problem before testing though since I have never ended an attribute with a period).
I am looking to clean up the Tuya Air Sensor stuff for the 6-in-1 (the one @nrm94ee330 pointed out the changes Tuya made) today.
A ModelType preference has been added to the device Preferences fields. It defaults to "Tuya ZigBee Air Sensor". There are also "Tuya ZigBee 5-in-1 Sensor" (which is basically a renamed duplicate of the Air Sensor) and the "Tuya ZigBee 6-in-1 Sensor". The 6-in-1 adds the PM2.5. So what happens now is that if you select the 6-in-1 and Save Preferences you will now also get the PM2.5 Offset preference. Further, when it is handling the Tuya clusters it will change the method to match what @nrm94ee330 pointed out about the cluster values. This should minimize the disruption to existing Air or 5-in-1 users (and removes the extra PM2.5 Offset they had to see) while handling the changed cluster information of the 6-in-1.
Note(s)
At this time I am not going to change the name of the PM2.5. While it is odd that the device page will show duplicate values (with the latest at the bottom) this is just a visual "glitch" of the attribute having a period in the name. The values are correctly in the overall events (the most recent value is used) so it does not impact Rules or anything else. Refreshing the device's page or reopening it will show the latest values. Since I have raised it for Hubitat to look into, maybe it will get resolved there... maybe it will just be something to continue to live with. But I think more people recognize PM2.5 than if I change it to something else. Even PM2_5 would make it "weird" compared to my numerous weather drivers that have it normally.
Would it be an option to link some verified devices with this driver?
I mean, some links to devices and where they are sold to make it a bit easier to decide on what to buy where and limit the “whoops that wont work with this driver” chances a bit.
5-in-1 Air Quality Monitor, Smart CO2 Detector, WiFi Smart Air Quality Monitor High Accurate Sensor, Carbon Dioxide Detector CO2 Monitor, Temperature Humidity Digital CO2 Meter for Indoor Home(ZigBee) https://a.co/d/2bcGcsQ
It would... if they did not keep changing all the time. I do not even think the one I made this driver for is sold anymore. I have been adding support for other devices as people let me know about them. But so far, nobody can REALLY recommend any of these once they have had them for a bit because none of them are that good...
Certainly the one @plantucha linked to is one that I have never seen before. The MODEL might be the same and maybe some of the functionality could be the same. There have certainly been some changes because at least from the picture (besides the housing) the USB power connector is different.
@plantucha, did anything show up with Trace logging enabled? Has any data started reporting from it at all?
That really does not make sense. At the very least when you Save Preferences for my driver it should log "Saved preferences." as an info logging.
As I mentioned, that error is from the Device driver, not mine.
If you are willing to try something, can you uncomment line 65 of the driver so that the command "ReadDevice" becomes available? Then run that command and check the log? It does not do much of use, it is just meant to query a ZigBee device for some Basic cluster information. That response should come back in the log (if this device is doing anything at all).