Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history energy monitor. #73

Open
oremic opened this issue Jun 9, 2019 · 8 comments
Open

history energy monitor. #73

oremic opened this issue Jun 9, 2019 · 8 comments

Comments

@oremic
Copy link

oremic commented Jun 9, 2019

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
Copy link
Contributor

ebaauw commented Jun 9, 2019

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
Copy link
Author

oremic commented Jun 21, 2019

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
Copy link
Author

oremic commented Jun 28, 2019

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

IMG_4607

@simont77
Copy link
Owner

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:

  • delete it manually from Eve
  • delete the fakegato persist file if you are using it.

@oremic
Copy link
Author

oremic commented Jun 28, 2019

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
Copy link
Contributor

ebaauw commented Jun 28, 2019

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
Copy link
Author

oremic commented Jul 12, 2019

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

@ebaauw
Copy link
Contributor

ebaauw commented Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants