You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While chasing my tail on adding support to set and read back the time zone UTC offset in #63, I discovered that the _set_option method, as currently implemented, is only safe for firmwares 2.1.9 and above. The reason is: the syntax for the /co API had a breaking change in firmware 2.1.9:
Major Changes
Compared to previous firmwares, some of the major changes in this firmware that affect the APIs include:
● Changing of option values (/co) now supports using JSON names. The previous way of using option index is no longer supported.
Prior to firmware 2.1.9, the /coChange Option API endpoint used a different syntax (e.g. 2.1.8 API manual):
Instead of JSON variable names, each option was numbered with an index, like o1 instead of tz for Time Zone, or o23 instead of wl for Water Level.
In those o?? firmwares, several options are highlighted in the API spec as boolean options which are set or cleared on every/co call, by whether or not they are present in the query string at all. (Value can be absent and is ignored... just presence = true, absence = false.)
So for the existing set_water_level routine: if we call that on a controller running older firmware than 2.1.9, not only will it not set the water level (since it is passing wl=<value> instead of o23=<value>, but 🐛 we'll actually be clearing options like o3 "Use DHCP"
So this issue is to either disable the _set_option routine for the older firmwares, OR, to build in proper support to use /co safely on those versions.
The text was updated successfully, but these errors were encountered:
While chasing my tail on adding support to set and read back the time zone UTC offset in #63, I discovered that the
_set_option
method, as currently implemented, is only safe for firmwares 2.1.9 and above. The reason is: the syntax for the/co
API had a breaking change in firmware 2.1.9:Prior to firmware 2.1.9, the
/co
Change Option API endpoint used a different syntax (e.g. 2.1.8 API manual):o1
instead oftz
for Time Zone, oro23
instead ofwl
for Water Level.o??
firmwares, several options are highlighted in the API spec as boolean options which are set or cleared on every/co
call, by whether or not they are present in the query string at all. (Value can be absent and is ignored... just presence = true, absence = false.)So for the existing
set_water_level
routine: if we call that on a controller running older firmware than 2.1.9, not only will it not set the water level (since it is passingwl=<value>
instead ofo23=<value>
, but 🐛 we'll actually be clearing options likeo3
"Use DHCP"So this issue is to either disable the
_set_option
routine for the older firmwares, OR, to build in proper support to use/co
safely on those versions.The text was updated successfully, but these errors were encountered: