cyr-ius / cozytouchpy

Cozytouch python implementation
GNU General Public License v3.0
12 stars 7 forks source link

Pilot Wire Interface - Enable Prog mode #6

Open gbraux opened 4 years ago

gbraux commented 4 years ago

Hello, and thx for moving-on biker91620 nice initial job !

Just to let you know that the Cozytouch API has a strange behaviour when it comes to setting operating mode of Pilot Wire Interfaces (I have a few of them at home).

On a "standard" cozytouch enabled heater, you basicaly set the operating mode (Auto, Basic, Prog ...). If you defined Basic, you can then set the heating level (Confort, etc ...).

Strangely, Pilot Wire Interface does not implement the operating mode API (!) so the cozytouch App only leverage Heating levels (off, confort, eco ...). Fair enough, it does the job ... The main question is then ... how do we enable prog mode for those Pilot Wire Interfaces as there is no direct API to set te operating mode ! As such, as of today, it is not possible to enable PROG on a Pilot Wire Interace through your library ...

The crazy thing that the cozytouch guys have done on the app to overcome that is that when you set a Pilot Wire Interface from OFF to PROG for instance ... they just re-POST (PUT) the full prog schedule to the server (a big big json !), that looks to trigger PROG to on.

When I enable prog mode a Pilot Wire Interface through the app, I see this, and nothing else --> PUT /enduser-mobile-web/enduserAPI/setup/calendar/ruleSet HTTP/1.1 (application/json)

Attaching an uncrypted PCAP capture for your convinience when I was switching between the modes for Pilot Wire Interfaces in the cosytouch iOS app (as far as I remember, I did a OFF, then moved to BASIC/CONFORT, then to PROG).

proxy-200330-222640.zip

Thinking our loud, but if there is a way to get the schedule from the server, enabling prog mode for Pilot Wire Interfaces then could be achievable on your library by just posting it back when prog mode is asked ...

Just my basic feedback on that complex as hell API ! Guillaume.