simont77 / fakegato-history

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

data stream for energy / switch? #103

Closed thncode closed 3 years ago

thncode commented 3 years ago

@simont77 can you please help me with how the data stream for a custom type looks like? I am trying to port to ESP8266 and "pure" energy already works, but I do not understand how a custom type accessory communicates with the app...

simont77 commented 3 years ago

@NorthernMan54 see also this issue

NorthernMan54 commented 3 years ago

@thncode I coded custom to look at at the accessory you pass when initializing fakegato, and create a device signature based on the HomeKit services/characteristics that are part of it.

So for a Combo power/switch combo just ensure your accessory has the proper setup, then setup two separate add entry functions, one for power on a regular interval and one for switch status every time the switch changes status

thncode commented 3 years ago

@NorthernMan54 I cannot do that for now because of issue 102 Can you please help me with one example? How would the Type116 data stream look like for a custom type with power and switch? 05 0102 0202 0702 0f03 0e01 as a combined signature does not seem to be ok / enough... And btw my goal is to port to ESP8266 - I am 90% ready till now...

NorthernMan54 commented 3 years ago

The device signature logic is based on this

https://github.com/simont77/fakegato-history/issues/97#issuecomment-710420578

What you put there does not make sense

 0102: temperature x 100
 0202: humidity x 100
 0702: W x10
 0f03: ?
 0e01: on/off
thncode commented 3 years ago

so that means for switch and power it is just 0702 0e01 ? and length of that signature is 2 ?

NorthernMan54 commented 3 years ago

Yes