simont77 / fakegato-history

Module to emulate Elgato Eve history
MIT License
167 stars 15 forks source link

Thermo schedule #40

Open rooi opened 6 years ago

rooi commented 6 years ago

Hi,

Any chance you’re able to decode the thermo schedule format? I’ve included the data from your example and it show nice schedules for regular, bathroom and basement. It would be nice to add honeywell evohome’s schedule in there.

Thx!

simont77 commented 6 years ago

Unfortunately I’ve not spent too much of my (limited) time on that. It seems that there is a fixed number of possible schedule change per day, those not used are set to 0xFF, and then this pattern is repeated for the 7 days. You may try changing the data that I passed you and see what happens. This is apparently to read schedule from the accessory. It is completely unclear how to write it, though.

llemtt commented 6 years ago

Evo app writes the schedule, the thermo is supposed to implement and respond with the same data if successful.

I'm not into it a lot because the app won't let you program individual days, anyway Evo app sends "ff04f6" for schedule off and "001301f4241a24fc360e1f0112fa2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff1a2472ffffffffffff" for "basement" setting.

Consider that bytes 8-13 are T&D so they change at each request.

simont77 commented 6 years ago

so Eve writes on 12C and the Accessory answers with the current schedule on 12F (i.e. that in its memory if Eve sent OFF schedule, or the one Eve's just sent for an active schedule)?

llemtt commented 6 years ago

Yes

tobekas commented 4 years ago

Some information about the Thermo schedule:

Custom characteristics E863F12F (ProgramData), E863F12C (ProgramCommand) are used to handle data transfer between Eve App and the accessory. The App writes to E863F12C (ProgramCommand) and the accessory answers with E863F12F (ProgramData).

A typical command for setting up the default bathroom schedule is:

001301f426262efc370b1b0b131a2a426c84fffffffffa1e336c7effffffff1e336c7effffffff1e336c7effffffff1e336c7effffffff1e336c7effffffff2a426c84ffffffff2a426c84ffffffff06

This command is divided into several single commands, starting with an OpCode and followed by some bytes (length depends on the OpCode).

In this case:

Each program (8 byte section) contains the individual switching times in 10-minute steps. For example 1e336c7effffffff means:

Other commands:

Status value in ProgramData: The current status must be reflected in E863F12F (ProgramData), but without the leading 00 (!) and some small discrepancies. The NOTIFY event is not used to send data back to the App. Eve App is using GET request right after the SET request to read back data.

A typical status value for for a disabled default schedule could be:

12e7130014c01900fffc2c0c1b0b13f41010222af60000001a24366684fffffffffa24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff

In this case:

Other status values:

tobekas commented 4 years ago

I added a Pull Request: #80

n0rt0nthec4t commented 2 years ago

@tobekas did you get anywhere with finding how to set the valve protection from Status value in ProgramData?? Seems just returning "1101" doesn't show an enabled setting for it and invalidates the remaining entires in the string

tobekas commented 2 years ago

Hm, it was a while ago… but no. Sorry. Could not find out what to return for valve protection etc.