magico13 / PyEmVue

Python Library for the Emporia Vue Energy Monitor
MIT License
185 stars 36 forks source link

GetDevicesUsage only returning Null #16

Closed magico13 closed 3 years ago

magico13 commented 3 years ago

Example API call: https://api.emporiaenergy.com/AppAPI?apiMethod=getDevicesUsage&deviceGids=1234+3456&instant={{$isoTimestamp}}&scale=1S&energyUnit=KilowattHours

returns

{
    "channelUsages": [
        {
            "deviceGid": 1234,
            "channelNum": "1,2,3",
            "usage": null
        },
        {
            "deviceGid": 3456,
            "channelNum": "1,2,3",
            "usage": null
        }
    ]
}

As a result this is breaking the home assistant integration. Most likely related to the new app update and other recent API changes. Will have to see if this call is still supported or if there's a new call that should be used for this method.

Interestingly the home screen of the app is also not displaying this info correctly, only showing historical data. Could be an issue purely on their side.

magico13 commented 3 years ago

Further research, this is only happening for the 1 second data in the recent past. Historical data is working and 1 minute and higher timescales seem ok. Going to wait a bit to see what happens, I've seen similar issues in the past when they rolled out the new graph api calls.

magico13 commented 3 years ago

Of course as I said that now it appears to be working correctly. Will keep monitoring.