parnic / node-screenlogic

Pentair ScreenLogic Javascript library using Node.JS
https://www.npmjs.com/package/node-screenlogic
MIT License
52 stars 14 forks source link

History messages #47

Closed alpha-se closed 3 years ago

alpha-se commented 3 years ago

Anybody got any luck/experience with history messsages?

From what I figured out looking at the android apps comms: Sending a 12534 type requests history events. Format is: Int32(0), DateTime(start), DateTime(end) with DateTime encoded as: Uint16(year), Uint16(month), Uint16(Day of week, can be ignored/0), Uint16(day), Uint16(hour), Uint16(minute), Uint32?(seconds)

It'll come back with an empty 12535.

It then send a (very long) message 12502 with the format:

Uint32(Number of events) for (event in number events): DateTime(event timestamp) Uint32(Outside Temperature)

So basically so far I've been able to get the outside temperature read out, but I have no clue how to figure out when the pump/heater/light was on. Anyone any idea?

alpha-se commented 3 years ago

Nevermind, figured it out: I stopped reading after the first #of events, it keeps going through others though.

mikemucc commented 3 years ago

@alpha-se Are you planning to do a PR to add a getHistory call? That would be awesome!