-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Aqara SRTS-A01 smart schedule #5058
Aqara SRTS-A01 smart schedule #5058
Conversation
Thanks a lot for your effort! Really hope this PR makes it through. Have you been able to work out how |
Unfortunately not. I expected some dependencies, e.g., that the |
@protyposis This PR seems to be stuck same as #4763.
Im willing to test this if that will unblock this effort. |
@itsSaad this PR is only about the schedule. Please discuss unrelated features elsewhere, e.g. in Koenkk/zigbee2mqtt#13993. |
@protyposis Im not discussing those but just mentioned them. My comment was mainly to offer help. |
# Conflicts: # devices/xiaomi.js
devices/xiaomi.js
Outdated
'When being ON, the thermostat will change its state based on your settings', | ||
ea.ALL, 'ON', 'OFF'), | ||
exposes.text('schedule_settings', ea.ALL) | ||
.withDescription('Smart schedule configuration (also exposed as JSON object through "schedule_settings_json")'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an example to the description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
lib/xiaomiTrvUtils.js
Outdated
@@ -0,0 +1,233 @@ | |||
function readTemperature(buffer, offset) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this file into
zigbee-herdsman-converters/lib/xiaomi.js
Line 864 in 8be00cc
const trv = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved
@protyposis I left two minor comments, after that it is ready for merge. Can you also fix the merge conflict? |
Thanks! |
Add smart scheduling support for Aqara Smart Radiator Thermostat E1 (SRTS-A01). This is a refactored and improved version of the stale #4763.
This adds the following:
schedule
: A toggle to turn on/off the smart schedule.schedule_settings
: A string representation of the schedule settings. Example (default):mon,tue,wed,thu,fri,sat,sun|8:00,24.0|18:00,17.3|23:00,22.0|8:00,22.0
I tried to expose the schedule as a configuration object which can be nicely managed through the frontend, but this is currently not possible due to various limitations (see discussion in #5058 (review)). Exposing it as a string is a first step to figure out if this is even useful.
A schedule consists of a selection of weekdays and exactly 4 events that set a specific temperature at a specific time. The temperatures of the first 3 events are those that can be controlled in the Aqara app, the last one is always set to the previous one in the Aqara app. I decided to explicitly expose it anyway, but I don't know if it's interpreted by the TRV.
I have successfully tested reading and writing the settings, and made sure the written data corresponds exactly to the factory-set data. However, I have not tested whether the schedule is actually executed by the TRV, i.e., if it actually works.