Skip to content
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 TS0601_thermostat weekly schedule #1244

Closed
amx2203 opened this issue Oct 23, 2021 · 3 comments
Closed

TuYa TS0601_thermostat weekly schedule #1244

amx2203 opened this issue Oct 23, 2021 · 3 comments

Comments

@amx2203
Copy link

amx2203 commented Oct 23, 2021

The integration of a TuYa TS0601 thermostat works very well for me so far. An open point is the programming of the times and temperatures for the weekly time programs. I have not yet found a way to send the appropriate values to the thermostat similar to zigbee2mqtt. (tested and works). Is this function not implemented or am I missing something?


https://www.zigbee2mqtt.io/devices/TS0601_thermostat.html

Use topic zigbee2mqtt/FRIENDLY_NAME/set/schedule to set the schedule of the device with 6 timeslots on workdays or holidays (e.g. weekend). Example payload values are:

{
"workdays":[
{"hour":6,"minute":0,"temperature":19},
{"hour":8,"minute":0,"temperature":20},
{"hour":18,"minute":0,"temperature":21},
{"hour":20,"minute":30,"temperature":20},
{"hour":22,"minute":0,"temperature":19},
{"hour":23,"minute":30,"temperature":15}
]
}
{
"holidays":[
{"hour":6,"minute":0,"temperature":19},
{"hour":8,"minute":0,"temperature":20},
{"hour":18,"minute":0,"temperature":21},
{"hour":20,"minute":30,"temperature":20},
{"hour":22,"minute":0,"temperature":19},
{"hour":23,"minute":30,"temperature":15}
]
}
You can set “week” schedule pattern with topic zigbee2mqtt/FRIENDLY_NAME/set. The payload values are: 5+2 -> to be used when workdays for example are monday-friday and saturday & sunday are holidays 6+1 -> to be used when workdays for example are monday-saturday and sunday is a holiday 7 -> to be used when workdays schedule will be used for the whole week

{
"week": "5+2"
}

@asgothian
Copy link
Collaborator

This function is not implemented due to the complex nature of the data to be sent. This will always need to be controlled by a script - adding a large number of general states to program the schedule seems overkill.

In order to program the schedule, you should be able to use the following script stub:

sendTo('zigbee.0', 'SendToDevice', {'device':'60a423fffeff37f2', 'payload':<yourpayload>}, function(res) {
   if (res.success)
    console.log("success")
   else
     console.log(res.error);
});

just replace the device ID with the correct one and with what you want to send to the “set” command as JS object with {key:value} notation. In your case, key is “schedule”, and the value is what you want to set as schedule.

A.

@amx1
Copy link

amx1 commented Oct 25, 2021

Thanks for your quick answer. I will check it and come back.

A.

@amx2203
Copy link
Author

amx2203 commented Oct 27, 2021

thank you for your recommendation. this one is working:

sendTo('zigbee.0', 'SendToDevice', {'device':'5c0272fffedc3017', 'payload':{
"schedule": {
"workdays": [
{
"hour": 6,
"minute": 0,
"temperature": 19
},
{
"hour": 8,
"minute": 0,
"temperature": 21
},
{
"hour": 18,
"minute": 0,
"temperature": 21
},
{
"hour": 20,
"minute": 30,
"temperature": 20
},
{
"hour": 22,
"minute": 0,
"temperature": 19
},
{
"hour": 23,
"minute": 0,
"temperature": 17
}
]
}
}}, function(res) {
if (res.success)
console.log("success")
else
console.log(res.error);
});

Best regards
A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants