simont77 / fakegato-history

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

History Graphs are not shown since Eve app update #76

Closed sschuste closed 4 years ago

sschuste commented 4 years ago

My Eve app has been updated to v3.8.1 and no longer displays history graphs. Is this a problem to be solved by the EVE developers or by you?

DJay-X commented 4 years ago

@simont77 Same problem here after updating to Eve App v3.8.1 Any help is much appreciated. đź‘Ť

kotashiratsuka commented 4 years ago

same problem

ebaauw commented 4 years ago

A far as I can tell, the history protocol itself hasn’t changed, but the Eve app is way more restrictive on what the accessory should look like, before it shows history:

To answer your question: neither, by the plugin developers.

simont77 commented 4 years ago

I’m away from my PC and with limited internet connection, so I cannot do any test. The update to Eve is a minor release and no firmware update are indicated in the change log, so I would suggest you to try to delete the history from Eve, and, if it doesn’t work, to completely reinstall Eve.

simont77 commented 4 years ago

Seems ebaauw has already investigated much more...

simont77 commented 4 years ago

Maybe Eve is more strict on the “fingerprint” as discovered by @stefdude? @ebaauw, what about your combined temperature and plug accessory? Right now fakegato weather probably REQUIRES pressure and humidity, and power REQUIRES outlet

ebaauw commented 4 years ago

Oddly, the temperature / on/off hack still works. My current hypothesis is that the Eve app wants to see the correct service and characteristic(s) for each data type in the history fingerprint. I plan to do some more rigorous testing this weekend.

Samfox2 commented 4 years ago

Combined sensor with temp/humidity/air quality also still working...

sieren commented 4 years ago

I took a quick look at this yesterday (incl. the repos that are using fakegato that are still working). Everything points towards Eve being more restrictive. However, since all of this is publicly accessible, nothing would stop someone from re-implementing this in a separate app.

It's a shame though Eve is so restrictive about this :/ After all it's just the maker community that's using this and it wouldn't necessarily dig into their overall sales.

simont77 commented 4 years ago

@ebaauw if you are right it should be possible to fix custom services with consumption only by changing the signature and data portion in fakegato to advertise and send only consumption (should be 0702 section of the current signature). For Energy I did not have a full dump, and it was really an hack over the Room protocol, so it may well be not properly formatted as @stefdude discovered.

simont77 commented 4 years ago

If that works, it should be possible to add a Temp-only fakegato type advertising and sending only temperature (0102 signature). Any help is appreciated as I’m away from PC for one more week, but I can accept PR. I will make a new branch fix-signature for that.

Samfox2 commented 4 years ago

Would temp+humidity-only also be possible?

dpecile commented 4 years ago

You can use EVE for IOS 10, until someone can find a fix. (and disable automatic application updates).

ebaauw commented 4 years ago

If that works, it should be possible to add a Temp-only fakegato type advertising and sending only temperature (0102 signature).

No, that doesn't work.

I did find a hack to expose only temperature history, using the regular weather history, see #75.

Would temp+humidity-only also be possible?

Yes, using the same hack.

simont77 commented 4 years ago

Did you make some test also for the consumption-only service?

ebaauw commented 4 years ago

Did you make some test also for the consumption-only service?

No, not yet.

stef commented 4 years ago

@simont77 when you write @stef then you uselessly invoke me, not the person you wanted to tag.

simont77 commented 4 years ago

@ebaauw, I made some test. For power consumption the signature scheme suggested by @stefdude decoding works:

In this way only power is sent and expected. However Eve still needs the Outlet service to show the history. The good news is that Outlet service can be added to the accessory together with a custom Consumption service (i.e. it is not necessary to add Custom Eve characteristics to standard Outlet service), so for pure PowerMeter accessory the Outlet could be hidden in Eve, and the powermeter accessory remains visible.

simont77 commented 4 years ago

Summarizing, some adjustment are required in the plugins using fakegato:

Samfox2 commented 4 years ago

Sorry, I am really struggling with the adjustments for a combined temp/humi sensor. This is what I did before but I like to remove the air pressure:

    Service.FakeGatoHistoryService = require('fakegato-history')(homebridge);
    inherits(Service.FakeGatoHistoryService, Service);
    Service.FakeGatoHistoryService.UUID = 'E863F007-079E-48FF-8F27-9C2605A29F52';`
... 
loggingService = new Service.FakeGatoHistoryService(accessory.context.logType, accessory, { storage: 'fs', path: this.localCache, disableTimer: false });
...
... 
case "weather:"
                this.log.debug("Temp: %s Press: %s Humi: %s",
                    accessory.context.cacheCurrentTemperature,
                    accessory.context.cacheCurrentAirPressure,
                    accessory.context.cacheCurrentRelativeHumidity);
                accessory.context.loggingService.addEntry({
                    time: moment().unix(),
                    temp: parseFloat(accessory.context.cacheCurrentTemperature),
                    pressure: parseFloat(accessory.context.cacheCurrentAirPressure),
                    humidity: parseFloat(accessory.context.cacheCurrentRelativeHumidity)
                });
                break;
...

Where do I have to change the signature? Would it be possible to provide an example snipplet?

simont77 commented 4 years ago

I’m copying from ebaauw message:

So the recipe for a temperature sensor is:

Expose a Weather service with only a Current Temperature characteristic; Expose a regular Temperature Sensor service; Expose a regular weather History service (with fingerprint 03 0102 0202 0302).

And for a temperature/humidity sensor:

Expose a Weather service with only a Current Temperature characteristic; Expose a regular Temperature Sensor service; Expose a regular Humidity Sensor service; Expose a regular weather History service (with fingerprint 03 0102 0202 0302).

You don’t need to change any signature

simont77 commented 4 years ago

You could also try to expose a Weather service with Current Temperature AND Humidity Characteristics (i.e. no pressure), and a regular Weather History service.

ebaauw commented 4 years ago

That’ll show as unsupported in Apple’s Home app.

Samfox2 commented 4 years ago

Maybe creating a hidden pressure service is also working.

DoTTi72 commented 4 years ago

With App version 3.8.3, the history graph is back!

ebaauw commented 4 years ago

Indeed. Eve once again shows history for an accessory and single Temperature Sensor service, as well as an accessory with Temperature Sensor and Humidity Sensor_ service. The hack with the Weather service seems no longer needed.

sschuste commented 4 years ago

Okay, I guess we all had our fun and the party's over now, right? However, this is a good moment to thank everyone for your effort and most of all @simont77 for his nice piece of software đź‘Ť