See #3024, similar device
Was told to create a new issue, so here we go:
Product name: MOES Zigbee Radiator Actuator.

Manufacturer: _TZE200_ckud7u2l


hello I am also interested to have this trv in deconz because I have 10 to install. I am available for testing if needed.
zigbee2mqtt side, they have already successfully integrated [https://www.zigbee2mqtt.io/devices/TS0601_thermostat.html]
if that helps.
But this device is already in deconz ?
I m seing it in the code ATM, It will be in version 80 I think.
Have you tried to compile the last code ?
Edit:
Sorry we have missed it, not the same mac adress.
Can you try with this code ?
git clone --branch tuya2 https://github.com/Smanar/deconz-rest-plugin.git
@Smanar
hello thank you for your feedback. I'm starting with homeassistant. is your fork usable with homeassistant? if so how to put it? Thanks for your help.
You can do nothing with HA, except if you are engineer ^^.
You haven't another machine with a real Unix OS to make test ?
for testing I can mount a virtual machine with debian. once tested will this be added to the HA plugin?
I don't think you can replace yourself the file in HA, when you compile it, the result file is hardware/software specific.
But If you can validate the modification, it will be added in next deconz version and too in next HA plugin version. Unfortunately for you the version 80 will be out soon, so I think the modification will be on version 81.
thank you for this clarification I can wait for a new version it's not a problem.
You have the procedure on github homepage https://github.com/dresden-elektronik/deconz-rest-plugin at "Install deCONZ development package (optional, Linux only)"
Just replace the step 1 by
git clone --branch tuya2 https://github.com/Smanar/deconz-rest-plugin.git
great, thank you.
you anticipated my request
do you have to install a debian with a display server or a simple debian netinst is OK?
Ha good question, never tried netinst.
As you want, the desktop is realy usefull to use deconz, but I think your device will work itself, for me it s same device just with different mac adress, so the faster/easyer way will be the better.
it's good i installed everything you asked for.
what should i check now?
If you have finished all the procedure, the last thing is a file replacement.
So you can remove the conbee from your production network for some time, plug it on the machine where you have the custom deconz version, and try to include the device.
For information IDK wich one devices you have on your production network, but some of them like xiaomi don't like to be out of network too long time. So if it take too long time, better to use the backup/restore feature in phoscon to make a "network clone" when you make your tries.
indeed I noticed that the xiaomi sensors disconnect quickly.
i have included the TRV from phoscon from the sensor page. inclusion OK and TRV recognized in deconz as TS0601


do you need anything else?
Yep, just use it ^^, to check if you miss something.
If all is working, I will make the PR
for this device you have at least.
Thank you for guiding me through all of these steps.
How do I check the information I receive from the TRV in deconz because it is not visible in phoscon?
Obviously there must be information:
child lock
window detection
valve detection
% battery
fashions
local temperature
current heating setpoint
And how do you send, for example, a new temperature setpoint?
I did an integration in jeedom and here is the result:
Control of the setpoint: OK
on the other hand, the possible range is 5 to 35 ° C and the piloting generates an error beyond 32 ° C
Switch on / off: OK

I continue my tests but it seems super promising to me
this is missing:
is it possible to add them?
Ha you are from jeedom ? first time I see some one testing a thermostat on it ^^
BTW, if the plugin don't support all feature yet, you have a button to display node (noeud), inside you will see all fields, even the one the plugin don't use yet.
You have a "lowbattery" filed , this device don't provide a battery level (or haven't see it yet).
For the 2 other I can add them, but are you sure you need them ?
Do you have a screenshot to display the nodes and see all the fields?
For the 2 missing fields I think so.
For children it's pretty good and the detection of window opening I think it's useful too.
by the way, is it possible to rename the devices in deconz to find them more easily when they are not displayed in phoscon?
I think they called that "informations brutes" > https://community.jeedom.com/t/deconz-sondes-aqara-recuperer-des-informations-brutes/22467
The children protection was already in the Json, have added the window open state
Children protection > config/locked
Windows > state/windowopen
You need te include the device again to enable the window, no need to delete it.
yes indeed I found the raw information in jeedom. I was thinking more of the raw deconz info.
in the raw jeedom info the child lock goes back up after adding a new info command and 2 action commands
On the other hand, I do not see the window detection?


the child lock goes back up after adding a new info command and 2 action commands
It mean it works or not ?
And no, the windows detection is not here, you have tried to re-include the device ?
And the lowbattery is blocked at "null" ? After some time you need to have true or false.
Sorry that was not clear but yes the child lock works with the addition of commands.
I tried to re-include the valve but it didn't change anything.
The low battery is still stuck at null despite more than 3 hours of testing.
Ok there is something strange, the fileld "state/windowopen" is created in same time than the "config/preset", I don't see why it s not displayed, there is a mistake in the code (bool / string mistake) but even with that, the field need to be displayed.
For battery, it s device dependent, I will enable the battery level tomorrow for your to check if this one have it.
OK fine
For information there is a parameter which is not very explicit and which has 2 possible actions (on / off) is it maybe this but which is badly recorded? see screenshot


I do not see any refresh or update possible, is this normal?
by the way, is it possible to rename the devices in deconz to find them more easily when they are not displayed in phoscon?
As with any Zigbee sensor, the state attributes are read-only. on is derived from valve >0.
To change the name, use the API. Do a PUT to /sensors/21 with a body of {"name": "Cool New Name"}.
What version of the API plugin are you using? config.schedule should be {} in v2.05.80 instead of [].
What version of the API plugin are you using? config.schedule should be {} in v2.05.80 instead of [].
yes this is the version

On the other hand, I didn't understand to change the name, do you have screenshots to guide me?
Ok So I have corrected the "window open" setting. It seem on your device, you haven't return, it s just a setting that you can enable or not, so I have moved this field from state to config.
I have add too the battery field for test, but we have never see this value on logs on other tuya device, so just make test for at least 24h.
To change name you can use Curl with
curl -H 'Content-Type: application/json' -X PUT -d '{"name": "Cool New Name"}' http://PORT:IP/api/API_KEY/sensors/ID/
Perfect thank you do I need to update?
Thank you very much for the name change command line its worked nickel
Yep, pls, and re-include the device, BTW I m a little busy atm so I don't test on my side, so if you have error during compliation, you can stop all the procedure.
The update went well and after reintegrating the valve the windowopen_set parameter appeared as well as battery.
I added the commands to activate windowopen and it seems to work but I don't see any change on the valve. more testing needs to be done.
I will leave 24 hours to see if the battery status changes
What is the schedule_on parameter?

For schedule you have an exemple here : https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2393
I will ask for battery on the other issue, but if we don't find it, I think the only one solution is putting deconz in debug mode, to find the good vlaue.
What's config/windowopen_set? We already have windowopen as state...
There is 2 "windows open"
But can be wrong, It from that I m reading, I haven't the device to test.
After almost 24 hours I still have no feedback for the battery.
The doc indicates a low battery indicator suddenly I think there is no battery recovery.


Yep I think it's normal, I have an aswer just ATM
yes, on one of my valves sometimes the bootstrapping message about lowbattery is caught, on the other never. If the battery is ok the lowbattery=false message is sent only once when you insert new batteries.
If batteries are ok, no message will be sent until the batteries go empty.
However, when the batteries go empty/dead, the lowbattery status start flapping.
So, it would be great if the default value for the lowbattery status could be "false" instead of "null" at beginning for this kind of devices. But I'm not sure is possible nor it's correct.
So you will have "Battery" = "false", on the future version (Already online on my fork but better to wait for some days, big change ATM)
do you have an example code for the schedule [] ?
And preset? For the test
what do you correspond "on"? and "reachable"?
Reachable = online.
For "on" , there is 2 one ?
For preset, if you want to test on your device, if it support them
if (presetSet == "holiday") { data = QByteArray("\x00",1); }
else if (presetSet == "auto") { data = QByteArray("\x01",1); }
else if (presetSet == "manual") { data = QByteArray("\x02",1); }
else if (presetSet == "confort") { data = QByteArray("\x03",1); }
else if (presetSet == "eco") { data = QByteArray("\x04",1); }
else if (presetSet == "boost") { data = QByteArray("\x05",1); }
else if (presetSet == "complex") { data = QByteArray("\x06",1); }
Yes that's it for "On" I have 2 actions and the state
I will do some tests for preset tests thanks for the codes
Do you have the same for schedule?
Schedule have be never tested on tuya. and the code not permit that yet, so it s not on top of the TODO list ^^.
config/on is a setting : with his one you can enable or not the device (to prevent it trigger event for exemple) I think you have t on all sensor
state/on is a state : like have said Ebaawn it reflect the valve state (it is "on" when valve status > 3)
BTW, you confirm me too, battery level is not working for your device (and not low battery) ? (To disable it in the code)
on a screenshot taken from the internet we see that there are 2 additional parameters for the opening command window how do we add them?

I added the 7 presets and change of course on the trv :
"holiday"
"auto"
"manual"
"confort"
"eco"
"boost"
"complex"
low battery I think it works but I have no hs battery to test
I have find for windows parameter, the information is visible on the device ?
I m trying to find a way to don't overload the JSON.
Yes the informations for Windows parameter is visible on the device.
Ok so I can made an hidden command to change this setting.
So with that you will see the values on the device instead of in the API, and no more field in the JSON.
ok tell me when i can test it
I collected used batteries and I confirm that the low battery is working.

Nice thx, and I remove the "battery" in same time, this one seem not be used.
On the other hand I put the new batteries back, no longer have an alert on the TRV but the low battery always remains at 1
Do you have a way to add a refresh?
Yep, just need to wait, for the device send a new message (if you still have the problem it s strange).
And pls don't restart deconz , it will force the "false" state, but I prefer be sure the device send it.
Ok I have to redo a test because I have included the valve again and everything is back to normal, but it's not the right solution.
I redo the test after more than 3 hours the low battery information is still at 1
When you change the batteries, the TRV should send the message lowbattery=0 once. Can you check the logs to verify the message is sent? lowbattery=0 is sent only once. If deconz misses it, the value will never be updated.
Seriously ?
There is no periodic return at least one time every 24 h ?
Imagine for exemple if you replace the battery when the gateway is off ...
I will leave 24 hours and we will see
@Smanar I have the log still active and in more than a week there is no message from my device when the battery is OK.
Yes, that's the reason I asked the default true. If I change the batteries when the gateway is off then the status will be correct when the gateway come back on.
Instead, if the batteries are low, the lowbattery message is sent quite often (minutes). On my device is "flapping" from lowbattery=0 to lowbattery=1:
01:28:32:750 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
01:29:32:652 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
01:41:32:708 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
01:42:34:464 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
01:53:32:653 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
01:54:32:752 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
02:10:32:753 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
02:11:32:653 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
02:27:32:653 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
02:28:32:752 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
02:52:32:652 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
02:53:32:750 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
03:09:32:652 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
03:10:32:749 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
03:26:32:650 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
03:31:32:632 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
03:35:31:657 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
03:39:32:743 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
04:04:32:749 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 1
04:05:32:646 Tuya debug 5 : Status: 0 Transid: 4 Dp: 1385 Fn: 0 Data 0
It's like after a while the device tries to "work" and after a few seconds it detects the batteries are low. Or that is a strategy to bring the batteries to dead faster ^^
I suspect the behavior is the same for every tuya device, but I can be wrong.
Lol.
Ok, so I think it s possible to add a timer than switch the value to "false" after 1 h without message.
But it s lot of code for that, and just need to restart deconz after changing batteries.
BTW I have almost finished the code to change window open setting.
You need to send at config/ID the Json { "windowopen_set" : [true,20,20] }
It s same command than for enable/disable it, just parmeter are changing : [valve, temperature, minute]
But it s realy experimental ^^, so not sure that can happen.
Good after almost 24 hours the low battery information is correctly returned to null in the raw information but not the reading of the strange information
Smanar you will tell me when I can install your new version for the tests on the window opening
To null ? From the code is not possible, or I m wrong somewhere
You can make pull, it will not be dangerous, but idk what will happen.
yes the value is null see screenshot
Sorry, I didn't understand how to make pull.
I'm a newbie, can you tell me about the different orders?
thank you

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin at "Install deCONZ development package (optional, Linux only)"
Just replace the step 1 by
git clone --branch tuya2 https://github.com/Smanar/deconz-rest-plugin.git
Can skip "git checkout -b mybranch HEAD"
Ah ok sorry I did not understand
I update and keep you posted
During compilation I have the following errors:
make[1]: *** [Makefile.Release:656: release/de_web_plugin.o] Error 1
make[1]: *** Attente des tâches non terminées....
make[1] : on quitte le répertoire « /home/guillaume/deconz-rest-plugin »
make: *** [Makefile:40: release] Error 2
what do I have to do ?
Ha, I think you have error displayed before this message, on diffrent color
I have this:
de_web_plugin.cpp: In member function ‘void DeRestPluginPrivate::addSensorNode(const deCONZ::Node*, const deCONZ::NodeEvent*)’:
de_web_plugin.cpp:4419:84: error: expected ‘;’ before ‘{’ token
else (node->nodeDescriptor().manufacturerCode() == VENDOR_NONE)
Ok c'est ma faute, j'ai corrigé, tu peux re tenter.
tu es français ?
Je fait un nouvel essai
It's good the compilation, it went well this time
I re-included the TRV and here is the new raw information:
Informations brutes
{
"21": {
"config": {
"heatsetpoint": 2350,
"locked": false,
"mode": "auto",
"offset": -100,
"on": true,
"preset": "manual",
"reachable": true,
"schedule": [],
"schedule_on": false,
"windowopen_set": false
},
"ep": 1,
"etag": "75c86eb775165cfb0a65664ea20e7405",
"lastseen": "2020-08-23T18:31Z",
"manufacturername": "_TZE200_ckud7u2l",
"modelid": "TS0601",
"name": "TS0601",
"state": {
"lastupdated": "none",
"lowbattery": null,
"on": null,
"temperature": 2400,
"valve": null
},
"type": "ZHAThermostat",
"uniqueid": "84:2e:14:ff:fe:f1:54:bb-01-0201"
}
}
For the window opening I added the time and temperature settings but it did not change on the valve.
01-0201.config::windowopen_set::1,20,20
you need to use the bracket (like for "xy" for color). And yes I m french, and I don't understand why you still have "null" at low battery ...
can the null value be because of jeedom?
can i see some other way?
Do you have a link for the sample order for the color?
Thank you
I have checked the code, and I m sure you can't have "null", so not sure the procedure to change the lib have worked, you have restart deconz, after having changed the file ?
I realy don't know how work jeedom, but you can mimic the command to change color "XY"
Or use curl
curl -H 'Content-Type: application/json' -X PUT -d '{"windowopen_set":[true,20,20]}' http://IP:PORT/api/KEY/sensors/21/config
If something is wrong you will have an error message using curl. IP and PORt are the same than for phoscon, for the KEY you have it in jeedom confog (can use the same)
yes i restarted deconz. I even restarted my machine.
I did not have any new errors during the procedure. I can do it again if necessary. but first I'll test the curl command and let you know.
{
"21": {
"config": {
"heatsetpoint": 2300,
"locked": false,
"mode": "auto",
"offset": -100,
"on": true,
"preset": "manual",
"reachable": true,
"schedule": [],
"schedule_on": false,
"windowopen_set": false
},
"ep": 1,
"etag": "d3f76a92a1b12ab0d045844cdcd4a48b",
"lastseen": "2020-08-24T16:44Z",
"manufacturername": "_TZE200_ckud7u2l",
"modelid": "TS0601",
"name": "TS0601",
"state": {
"lastupdated": "none",
"lowbattery": null,
"on": true,
"temperature": 2250,
"valve": 100
},
"type": "ZHAThermostat",
"uniqueid": "84:2e:14:ff:fe:f1:54:bb-01-0201"
}
}
The curl command works and changes parameters on the valve well.
thank you so much
I just redo the install procedure, restart the PC and it's always the same thing
All state values are null.
"state": {
"lastupdated": "none",
"lowbattery": null,
"on": null,
"temperature": null,
"valve": null
Ok, so no more idea for this problem, I will ask to other ...
after the feedback, there is only low battery on null
"state": {
"lastupdated": "none",
"lowbattery": null,
"on": false,
"temperature": 2150,
"valve": 0
I have perhaps an answer from ebaawn.
It seem the value set during my initialisation is overwritted with the values from the database shortly after. so if you already have the value "null" in the database it can be an explanation.
You don't have deleted the device, just re-included ?
yes that's it, no deletion just re-included the trv
Ok so it s a possible reason, will see later, not realy dramatic ^^
if you want I can do one by removing the trv and re-included it
I did a test by removing the TRV but it doesn't change anything there is always null on opening window
"state": {
"lastupdated": "none",
"lowbattery": null,
"on": true,
"temperature": 2450,
"valve": 65
The work you guys put in is very much appreciated. Once finishes PM me so i can gift you guys a digital cup of Coffee :)
despite several attempts, I failed to create the commands with the parameters for the window opening detection in jeedom.
After having tested for a good week, the operation chosen for me will be the auto mode and the manual preset because in jeedomle plugin thermostat really allows a lot of things.
Could you tell me Smanar when the integration of TRV in the stable branch will be available?
The PR is submitted (the link is just above), need to wait if it will be accepted, the next deconz version will be in 10 days.
Do you use deconz in stand alone or the one integrated in the jeedom plugin ?
For the command use in jeedom, you can try to compare the values send using the log, but I remember another user have failed to use the "stop" command for a roller shutter too. something not possible to create the JSON.
I use deconz from home assistant as a gateway and jeedom as a receiver deconz is not installed locally on jeedom.
I noticed that the home assistant version was updated more regularly but I may be wrong.
I tried to see the values send from the log but even if I hardened [true, 20,20] only true is sent.
Thank you very much for all your help
Take a look how jeedom change the color, it need to use a json like [x,y]
I looked at this track but in jeedom there is a color function directly

Have you ask to the plugin dev ?
As value you can use bool (true/false) number , string just need to ask how to use array.
I made the request and it is incurring of addition
deconz version will be in 10 days.
Where i can find this information?
I don't find a link for the information, about beta/alpha/release version.
But you have at least one version every 15th of the month
@Smanar Readme file contains it.
The sheduled date ?
This is a beta release. As recently decided in Discord, beta releases are now scheduled for every 15th of a month.
https://github.com/dresden-elektronik/deconz-rest-plugin/releases/tag/V2_05_78
@Smanar @Abbadon89
@manup didn't merge my PR yet:
https://github.com/dresden-elektronik/deconz-rest-plugin/pull/3241
this is the window open command works with jeedom
see this
https://community.jeedom.com/t/vanne-thermostatique-ts0601/35691/13
Lol, it s the first time I see a plugin using deconz more in date than deconz itself ^^.
Most helpful comment
zigbee2mqtt side, they have already successfully integrated [https://www.zigbee2mqtt.io/devices/TS0601_thermostat.html]
if that helps.