simont77 / fakegato-history

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

history energy monitor. #73

Open oremic opened 5 years ago

oremic commented 5 years ago

hi EVE energy What do you use as features to get the consumption chart, do you need a start date ?? or continue ?? How to solve it. thank you Project and, total cost original, graph 59893065_327800631244050_4401598874259554304_n

ebaauw commented 5 years ago

You need to expose the ResetTotal characteristic (UUID 112) and initialise it to the current time minus the epoch:

moment().unix() - moment('2001-01-01T00:00:00Z').unix()

Is this a new model of the Eve Energy? What firmware does it report? I haven't seen the Schedule characteristic before, nor the ON FOR 6M and the little drop-down triangle of Power. My EU Eve Energy plugs are on 1.3.1 (466), and I don't see any new firmware in Eve 3.6.2 (1576).

I'm afraid, this is a new history scheme, and we need to dump how it communicates with the Eve app, as described here. Not sure if HMCatalog still compiles on the latest versions of XCode, with Swift v4 or v5.

oremic commented 5 years ago

You need to expose the ResetTotal characteristic (UUID 112) and initialise it to the current time minus the epoch:

moment().unix() - moment('2001-01-01T00:00:00Z').unix()

Is this a new model of the Eve Energy? What firmware does it report? I haven't seen the Schedule characteristic before, nor the ON FOR 6M and the little drop-down triangle of Power. My EU Eve Energy plugs are on 1.3.1 (466), and I don't see any new firmware in Eve 3.6.2 (1576).

I'm afraid, this is a new history scheme, and we need to dump how it communicates with the Eve app, as described here. Not sure if HMCatalog still compiles on the latest versions of XCode, with Swift v4 or v5.

thanks set

Start of day: | 978307200 | Monday 1 January 2001 00:00:00 uint32 value 978307200

oremic commented 5 years ago

Set E863F112 homekit_characteristic_t time_init = HOMEKITCHARACTERISTIC(ResetTotal, 978307200); @ebaauw The historian does not leave me. Do I have to send anything beyond the reset?

IMG_4607

simont77 commented 5 years ago

The history is not erased by Reset Total. This Characteristic is only to tell your accessory to reset its totaliser, and pass the time of the reset so that other iOS device can know it. If you want to delete history you have to:

oremic commented 5 years ago

i'm sorry for my english.. i mean that using Eve i can't see any graphics o historical data in Eve energy section. Thanks a lots

ebaauw commented 5 years ago

You need to set the characteristic to the number of seconds elapsed since 2001/01/01, not to the unix representation of that date. You've set the reset time far in the future, so Eve won't display history events from the present.

$ node
> const moment=require('moment')
undefined
> moment('2001-01-01T00:00:00Z').unix()
978307200
> moment().unix() - moment('2001-01-01T00:00:00Z').unix()
583430029
oremic commented 4 years ago

Ok... but ho Eve get historical data from accessory? using same carateristics? or another? How Eve ask this data? Tnks, oremic

ebaauw commented 4 years ago

See the Wiki: https://github.com/simont77/fakegato-history/wiki/Elgato-Eve-History-Protocol