simont77 / fakegato-history

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

Need a bit of help with contact sensor #69

Closed mrose17 closed 5 years ago

mrose17 commented 5 years ago

first, i'm a fan of this package!

second, i lack some clue and i'm hoping that someone can fix that. starting at https://github.com/homespun/homebridge-accessory-apcupsd/blob/master/index.js#L424

i know that addEntry is being called (i see over 220 entries in the persistance file), bu nothing ever shows for data:

img_3f2c2d900866-1

what am i missing?

thank you!

simont77 commented 5 years ago

Eve is very selective in recognizing the history. Since you want a “door” history you need to replicate as much as possible the custom characteristics for Eve door (see wiki or library from @ebaauw). Also, it may be possible that Eve does not like to have characteristics present in Eve Energy is the same accessory with a “door” history. Finally, check that you are not using forbidden characters in serial number and accessory name (see readme)

mrose17 commented 5 years ago

thanks!

i'll work on getting in all the door characteristics.

the serial number is probably pretty good, e.g., "5B1325T16968". the firmware revision is kind of odd, e.g., "871.O2 .I USB FW:O2" i think i'll shorten that to "871" (that's an "oh-two", not a "zero-two").

mrose17 commented 5 years ago

thanks for the help. https://github.com/homespun/homebridge-accessory-apcupsd/commit/341f7d5f518ee8e34423adfb56075067202c37f2 seems to work now. i'm going to turn the energy history back on and see if it interferes or not.

simont77 commented 5 years ago

I believe that you cannot have two different history types on the same accessory, the characteristics used to manage history are the same for all the history types.

ebaauw commented 5 years ago

Indeed, I tried multiple history services (with different subtypes) on the same accessory, but no joy. For the Hue motion sensor, which provides both motion and temperature, I ended up creating a separate accessory for the temperature to get history on both.

mrose17 commented 5 years ago

@ebaauw - yes, that's been my experience too. you get at most one history. perhaps i should rewrite https://github.com/homespun/homebridge-accessory-apcupsd as a platform plugin. i need to think about that.

btw - nice homebridge-lib repository... i really ought to submit a PR to you to include the types missing from https://github.com/homespun/hap-nodejs-community-types !!