Closed Samfox2 closed 6 years ago
@ebaauw uses something like this.hk.lastActivation = now - this.historyService.getInitialTime() but this shows in our case the same behaviour.
This is how I do too, and it works for me. Try to debug and check what is returned by getInitialTime(), if you are restoring from google drive it may take a while before the history is loaded, so few initial calls may report 0.
Did you correctly provide the get event on the lastActivation characteristics?
Have a look at my plugin here https://github.com/simont77/homebridge-myhome/blob/b437eadfab1ee9c8744cb732656adb0e6bd1cdae/index.js#L1386
Did you try another device? What does it show if you delete and re-install Eve?
Sometimes the time synchronisation between Eve and the homebridge accessory is off. Typically, you won't see new history entries either. When lucky, they can be resynchronised by deleting the history entries and restarting Eve. Otherwise you need to delete the cache Eve keeps locally by deleting and re-installing the app.
If it`s now - initialtime then it must be the cache. I will delete the app and the persistant data and try again.
It‘s working, thank you very much!
We are struggling with the reference time of the Last Activation characteristic for a fake Eve door ContactSensor.
Wiki says: seconds since last reset
However, Eve app always shows Just now for the last opening event.
@ebaauw uses something like
this.hk.lastActivation = now - this.historyService.getInitialTime()
but this shows in our case the same behavior.