-
Notifications
You must be signed in to change notification settings - Fork 503
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
Moes Tuya Thermostat BTH-002 #3304
Comments
Those are cheap and pretty decent floor heating thermostats from Aliexpress, so I think they are going to be pretty popular. |
Hello, do you have an Unix machine to compile code to test it ? Jut for information we already have some tuya thermostat working, but values can be different, so can take some time looking in log if your device don't work at first try. |
Yes, I have a raspberry. And I'll be happy to help. |
Here you have the procedure https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only Just replace the step 1 by The last step replace your actual file, so better to close deconz before, or deconz will be closed itself by the change. (you can make a backup if you want but in another folder, file is libde_rest_plugin.so) After that you just need to re-include the device, will be invisible in phoscon but visible in API, third applications. |
It works! It adds to rest api as a smart plug And I can switch it on/off from the HomeAssistant. Do you need anything else? logs? |
Ha ? You haven't another device created in "sensor" part ? try to add it with "add new sensor" in phoscon (don't delete the previous one), just try to add it again. |
No. But it updates the switch state, when I switch it on/off by the button on the thermostat.
I tried that with no success. But when I were trying to readd it by removing from the mesh and adding it through Phoscon, I got that sensor for a second: But then it was replaced by the smart plug. It's weird. |
Ok so I have added your device in a blacklist to prevent the plug device creation. But I don't understand why It was replaced, they can't have the same uniqueid .... |
Hello, The first thing I want to say is thank you for the support this forum gives me, I am very new to this technology. I'm very interested in this thermostat. @d-litvinov, did the @Smanar solution finally work? Thank you! |
@ogkita, no I haven’t tested the last version. Sorry, I’m on vacation at the moment, and can’t test it. I’ll check it in 2 weeks. |
I've tried to build the latest commit in @Smanar 's branch {
"etag": "454432e75e25912c36b1438401483348",
"hascolor": false,
"lastannounced": "2020-10-16T11:03:40Z",
"lastseen": "2020-10-16T11:04Z",
"manufacturername": "Heiman",
"modelid": "TS0601",
"name": "Smart plug 4",
"state": {
"alert": "none",
"on": false,
"reachable": true
},
"swversion": null,
"type": "Smart plug",
"uniqueid": "bc:33:ac:ff:fe:5e:c8:82-01"
} Maybe I do something wrong. I do it the very first time. So what can I do to help? |
Yep there is a problem, you have "Heiman" as manufacturename, the device can't work with that, all the code is based on the good manufacture name. You haven't the GUI to read the values again ? |
@Smanar sorry for the quality, it's VNC UPD: {
"etag": "ef7f2ede8b4bc77609aa5376052a66d3",
"hascolor": false,
"lastannounced": "2020-10-16T11:03:40Z",
"lastseen": "2020-10-16T20:13Z",
"manufacturername": "_TZE200_aoclfnxz",
"modelid": "TS0601",
"name": "Smart plug 4",
"state": {
"alert": "none",
"on": true,
"reachable": true
},
"swversion": "0xFFFFFFFF",
"type": "Smart plug",
"uniqueid": "bc:33:ac:ff:fe:5e:c8:82-01"
} |
Nice, better. It will depend if the tuya cluster is reconized on first try, don't work on all device. |
No. Only smart plug |
Ok So I have updated the code, on the base of version 85 beta Smanar@2065fca Now it force the device detection even without tuya cluster for this device If you don't want to include the device again, just set phoscon in permit join "add new sensor" and read the basic attribute again (cluster 0x000, press the buton "read") |
Hello all, Any progress on this issue? I expect to receive my thermostat in the next few weeks. Then I can check it out. Thank you! |
Hi @Smanar I have here the thermostat and i am doing test for include in the deconz network. When i link the termostat:
In /lights? api call i get this json: In /sensors? api call i get this json: I try to add de thermostat in the openhab and i get 3 devices: Smart plug 2 (_TZE200_aoclfnxz), On/Off Light TS0601 (_TZE200_aoclfnxz), Thermostat I can only manage the "Smart plug 2", on/off, When I press the on button, the thermostat turns on the screen, off button turns off the screen. I hope this information help you. Thank you |
Hi @Smanar One more thing: when I restarted my Raspberry, the two lights in the endpoint /lights? are disappeared. Thank you. |
Hi @Smanar After rebboting the raspberry, if I flash the raspbee with this command: Then i can see the smart plug 2 in /lights? endpoint { And i can see de version in the web application: If i reboot and dont flash, the raspbee ii does not show lights and version in web app Thank you |
Hello, So first when you have "not connected" at firmware, it s not good, it mean deconz don't see the gateway, so better to use the other version.
Realy nice information, first time I see that, and the screen stay on, or turn off itself after a time ? In reality I need to disable the device you are seen in "light", for you have only the one in "sensor", but I did know the last feature, now it s another question ... But more important, need to check what is working, what is not working, and what the device don't have.
I have updated the code according to your device, you will have more features working.
I haven't tested the code on my side, so if you have error message during compilation (except warning), stop the procedure Edit: |
Hi @Smanar I updated de git, compile without errors, delete device, and start again. this is that i have: /lights? /sensors? in the openhab pannel adding devices: In the openhab control pannel: Now the difference is that in the things panel in openhab the thermostat appears online. If I turn the display on the thermostat physically, the smart plug 3 device is updated on the openhab panel to on. After a few seconds when the screen on the thermostat is physically turned off, on the openhab panel, the smart plug 3 device is turned off. I hope this information help you. Thank you |
After some time, you still have no value for "state/temperature" and "config/heatsetpoint" ? I have take the tuya value from z2m project and it s the same device, strange you haven't the values ... If you still haven't no value can you run deconz in debug mode
In log, every time your thermostat is sending information you will have debug line like
Im using them to find tuya value. |
Hi @Smanar [Smanar] After some time, you still have no value for "state/temperature" and "config/heatsetpoint" ? Here you have some debug data: Any test do you need more only let me know it. Thank you |
Hi Again @Smanar Here you have a complete log for some time. Thank you |
Ok I have found the problem, my bad ^^ I have updated the code, I think it will be better, it will prevent the light creation and can ignore it later. |
Hi @Smanar No changes, When you say "I have updated the code", do i need update my git and compile library again? Sorry, maybe i doing something wrong Thank you. |
Yep, but faster this time
|
Hi @Smanar Now it is diferent ;-) /lights? /switch? /sensors? In openhab things pannel i have this devices: In openhab control pannel i have this data in the thermostat: I can see:
Thank you |
Hello, I tried to set the heatsetpoint with e.g, deconz node red with values like 1950 / 2050 or so or the offset with -150 but all it rounded down to "1900" / "2000" or "-100". Is this a "bug" in the deconz implementation or a limitation of the thermostat ? |
Depend of device, but it generaly don't work same on TRV. |
I have the Model "_TZE200_aoclfnxz" (TS0601), in the description I did not found any hint, that there ist an "feature" thats only allows temperture without "x.5" digits. At the display I also could set this correctly to e.g. 20.5 degrees Regards and I wish a happy new year |
This device don't support x.5 value for heatsetpoint. Yes you can see value incoming and outcoming from tuya device in log with flag "info_l2" |
hm ok, strange that I could set it via display at the device. ok, thank you |
Hopefully one last question....during tests I noticed, that the schedule (week programm) is always "empty". Thank you |
There is in the code, lines about this device, but I don't remember if it was finished, try to set it manualy on the device, you will see if it's updated on the device json too. Somes informations here #2393 (comment) |
I tried that way of reengenierung before asking. I set schedule on device and via zigbee2mqtt (as altenative), but the schedule is alway empty using deconz. So I did now know how the sub elements in the schedule are named. I tried some of the linked issue, but it does not work. Maybe I have a deeper look tomorrow or add the device to zigbee2mqtt at a separate controler. Thank you regards |
You can see perhaps error on logs with "info" and "info_l2" on deconz. |
Where could I see this errors ? I user Deconz docker.... Schedule on device is possible and is "on", than requesting per REST API .../sensors/164/ response is
here Calling
or
|
You haven't access to the GUI ? using VNC ? You have 2 solutions to make test.
|
No, I only had a look via portainer to the log console of the docker, where e.g. the tuya debug info are visible. I postest the responses from REST API above. so the schedule is empty although I set it via display. I did this several times. Ok, I did now know that I could see the "deconz ui" via VNC...I found the debug view with INFO und INFO_l2, But "schedule" keeps empty = {} |
its perfect.
Every time the device send a report you need to have this line, visible with "info"
when you set the schedule on the device, you need to have a log in same time on deconz (if all is working) And if you try a POST to the url |
???? https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/thermostat.cpp
W64 is Monday, W32 Tuesday, W1 Sunday. W124 is weekdays, W3 is weekends |
Yes all tuya stuff are "Smart plug", it s the value returned by their firmware.
It's normal the cluster disapear, for me this device don't have it. Can you show the request you made and the error as result ? It seem the only working one for tuya is
|
Ok, thank for checking...
Response Strange that the schedules from device does not visible.. Now, I tried to set schedule again POST /sensors/165/config/schedule/W4 Payload But schedule changes at the devices does not come back zu "Deconz".... So I try out tomorow to build good "schedules"... the first values shown at the device, after setting via "REST API" look a little bit strange.... Is there a way to set different schedules at once with one call ? Maybe POST to POST /sensors/165/ Thanks |
So you mean making a POST to /sensors/165/ work but not the POST to /sensors/165/config/schedule/W4 ? |
Sorry, no... the Post to the POST to /sensors/165/config/schedule/W4 works, but I want to do a POST to /sensors/165/ or /sensors/165/config to set multiple "Wbbb" values.... This does not work, maybe this is not supported... But I give up, because the "0201" is even back and I could set the Values via REST API, but at the device are very strange "Values"...they look like a screen defect.... So for this device I switch to zigbee2mqtt...at the moment, I could only set the same schedule for all Weekdays, but the I have to do some stuff at node red to make different schedules for each day.... Thank you for your support so far. |
Re openeing as another request came in. |
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. |
All of them are clone, but different than this one, need to make a new DDF, better to make a new device support. Will be probably this DDF https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/tuya/_TZE200_h4cgnbzg_trv.json But the device can have special features else Z2M will have mix them. |
Done, see #7135 |
Device
Screenshots
deconz version 2.05.81
The text was updated successfully, but these errors were encountered: