dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.88k stars 483 forks source link

LIDL SilverCrest Smart Radiator Thermostat #5349

Open synatis opened 2 years ago

synatis commented 2 years ago

Device

Screenshots

Endpoint and Node Info

image

Basic

image

Groups

image

Scenes

image

Thermostat

image

synatis commented 2 years ago

Let me know if more info is required!

holzmichel6 commented 2 years ago

Hallo, bei mir lassen sich diese thermostate auch nicht steuern ...

Element2 commented 2 years ago

+1 for adding support.

Smanar commented 2 years ago

It seem it use same command than the "Tuya_THD BTH-002 Thermostat". Someone is able to compile the code to test changes ?

synatis commented 2 years ago

@Smanar I bet you'll get this question a lot: I would like to test it but can I do that as a pleb? Are there any instructions what I have to do?

Edit: nvm. Found something https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Compiling-the-REST-plugin-for-device-specific-testing

Smanar commented 2 years ago

Yep sorry, you just need a linux machine with full OS (I can't help you for dockers), I will give you command to use.

synatis commented 2 years ago

I'll try setting up an Ubuntu VM tomorrow and let you know when I'm ready to test.

Smanar commented 2 years ago

Sure, you just need to have deconz installed on the VM (using package method if possible, will be easier later). You can switch the conbee from your prod machine to your dev machine without problem (just for tests, somes minuts) , network config is on the conbee but devices config is on the host.

holzmichel6 commented 2 years ago

hallo, wie lange dauert das in der regel bis neue bzw unbekannte geräte in phoscon bzw deconz eingebunden werden oder ist es ehr unwahrscheinlich das diese lidl silver crest zigbee thermostate überhaupt eingebunden werden ? würde mich über eine antwort freuen, habe nämlich 10 stück hier rumligen und kann leider so nichts mit anfangen

zoschfrosch commented 2 years ago

I tried to use the Lidl Silvercrest Radiator Thermostat with the deconz plugin in Home Assistant...I see the thermostat in deconz and Home Assistant but cannot change the temperature. I'm glad that you are working on a solution. I have an Ubuntu machine, so if I can help, please let me know.

synatis commented 2 years ago

@Smanar I'm ready image

Mimiix commented 2 years ago

hallo, wie lange dauert das in der regel bis neue bzw unbekannte geräte in phoscon bzw deconz eingebunden werden oder ist es ehr unwahrscheinlich das diese lidl silver crest zigbee thermostate überhaupt eingebunden werden ? würde mich über eine antwort freuen, habe nämlich 10 stück hier rumligen und kann leider so nichts mit anfangen

Can you please keep it English?

Smanar commented 2 years ago

Ok so first try

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Compiling-the-REST-plugin-for-device-specific-testing So for you, after having installed deconz :

sudo apt install deconz-dev
git clone --branch lidl_trv https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

The code make lot of thing, but still missing some feature like the "windows open", just tell me that is working or missing. It use the last library version (2/3 days ago) So it's possible you have some error during compilation, but It works on my side.

tuya device can need 2 inclusions to work (without deleting it)

synatis commented 2 years ago

Compiled without an error and Thermostat is controllable via HA but there is a lot of stuff that doesn't make sense to me. I ran out of time and have to continue tomorrow and create a detailed list.

Smanar commented 2 years ago

Yeah It seem this device have somes specials features, can set more temperature, for exemple eco temperature.

When you use manualy a feature, it s possible to see in log the command to use to do same with code, but I will explain later.

synatis commented 2 years ago

This is what I see: image

Changing temperature works in all 3 modes (the buttons below: "Auto", "Heat" and "Off" from left to right) but only pushes it on the device if mode is set to "Heat". If it's set to Off and I change the temp. it switches to "Auto" but doesn't push the new temp. on it. Same if it's already in Auto-mode - no changes.

The buttons represent Operation: image

With Preset I get the following options but only "auto" doesn't give an error: Failed to call service climate/set_preset_mode. /sensors/2/config/heatsetpoint Could not set attribute image

The error if I switch to anything but "auto": Failed to call service climate/set_preset_mode. /sensors/2/config/heatsetpoint Could not set attribute

Hope that helps a bit 😅

MisterPascal commented 2 years ago

Hi, @synatis do you use a ZigBee Hub from Silvercrast or how did you manage to connect the device? I bought one today and cant find it in my Phoscon App...

Mimiix commented 2 years ago

@passi1995 it won't show in phoscon. Only in the API.

MisterPascal commented 2 years ago

@Mimiix okay but I also cant see it there...

synatis commented 2 years ago

Hi, @synatis do you use a ZigBee Hub from Silvercrast or how did you manage to connect the device? I bought one today and cant find it in my Phoscon App...

Press the top button of the Thermostat until you see PAIr then go over to Phoscon App and add a new sensor. Should take no more than 1min until your "sensor is ready". After that you can see it in deCONZ like the first screenshot of this thread.

MisterPascal commented 2 years ago

Thank you @synatis! I didn't find pairing function. Got it in HA now but without any function. Let me know if I can help to integrate this device...

Smanar commented 2 years ago

"Preset" can't work, It s not used for TRV (but I think we will need it for this one, because of it s special features), It s only used for thermostat, not valve. If I m right you haven't it in the json ?

And for auto, there is a problem I don't have HA, so idk how it work

If it's set to Off and I change the temp. it switches to "Auto" but doesn't push the new temp. on it. Same if it's already in Auto-mode - no changes.

I can't say if it s the device that switch itself to "auto" when receve a temperature, or if it s from HA.

If you still are on the GUI, can you take a look in logs with "info" "info_l2" and trying the same procedure. I need logs with "tuya" inside pls. It can depend of order, if HA send first the temperature before the mode, so perhaps I need to memorise it somewhere because there is not the same issue on other devices with HA too, something specific to this one ...

synatis commented 2 years ago

Hey, are those the json you need to see? image

Info for switching temp while device is set to off

19:03:44:636 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 19:03:44:969 Send Tuya request 0xB4E3F9FFFEC74CBF : Dp_type: 0x02, Dp_identifier 0x10, data: 00000016 19:03:45:115 create node 0x5C0272FFFECA638F seen by 2 neighbors 19:03:45:324 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00101002000400000016 19:03:45:324 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data 22 19:03:45:445 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00101002000400000016 19:03:45:445 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data 22 19:03:47:036 create node 0x5C0272FFFEF5B403 seen by 2 neighbors 19:03:47:516 create node 0x5C0272FFFED1D6EE seen by 2 neighbors 19:03:47:997 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 19:03:48:476 create node 0x5C0272FFFECA638F seen by 2 neighbors 19:03:49:916 create node 0x5C0272FFFED1D6EE seen by 2 neighbors 19:03:50:396 create node 0x5C0272FFFEF5B403 seen by 2 neighbors 19:03:50:854 Device TTL 2220 s flags: 0x7 19:03:52:316 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 19:03:52:326 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00020204000100 19:03:52:326 Tuya debug 5 : Status: 0 Transid: 2 Dp: 1026 (0x04,0x02) Fn: 0 Data 0 19:03:52:437 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00020204000100 19:03:52:437 Tuya debug 5 : Status: 0 Transid: 2 Dp: 1026 (0x04,0x02) Fn: 0 Data 0 19:03:52:796 create node 0x5C0272FFFECA638F seen by 2 neighbors 19:03:54:715 create node 0x5C0272FFFEF5B403 seen by 2

Info_l2

19:10:27:733 Erase task req-id: 160, type: 37 zcl seqno: 137 send time 3, profileId: 0x0104, clusterId: 0xEF00 19:10:27:837 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 19:10:27:917 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 00020204000102 19:10:29:278 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 19:10:29:757 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 19:10:30:833 Daylight now: sunsetEnd, status: 200, daylight: 0, dark: 1 19:10:31:228 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0xE1A7 19:10:31:228 neigbor 0x0c4314fffe619d00 is unknown child 19:10:31:677 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 19:10:32:144 Websocket 192.168.178.25:43764 send message: {"config":{"battery":100,"heatsetpoint":1300,"locked":false,"mode":"off","offset":0,"on":true,"preset":"auto","reachable":true,"schedule":{},"schedule_on":false,"setvalve":false},"e":"changed","id":"2","r":"sensors","t":"event","uniqueid":"b4:e3:f9:ff:fe:c7:4c:bf-01-0201"} (ret = 273) 19:10:32:156 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 19:10:32:636 CTRL skip creating node 0x0C4314FFFE619D00 while permit join is disabled 19:10:33:286 Erase task req-id: 178, type: 37 zcl seqno: 138 send time 1, profileId: 0x0104, clusterId: 0xEF00 19:10:33:479 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 0010100200040000001a 19:10:33:655 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0x0000 19:10:34:077 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 19:10:34:556 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 19:10:35:036 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 19:10:35:516 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 19:10:36:956 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 19:10:37:436 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 19:10:37:832 DB save zll database items 0x00000080 19:10:37:832 DB sql exec REPLACE INTO sensors (sid, name, type, modelid, manufacturername, uniqueid, swversion, state, config, fingerprint, deletedState, mode, lastseen, lastannounced) VALUES ('2', 'Thermostat 2', 'ZHAThermostat', 'TS0601', '_TZE200_chyvmhay', 'b4:e3:f9:ff:fe:c7:4c:bf-01-0201', '', '{"lastupdated":"2021-10-14T17:10:22.331","on":false,"temperature":2190}', '{"battery":100,"heatsetpoint":1300,"locked":false,"mode":"off","offset":0,"on":true,"preset":"auto","reachable":true,"schedule":null,"schedule_on":false,"setvalve":false}', '{"d":769,"ep":1,"in":[61184,0,513,61184],"p":260}', 'normal', '1', '2021-10-13T17:44Z', '') 19:10:37:839 DB saved in 6 ms 19:10:38:912 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0xE1A7 19:10:38:912 neigbor 0x0c4314fffe619d00 is unknown child 19:10:39:356 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 19:10:39:836 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled

Smanar commented 2 years ago

19:03:44:969 Send Tuya request 0xB4E3F9FFFEC74CBF : Dp_type: 0x02, Dp_identifier 0x10, data: 00000016

Dp_identifier 0x10 = DP_IDENTIFIER_THERMOSTAT_HEATSETPOINT_3 It mean you have set the 0x16 = 22 degréé value at set heat point

19:03:45:324 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00101002000400000016
19:03:45:324 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data 22

This is just the confirmation from the device

19:03:52:326 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00020204000100
19:03:52:326 Tuya debug 5 : Status: 0 Transid: 2 Dp: 1026 (0x04,0x02) Fn: 0 Data 0

0x02 is the mode and data = 0 mean "auto"

On the logs with L2

19:10:27:917 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 0002 0204 00 01 02

You hare setting the mode 0x02 = "off"

19:10:32:144 Websocket 192.168.178.25:43764 send message: {"config":{"battery":100,"heatsetpoint":1300,"locked":false,"mode":"off","offset":0,"on":true,"preset":"auto","reachable":true,"schedule":{},"schedule_on":false,"setvalve":false},"e":"changed","id":"2","r":"sensors","t":"event","uniqueid":"b4:e3:f9:ff:fe:c7:4c:bf-01-0201"}

Ok confirmation by websocket "mode" = "off"

19:10:33:479 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 0010 1002 00 04 0000001a

Setting the set heat point to 0x1a = 26 degree.

19:10:37:832 DB sql exec REPLACE INTO sensors (sid, name, type, modelid, manufacturername, uniqueid, swversion, state, config, fingerprint, deletedState, mode, lastseen, lastannounced) VALUES ('2', 'Thermostat 2', 'ZHAThermostat', 'TS0601', '_TZE200_chyvmhay', 'b4:e3:f9:ff:fe:c7:4c:bf-01-0201', '', '{"lastupdated":"2021-10-14T17:10:22.331","on":false,"temperature":2190}', '{"battery":100,"heatsetpoint":1300,"locked":false,"mode":"off","offset":0,"on":true,"preset":"auto","reachable":true,"schedule":null,"schedule_on":false,"setvalve":false}', '{"d":769,"ep":1,"in":[61184,0,513,61184],"p":260}', 'normal', '1', '2021-10-13T17:44Z', '')

But the heatsetpoint" is locked at 13.00 .....

Have updated the code to prnint more debug line, visible with "info", they will start by "Debug tuya 77", if you can update your code and restart the same procedure (can enable info and info_l2 in same time)


cd deconz-rest-plugin
git pull
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

From your log it seem

Edit: Ok, have found the problem, give me 10 mn.

Edit2: Sorry I need more test from you. From that I m reading the value need to be / 2, so if you try to set a 22 degree value for heat setpoint the value visible in the tuya request need to be 44 = 0x2C and not 0x16.

And when you set 26 degree, the value in the json is 13, because divided by 2. Something you can do is using manualy the device, and look at return in log, for exemple setting a 20 degree value for heatpoint and look for log

19:03:45:445 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 001010020004000000XX 19:03:45:445 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data XX

synatis commented 2 years ago

Set mode to manual directly on the device and turned up the value from 13°C to 20°C It's amazing what you can do, just by looking at logs :'D

15:37:35:069 Idle timer triggered 15:37:35:292 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0xE1A7 15:37:35:292 neigbor 0x0c4314fffe619d00 is unknown child 15:37:35:741 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 15:37:35:741 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 15:37:36:220 create node 0x5C0272FFFECA638F seen by 2 neighbors 15:37:36:221 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 15:37:36:701 CTRL skip creating node 0x0C4314FFFE619D00 while permit join is disabled 15:37:37:720 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0x0000 15:37:38:141 create node 0x5C0272FFFED1D6EE seen by 2 neighbors 15:37:38:142 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 15:37:38:620 create node 0x5C0272FFFEF5B403 seen by 2 neighbors 15:37:38:621 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 15:37:39:101 create node 0x5C0272FFFECA638F seen by 2 neighbors 15:37:39:101 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 15:37:39:568 DB save zll database items 0x00000084 15:37:39:569 DB sql exec REPLACE INTO auth (apikey, devicetype, createdate, lastusedate, useragent) VALUES ('19426F394B', 'pydeconz', '2021-10-13T18:07:01', '2021-10-17T13:37:15', 'HomeAssistant/2021.10.4 aiohttp/3.7.4.post0 Python/3.9') 15:37:39:569 DB sql exec REPLACE INTO sensors (sid, name, type, modelid, manufacturername, uniqueid, swversion, state, config, fingerprint, deletedState, mode, lastseen, lastannounced) VALUES ('2', 'Thermostat 2', 'ZHAThermostat', 'TS0601', '_TZE200_chyvmhay', 'b4:e3:f9:ff:fe:c7:4c:bf-01-0201', '', '{"lastupdated":"2021-10-17T13:37:03.589","on":false,"temperature":1600}', '{"heatsetpoint":2000,"locked":false,"mode":"heat","offset":0,"on":true,"preset":"auto","reachable":true,"schedule":null,"schedule_on":false,"setvalve":false}', '{"d":769,"ep":1,"in":[61184,0,513,61184],"p":260}', 'normal', '1', '2021-10-13T17:44Z', '') 15:37:39:574 DB saved in 5 ms 15:37:39:575 Daylight now: solarNoon, status: 170, daylight: 1, dark: 0 15:37:39:582 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 15:37:39:583 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 15:37:39:589 Master: read param with arg 0x19 15:37:39:604 Device TTL 3259 s flags: 0x7 15:37:40:286 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 00101002000400000028 15:37:40:286 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00101002000400000028 15:37:40:286 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data 40 15:37:40:286 Debug tuya 77 : 1 15:37:40:287 Debug tuya 77 : 2 15:37:40:389 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 00101002000400000028 15:37:40:389 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00101002000400000028 15:37:40:389 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data 40 15:37:40:389 Debug tuya 77 : 1 15:37:40:390 Debug tuya 77 : 2 15:37:41:020 create node 0x5C0272FFFED1D6EE seen by 2 neighbors 15:37:41:020 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 15:37:41:501 create node 0x5C0272FFFEF5B403 seen by 2 neighbors 15:37:41:501 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 15:37:42:974 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0xE1A7 15:37:42:974 neigbor 0x0c4314fffe619d00 is unknown child 15:37:43:420 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 15:37:43:421 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 15:37:43:901 create node 0x5C0272FFFECA638F seen by 2 neighbors 15:37:43:902 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 15:37:44:381 CTRL skip creating node 0x0C4314FFFE619D00 while permit join is disabled 15:37:45:275 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 001818020004000000dc 15:37:45:275 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 001818020004000000dc 15:37:45:275 Tuya debug 5 : Status: 0 Transid: 24 Dp: 536 (0x02,0x18) Fn: 0 Data 220 15:37:45:277 Websocket 192.168.178.25:57266 send message: {"e":"changed","id":"2","r":"sensors","state":{"lastupdated":"2021-10-17T13:37:45.276","on":false,"temperature":2200},"t":"event","uniqueid":"b4:e3:f9:ff:fe:c7:4c:bf-01-0201"} (ret = 175) 15:37:45:397 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 001818020004000000dc 15:37:45:397 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 001818020004000000dc 15:37:45:397 Tuya debug 5 : Status: 0 Transid: 24 Dp: 536 (0x02,0x18) Fn: 0 Data 220 15:37:45:413 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0x0000 15:37:45:820 create node 0x5C0272FFFED1D6EE seen by 2 neighbors 15:37:45:821 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 15:37:45:885 Node data 0x5c0272fffe03af80 profileId: 0x0104, clusterId: 0x0702 15:37:45:886 No consumption sensor found for 0x5C0272FFFE03AF80, endpoint: 0x01 15:37:45:886 ZCL attribute report 0x5C0272FFFE03AF80 for cluster: 0x0702, ep: 0x01, frame control: 0x08, mfcode: 0x0000 15:37:45:886 payload: 000025573400000000 15:37:46:300 create node 0x5C0272FFFEF5B403 seen by 2 neighbors 15:37:46:301 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 15:37:46:589 APS-DATA.indication from unknown node 0x5C0272FFFECA638F 15:37:46:781 create node 0x5C0272FFFECA638F seen by 2 neighbors 15:37:46:781 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 15:37:47:261 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 15:37:47:262 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 15:37:48:701 create node 0x5C0272FFFED1D6EE seen by 2 neighbors 15:37:48:702 CTRL skip creating node 0x5C0272FFFED1D6EE while permit join is disabled 15:37:49:180 create node 0x5C0272FFFEF5B403 seen by 2 neighbors 15:37:49:181 CTRL skip creating node 0x5C0272FFFEF5B403 while permit join is disabled 15:37:49:569 Daylight now: solarNoon, status: 170, daylight: 1, dark: 0 15:37:50:646 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0xE1A7 15:37:50:646 neigbor 0x0c4314fffe619d00 is unknown child 15:37:51:101 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 15:37:51:102 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled

Smanar commented 2 years ago

Lol, it s because I know well tuya stuff now

15:37:40:286 Tuya debug 5 : Status: 0 Transid: 16 Dp: 528 (0x02,0x10) Fn: 0 Data 40

So it s that, we realy need to divide by 2. But on this try the "heatsetpoint" was already 2000 (and not 1300) before the change, so the value is not updated.

Changing temperature works in all 3 modes (the buttons below: "Auto", "Heat" and "Off" from left to right) but only pushes it on the device if mode is set to "Heat". If it's set to Off and I change the temp. it switches to "Auto" but doesn't push the new temp. on it. Same if it's already in Auto-mode - no changes.

So with new code it will work for "heat" and "auto", IDK yet for "off", but as it switch itself from "off" to "auto" it can work, perhaps not on the first seconds, but on next notification from device.

Have too removed "preset" and "valve", but you need to restart or reinclude the device for the json be updated, so we will check that later.

cd deconz-rest-plugin
git pull
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins
synatis commented 2 years ago

In HA: Switching modes works now correctly. Off is something like holiday mode, shown as a suitcase. Each mode remembers their value.

E.g.:

HA always shows the value I last set. Let's say I was in auto and changed to 20 image

Off is still 17. Heat 18. Auto 20. Now when I switch to Off via HA, it shows: image

which is incorrect because the device shows 17.

Switches automatically from Off to Auto if value is changed via HA. Doesn't switch from Heat/Manu to Auto, which is nice.

preset is gone as you said 👍

Let me know if more logs are needed. Awesome work so far!

Smanar commented 2 years ago

Huuu, you have a temperature for "off" ? It's hidden but in reality the device have lot of heatpoint, I m using 2, the heat setpoint and the auto setpoint, there is probably too away, confort and eco, but nothing about "off".

In my mind the mode "off" turn off the device, not setting a lower temperature. IDK what you want to do but

synatis commented 2 years ago

Really sorry for the late response. I'll try to respond faster and make this work.

Huuu, you have a temperature for "off" ? It's hidden but in reality the device have lot of heatpoint, I m using 2, the heat setpoint and the auto setpoint, there is probably too away, confort and eco, but nothing about "off".

In my mind the mode "off" turn off the device, not setting a lower temperature. IDK what you want to do but

Off is something like holiday mode, shown as a suitcase. I made you a pic, hope it helps: image

Stuff I noticed:

  • On "off" mode, it display 17, but if the temperature go under 17 degree, does it turn "on" ?

yes but in this picture it was set to 14.5

  • Do you want I send a Set point value at 0 degree to disable it on "off" mode ?

no, since off is not off 😅

  • Can you show me log when you go from "heat" to "off" for exemple ? To capture the command for the "off" set heatpoint.

Switch from manu to off (on the device). Then after some sec. it automatically switched to auto

2000,"locked":false,"mode":"off","offset":0,"on":true,"reachable":true,"schedule":{},"schedule_on":false},"e":"changed","id":"2","r":"sensors","t":"event","uniqueid":"b4:e3:f9:ff:fe:c7:4c:bf-01-0201"} (ret = 226) 14:42:14:033 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 00020204000102 14:42:14:033 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00020204000102 14:42:14:034 Tuya debug 5 : Status: 0 Transid: 2 Dp: 1026 (0x04,0x02) Fn: 0 Data 2 14:42:14:252 Idle timer triggered 14:42:14:252 don't create binding for attribute reporting of sensor Thermostat 2 14:42:14:252 Force binding of attribute reporting for node Thermostat 2 14:42:15:141 neigbor 0x0c4314fffe619d00 is unknown child 14:42:15:251 Idle timer triggered 14:42:15:252 don't create binding for attribute reporting of sensor Thermostat 2 14:42:15:252 Force binding of attribute reporting for node Thermostat 2 14:42:15:547 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 14:42:15:548 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 14:42:16:027 create node 0x5C0272FFFECA638F seen by 2 neighbors 14:42:16:028 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 14:42:16:251 Idle timer triggered 14:42:16:251 don't create binding for attribute reporting of sensor Thermostat 2 14:42:16:252 Force binding of attribute reporting for node Thermostat 2 14:42:16:507 CTRL skip creating node 0x0C4314FFFE619D00 while permit join is disabled 14:42:16:752 Daylight now: solarNoon, status: 170, daylight: 1, dark: 0 14:42:17:252 Idle timer triggered 14:42:17:252 don't create binding for attribute reporting of sensor Thermostat 2 14:42:17:252 Force binding of attribute reporting for node Thermostat 2 14:42:17:543 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0xE1A7 14:42:17:543 neigbor 0x00158d000659e30a is unknown child 14:42:17:543 neigbor 0x00158d0005291e36 is unknown child 14:42:17:948 CTRL skip creating node 0x00158D000659E30A while permit join is disabled 14:42:18:252 Idle timer triggered 14:42:18:252 don't create binding for attribute reporting of sensor Thermostat 2 14:42:18:252 Force binding of attribute reporting for node Thermostat 2 14:42:18:429 CTRL skip creating node 0x00158D0005291E36 while permit join is disabled 14:42:18:892 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 00020204000100 14:42:18:892 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00020204000100 14:42:18:893 Tuya debug 5 : Status: 0 Transid: 2 Dp: 1026 (0x04,0x02) Fn: 0 Data 0 14:42:18:894 Websocket 192.168.178.25:60394 send message: {"config":{"heatsetpoint":2000,"locked":false,"mode":"auto","offset":0,"on":true,"reachable":true,"schedule":{},"schedule_on":false},"e":"changed","id":"2","r":"sensors","t":"event","uniqueid":"b4:e3:f9:ff:fe:c7:4c:bf-01-0201"} (ret = 227) 14:42:19:014 Tuya debug Request : Address 0xB4E3F9FFFEC74CBF, Endpoint 0x01, Command 0x02, Payload 00020204000100 14:42:19:019 Tuya debug 4 : Address 0xB4E3F9FFFEC74CBF Payload 00020204000100 14:42:19:019 Tuya debug 5 : Status: 0 Transid: 2 Dp: 1026 (0x04,0x02) Fn: 0 Data 0 14:42:19:251 Idle timer triggered 14:42:19:252 don't create binding for attribute reporting of sensor Thermostat 2 14:42:19:252 Force binding of attribute reporting for node Thermostat 2 14:42:20:252 Idle timer triggered 14:42:20:252 don't create binding for attribute reporting of sensor Thermostat 2 14:42:20:252 Force binding of attribute reporting for node Thermostat 2 14:42:20:346 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0x0000 14:42:20:348 create node 0x5C0272FFFECA638F seen by 2 neighbors 14:42:20:349 CTRL skip creating node 0x5C0272FFFECA638F while permit join is disabled 14:42:20:827 create node 0xCC86ECFFFE4EAF03 seen by 2 neighbors 14:42:20:828 CTRL skip creating node 0xCC86ECFFFE4EAF03 while permit join is disabled 14:42:21:252 Idle timer triggered

Element2 commented 2 years ago

Maybe this is relevant or not, but according to the Silvercrest thermostat manual, the sun icon is shown when the thermostat is in the high temp phase and a moon when it is in the low temp phase of the running (automatic) program. So per day one can program a time when a high temperature (sun) is set and a time when a low temperature is set (moon). Hope this clarifies the sun and moon icons. Can't wait to use this in Domoticz with the Deconz plugin. Thanks for all the work so far.

Smanar commented 2 years ago

the sun icon is shown when the thermostat is in the high temp phase and a moon when it is in the low temp phase of the running (automatic) program. So per day one can program a time when a high temperature (sun) is set and a time when a low temperature is set (moon). Hope this clarifies the sun and moon icons.

Lol, nope it s worse for me, because you have a capture with the moon and written "manu".

If I set it to "off" on the device - it switches to auto after 4-5 sec.

So there is no way to turn "off" the device ? bad for integration, all third app use "auto" "heat/force" and "off". You realy don't want I set a 0 degréé temperature for "off" mode, it s the way used by zigbee2mqtt.

And I still have no idea where the "off" value is from, on logs when you set "off" , the device return to "auto" but never send a temperature.

Element2 commented 2 years ago

Ah, not sure what is shows (manual or automatic) during programming the device with the buttons. And if that's trivial or not. The only point I was trying to make was that the sun and moon icon are not tied to one mode or heating setting, but to indicate a state in the running program. (As I understand it)

Smanar commented 2 years ago

but to indicate a state in the running program. (As I understand it)

Yep I think too, but why it appear on "manu" mode ...

But if it work like that, not a big problem, just rest the "off" feature. As you are the first one with the device, it s like you want, but later I think we will have users that will want a real "off" feature.

synatis commented 2 years ago

But if it work like that, not a big problem, just rest the "off" feature. As you are the first one with the device, it s like you want, but later I think we will have users that will want a real "off" feature.

Sure. I can live with that 👍

Max. temp the device can according to the manual is 29,5°C. In case that's something you need to know as well. I didn't find anything for sun and moon. Thought it would be to states for day and night 🙈

Smanar commented 2 years ago

Max. temp the device can according to the manual is 29,5°C. In case that's something you need to know as well.

I m using the standard one used for all termostats, min 5 max 32, So the API can accept 30 but the device will return 29.5 at maximum if it can go over.

So you need something more to code ?

synatis commented 2 years ago

So you need something more to code ?

Not sure :/ Other than that:

  • It seems like the temps are saved in Sun, Moon and Suitcase.
  • If I set it to "off" on the device - it switches to auto after 4-5 sec.
pillemats commented 2 years ago

I have just ordered some of this and can support if you want! I can test or something else. Hopefully they will supported asap :-) Thanks for the great support team here and on discord!!!!

MisterPascal commented 2 years ago

but to indicate a state in the running program. (As I understand it)

Yep I think too, but why it appear on "manu" mode ...

But if it work like that, not a big problem, just rest the "off" feature. As you are the first one with the device, it s like you want, but later I think we will have users that will want a real "off" feature.

If you change the temperature manually it will automatically hold this temperature until the next switch from heat mode (sun) to not heat mode (moon) or the other way around.

rikroe commented 2 years ago

As just mentioned sun & moon usually only indicate that the current temperature (manual or not) is either set to the high or low temperature set points. At least that's what all my other electric valves do.

I've also ordered some valves and can test hopefully on the weekend.

Would it make sense to also buy the Lidl Smart Home gateway? I.e. To sniff the traffic somehow? The options shown in this are basically scheduling high/low set points, offset, automatic/manual mode, vacation mode and some settings for open windows detection: https://youtu.be/LJ6zOvOaXoo (German video)

pillemats commented 2 years ago

I can buy one if it help you to find a solution

MisterPascal commented 2 years ago

Here you got the manual... 20211020_111058.jpg20211020_111012.jpg

Smanar commented 2 years ago

It seems like the temps are saved in Sun, Moon and Suitcase.

And it s 'not good ?

If I set it to "off" on the device - it switches to auto after 4-5 sec.

Here it s not my fault ^^, look at your log, you are setting the "off" mode, and it s the device itself that return to "auto",

But according to the documentation "manual" and "auto" are not good too. The "manu" mode is the "standard auto", you set 1 temperature and the device use it for regulation. The "auto" mode is a custom mode that need 2 temperatures. The "off" mode is totaly not existant.

Here it seem the guys use 60 and 0 value for "off" and "heat" https://github.com/Lavisx/lidl-valve-z2m/blob/main/lidl_radiator_valve.js

To keep a "standard" will be nice having same feature for all TRV BTW if the "auto" use 2 temperatures, we are still missing one.

Manu use 0x02 0x010 Auto use 0x02 0x69 and another one.

To make the procee easy to use in third app, I can set a value in the "sun temperature" and set the temperature - 5 °C in the "moon temperature" ?

Would it make sense to also buy the Lidl Smart Home gateway? I.e. To sniff the traffic somehow?

No I don't think as we can have all command using the device manualy and looking in logs for command value.

synatis commented 2 years ago

It seems like the temps are saved in Sun, Moon and Suitcase.

And it s 'not good ?

No no, just wanted to tell you what the device is doing :)

If I set it to "off" on the device - it switches to auto after 4-5 sec.

Here it s not my fault ^^, look at your log, you are setting the "off" mode, and it s the device itself that return to "auto",

Sorry if it sounded like a blame. I tested again and if its set to off via HA it stays off. So everything works like intended.

But according to the documentation "manual" and "auto" are not good too. The "manu" mode is the "standard auto", you set 1 temperature and the device use it for regulation. The "auto" mode is a custom mode that need 2 temperatures. The "off" mode is totaly not existant.

Here it seem the guys use 60 and 0 value for "off" and "heat" https://github.com/Lavisx/lidl-valve-z2m/blob/main/lidl_radiator_valve.js

To keep a "standard" will be nice having same feature for all TRV BTW if the "auto" use 2 temperatures, we are still missing one.

Manu use 0x02 0x010 Auto use 0x02 0x69 and another one.

Not sure how we can test this. Can you not just yoink the code? 👀

To make the procee easy to use in third app, I can set a value in the "sun temperature" and set the temperature - 5 °C in the "moon temperature" ?

I don't get it 🙈

pillemats commented 2 years ago

how high is the probability that it will be integrated in deconz in the next days?

Mimiix commented 2 years ago

@pillemats not in days. Stable would be around 15 november.

pillemats commented 2 years ago

I only care that it comes at all… otherwise I must send it back :-) if it is not worked on the I send it back and choose another one. I don’t want to use another bridge and the Tuya app ;-)

Smanar commented 2 years ago

Sorry if it sounded like a blame. I tested again and if its set to off via HA it stays off. So everything works like intended.

??? But why the working mode have changed ?

To make the procee easy to use in third app, I can set a value in the "sun temperature" and set the temperature - 5 °C in the "moon temperature" ?

For exemple if you set the heatpoint at 25 degree, the code set the "sun" at 25 and the "moon" at 20. So you have less control, but easier for third app, you have just 1 temperature to manage.

Not sure how we can test this. Can you not just yoink the code?

Can you try the actual code, you will have.

Off > manual with temperature of 1°C (mean turn off) Heat > manual with temperature of 50°C (mean force heat) Auto > auto with the sun and moon mode (the moon temperature is not set yet, but I like this working mode with 2 temperatures days and nights)

rikroe commented 2 years ago

Off > manual with temperature of 1°C (mean turn off) Heat > manual with temperature of 50°C (mean force heat) Auto > auto with the sun and moon mode (the moon temperature is not set yet, but I like this working mode with 2 temperatures days and nights)

Actually I'm not sure if deconz should be implementing/translating stuff for home automation systems if the device doesn't support it. In HA, off and heat presents are used to control "dumb", i.e. non self-regulating thermostats that can only be on or off. Temperature is regulated via an external measurement and controlled via HA.

I would rather see that we expose all 3 (manual, moon, sun) temperatures (even vacation mode of that's a fourth temperature).

HA surely support thermostats with low, high and manual overridden temperatures, it might just be that there are some additions needed in Home Assistant's deconz integration.

I'll try to setup a deocnz developing environment today as well as two of these valves have arrived.

synatis commented 2 years ago

Sorry if it sounded like a blame. I tested again and if its set to off via HA it stays off. So everything works like intended.

??? But why the working mode have changed ?

I tested it only on the device not via HA.

To make the procee easy to use in third app, I can set a value in the "sun temperature" and set the temperature - 5 °C in the "moon temperature" ?

For exemple if you set the heatpoint at 25 degree, the code set the "sun" at 25 and the "moon" at 20. So you have less control, but easier for third app, you have just 1 temperature to manage.

The difference should be 3 - 4°C at max according to some sources. But I personally would like to control those values via HA.

Off > manual with temperature of 1°C (mean turn off) Heat > manual with temperature of 50°C (mean force heat) Auto > auto with the sun and moon mode (the moon temperature is not set yet, but I like this working mode with 2 temperatures days and nights)

Updated and tested the new code.

Via HA:

deconz debug:

12:47:12:229 CTRL skip creating node 0x00158D000659E30A while permit join is disabled 12:47:12:344 Daylight now: goldenHour1, status: 160, daylight: 1, dark: 0 12:47:12:709 CTRL skip creating node 0x00158D0005291E36 while permit join is disabled 12:47:13:920 API error 608, /sensors/2/config/mode, Could not set attribute 12:47:14:100 void deCONZ::zmNode::setFetched(deCONZ::RequestId, bool) fetched item: 8, node: 0x0000 12:47:14:148 create node 0x5C0272FFFED1D6EE seen by 2 neighbors

Via device

I'm glad @rikroe will help ☺

Smanar commented 2 years ago

Actually I'm not sure if deconz should be implementing/translating stuff for home automation systems if the device doesn't support it.

No, justly, we use only supported feature. Setting the 0.5°C is not a hack, it's just a way to turn off the device

In HA, off and heat presents are used to control "dumb", i.e. non self-regulating thermostats that can only be on or off.

I don't use HA, but it s not the first TRV I make and in HA, and ATM for all of them

HA surely support thermostats with low, high and manual overridden temperatures, it might just be that there are some additions needed in Home Assistant's deconz integration.

Sure or you can just use custom command

I would rather see that we expose all 3 (manual, moon, sun) temperatures (even vacation mode of that's a fourth temperature).

Ok, so what do you prefer ?