-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuya Smart Air Box #4990
Comments
Hello, have you a linux machine will full OS to test code modification ?
|
Hello! Thank you very much for your fast response! At the moment, deconz is running on raspberry with a RaspBee1. If I can be of any help testing changes there, I gladly will! Here are a few recent debug lines: |
Thx, good, it realy seem classic, and you have a linux machine with full OS. This device realy look "standard". It will be easy to add but big problem, it realy spam the network .... |
It seems, that it is already supported in Zigbee2MQTT: Can you suggest a starting point for me to read and learn how to work out the necessary changes for this device to work? I am somehow hoping to just clone the code for another device and copy/paste the new identifiers, could this work? |
Sure, so you need a linux machine with full OS to compile the code You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only
You can use log to add features
Values in black are the values used I have started something Smanar@ec4e1cf
Tell me if you need more help. |
Hu ?
Yep was only for the siren, can compare with your, and remove it if you don't need it (but the siren need it)
Right, so you can't use old one, I think you need to create a new one. Temperature seem working.
Have updated the code a little, but need to re-include it to remove the ZHACarbonMonoxide and add the ZHAairquality
|
About the phantom devices: I am not 100% sure, but I havent seen them before and they (randomly) pop up as I pair the Tuya Smart Air Box. Can it be, that the missing values (I do only see 3 sets of data in the logs, whereas there should be data for temp, hum, co2, voc and formald) are somehow transmitted via different MACs? About your new commit: I have to admit that coding on this project (more than just bringing your commits to compile and test them) is way beyond my skills, so I will need to hope for your experience and patience to bring this up and running. Current situation: One possibly quite dumb question: Regarding VOC: REST: 62: {
"config": {
"offset": 0,
"on": true,
"reachable": true
},
"ep": 1,
"etag": "a8a52d11efbd14efa3149a55dca43351",
"lastseen": "2021-06-10T16:15Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "Temperature 62",
"state": {
"lastupdated": "2021-06-10T16:18:10.045",
"temperature": 2550
},
"type": "ZHATemperature",
"uniqueid": "cc:86:ec:ff:fe:62:65:e6-01-0402"
},
63: {
"config": {
"offset": 0,
"on": true,
"reachable": false
},
"ep": 1,
"etag": "8b4c157237ed09aadb15446f4f3c7435",
"lastseen": "2021-06-10T16:15Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "Humidity 63",
"state": {
"humidity": null,
"lastupdated": "2021-06-10T16:18:13.897"
},
"type": "ZHAHumidity",
"uniqueid": "cc:86:ec:ff:fe:62:65:e6-01-0405"
},
64: {
"config": {
"enrolled": 0,
"on": true,
"pending": [],
"reachable": false
},
"ep": 1,
"etag": "0294df102f192658d4a677d0edd8e1a2",
"lastseen": "2021-06-10T16:15Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "Alarm 64",
"state": {
"alarm": false,
"lastupdated": "none",
"lowbattery": false,
"tampered": false
},
"type": "ZHAAlarm",
"uniqueid": "cc:86:ec:ff:fe:62:65:e6-01-0500"
},
65: {
"config": {
"on": true,
"reachable": true
},
"ep": 1,
"etag": "5e6186c51dd9a23f8f5f00594bd53596",
"lastseen": "2021-06-10T16:15Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "AirQuality 65",
"state": {
"lastupdated": "none"
},
"type": "ZHAAirQuality",
"uniqueid": "cc:86:ec:ff:fe:62:65:e6-01"
} Here are the current logs to compare the values once again, grouped by data id:
|
I don't think, it s one MAC address for one device.
Lol, I think it will be faster if you try yourself, you have the method, the device, and probably more time than me. I m agree I know better than you how work deconz, but lot of work can be done just with copy/paste and mimic code.
None ^^.
Have improved the code a little for air quality, but I realy don't know VOC/CO2 or other, I have take values from here https://github.com/zigpy/zha-device-handlers/pull/903/files And I have added some debug line for humidity, just after the lines
You need to have lines starting by "Tuya debug Humidity" And I m seing you have entry with "reachable": false. |
Got Humidity to work. The value already reads (percentage *10), so multiplying with another 100 got it out of range (0-10000), multiplying by only 10 did the trick.
|
One question for a quick and dirty approach to get the values at least readable via REST: Update: So for now, temp, hum and voc are up :-) Thx for your support! |
Success, all sensors working :-) Do you want me to push my changes to your git? If yes, please advise me on how to do this. 78: {
"config": {
"offset": 0,
"on": true,
"reachable": false
},
"ep": 1,
"etag": "d04d771b6e8a82a8bbe495174945ee86",
"lastseen": "2021-06-10T22:31Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "Temperature 78",
"state": {
"lastupdated": "2021-06-10T22:32:19.332",
"temperature": 2440
},
"type": "ZHATemperature",
"uniqueid": "cc:86:ec:ff:fe:62:65:d6-01-0402"
},
79: {
"config": {
"offset": 0,
"on": true,
"reachable": false
},
"ep": 1,
"etag": "f2c4e426a18c5a6c02377a039e409287",
"lastseen": "2021-06-10T22:31Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "Humidity 79",
"state": {
"humidity": 5530,
"lastupdated": "2021-06-10T22:32:21.932"
},
"type": "ZHAHumidity",
"uniqueid": "cc:86:ec:ff:fe:62:65:d6-01-0405"
},
80: {
"config": {
"on": true,
"reachable": true
},
"ep": 1,
"etag": "e9519045b8f823b038436ec496fd15f2",
"lastseen": "2021-06-10T22:31Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "AirQuality 80",
"state": {
"airquality": null,
"airqualityppb": 200,
"lastupdated": "2021-06-10T22:32:17.314"
},
"type": "ZHAAirQuality",
"uniqueid": "cc:86:ec:ff:fe:62:65:d6-01-ef00"
},
81: {
"config": {
"on": true,
"reachable": true
},
"ep": 1,
"etag": "17bfd9b43ff091186e1b4da06a31048b",
"lastseen": "2021-06-10T22:31Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "AirQualityCO2 81",
"state": {
"airquality": null,
"airqualityco2ppm": 370,
"lastupdated": "none"
},
"type": "ZHAAirQualityCO2",
"uniqueid": "cc:86:ec:ff:fe:62:65:d6-01-ef00"
},
82: {
"config": {
"on": true,
"reachable": true
},
"ep": 1,
"etag": "b33f508215ab50e5e48a80f73f53f136",
"lastseen": "2021-06-10T22:31Z",
"manufacturername": "_TZE200_8ygsuhe1",
"modelid": "TS0601",
"name": "AirQualityHCHO 82",
"state": {
"airquality": null,
"airqualityhchomgm3": 1,
"lastupdated": "none"
},
"type": "ZHAAirQualityHCHO",
"uniqueid": "cc:86:ec:ff:fe:62:65:d6-01-ef00"
} |
The rules is : 1 sensor by endpoint So rule 2 : Use existing sensor type. So rule 3 : Make that like you prefer, devs will choose later ^^, but I think make like you have done is better, a new sensortype. Like this they can be used later by other devices
I think, you can remove "airquality", and you probably miss something to update the sensor
Download the code, and make your own PR (have done mine just to help you), like this you will be able to correct it yourself it according to other devs reactions, or improve it (the PR validation can take 1 month, enought time to improve it) |
Thank you very much for your help, very much appreciated :-) I have made my own PR with your changes merged with mine. Here we go: Known problems - I would very much appreciate every hint on how to solve this:
|
Not your fault, and you can do nothing for that, it s the device itself that give this information, and phoscon just display it, but you can prevent the light device by created (as it don't have something usefull)
Can add your model to prevent the light entry creation
Devs are speaking about that ATM, can be a deconz issue.
It s because you have added your new devices types in de_web_plugin.cpp (used during creation) and not in database.cpp (used on loading) BTW correct you space/return ( space<>Tab and useless return lines) manup want to clean the code, so synthax is important too. |
Thanks for the hint with database.cpp, now a restart is possible without losing configuration :-) Have made a new commit, also with some work on the redundant linefeeds. I am not sure if it is wise to not create the Phoscon light device at all, because without this device it will not be visible in Phoscon at all. Is there a way to make a proper sensor device, ideally even with showing the sensor values, within Phoscon? |
But at least temperature and humidity sensor will be visible, no ? |
No, there is no sensor visible at all in Phoscon. BTW: |
Are you sure there is nothing in sensor tab ? From my memory phoscon don't use whitelist for them. And they can be visible on beta version, in help / API information http://phoscon.de/pwabeta
You have 10 sensors entries for only one device ? |
Confirmed, Phoscon does not show this device within sensors, only within lights, also in the Beta version. @sensors: About the device itself: VOC delivers values I cannot really interpret and do not match my Develco VOC sensor at all, even with the assumption, that the value has to be corrected by some calibration. It does show a rise and decrease of the value in a comprehensible way, most of the time, though. HCHO seems working, shows mostly nothing and goes up if confronted with nail polisher, for example. I have no idea, though, on how to interpret the number in terms of units. I assume that "1" means 0,1 or 0,01 mg/m3. The CO2 sensor values seem to be "fake". It gives a reading of roughly 360 / 370 through the whole day in a more or less flat line. CO2 only shows a visible change, when you directly blow on the sensor, but it makes no change if you have the window open or if everything in closed and I sleep in the room, the value stays near 360 / 370 as stated above. |
And no way to reduce it for the moment .... But I m sorry, but even for temperature it seem this device have a floating of 0.3 degree, not the more reliable .... |
Totally with you. The temperature reading would not really work for my current smart home programming, since the threshold for my heating steering is 0.3 degrees above or below target temperature. This works perfectly with my Xiaomi sensors. I will leave the sensors online and available for further testing, should someone else benefit from the integration of this sensor in deCONZ, but for my personal intended usecase (good representation of the air quality, mostly) they seem to be more or less worthless. |
@triumvirrr : I've got this device yesterday and was wondering if it was already integrated in deconz. And now a bit frustrated about your results. Specially for CO2 values. I'm trying to find a CO2 sensor since month which works with zigbee. Did you find one? (which gives accurate measurements) Thanks for your help. |
Hi @easybeat! Unfortunately, I also had no luck in finding a decent Zigbee CO2 sensor. I now went with Netatmo for CO2 (and other readings), Develco (Zigbee, deconz support) for VOC and our Tuya smart air box for HCHO. This is by far not the ideal solution, but OK for my purpose. Netatmo offers a REST API and is well integrated within my central OpenHab solution. It is a cloud solution, though, which I alway try to avoid, if possible and quite costly. My personal pros of Netatmo:
Update after a month of using Netatmo and having learnt something the hard way: But, summed up, I would also be glad for all hints about a functioning CO2 sensor via Zigbee. |
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
Does anyone of the dev team want to merge my additions for the Tuya smart air box? It works well for me and although the product does not match all my expectations, I would be really glad to see it supported in an official release. Probably it will be of help to someone else with the same product, too. |
Can you link me the pr? |
Of course, here we go: |
That's not a pull request 😅 |
Sorry for the confusion, still new to this and not familiar with the terms... |
Guys, can I be of any help here for advancing in getting the box officially supported? |
Don't worry, I have some PR is waiting list since 2 months ^^ |
FWIW, I am keen for support of this device too. |
Any News? |
Asked @manup to check the PR. |
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again. |
Did this PR ever get merged? Is this device supported now? |
ITs still open @jaydisc |
Small update: I have the sensor now for testing the PR here, but will be delayed for v2.13.1 |
Congrat to those testing and devs. I bought 4 of these by mistake, discovering on arrival that they need USB powering. When can we expect a merge so that I can decide if I keep these ? |
Hi all, |
No, I think if you want to use it ATM, you need to compile the code. |
Device
Screenshots
Basic
The text was updated successfully, but these errors were encountered: