Homey Community Forum

[APP][Pro] Power by the Hour: Insights per hour, day, month and year

Since firmware 5 Athom thought it wise to change the time that apps see to UTC. So that is probably why.

Mmh yes… I will check it out. Again a problem that is making the app logic complicated.

Thx for staying up this late and reporting :yawning_face:

Thank you.
Just discovered another thing. Could be relevant. I have set up loging from your app, using the Simple Log app. And funny thing. When I export the log, the time-stamps seem to adjust an hour back.
So I tried to log kwh prev. day at 00:00. And when i export the log the timestamp changes to 23:00.

I just uploaded a new version 3.1.0 of the app.

  • Fixed time zone offset.
  • Updated driver/device/capability icons.

I know that this app does not support devices without a meter_power capability, and unfortunately quite a few devices can measure power, but lacks the accumulation feature.

Are there any apps that can create a virtual device that can take power measurements from such a device and accumulate to a meter_power property which can be used by PBTH?

It would not be as good as a device which logs and stores this internally, but it might still be good enough for some purposes. It would basically have to trigger at every received power measurement, and create a timestamp. When the next measurement is received, it could calculate and aggregate the energy by looking at the time difference between the measurements and the value. I know something like this is available for Home Assistant:

This uses the Riemann sum, which gives a better approximation than the simplest approach outlined above.

@Gruijter I understand that you are not interested in adding such functionality into PBTH natively, right?

Adding a virtual device that uses measure_power (watts, not kWh) would theoretically be possible. But it would always be ‘handicapped’ since the kWh would be estimated from the actual power usage. Over time this will always lead to a significant offset of the kWh meter.

It definitely does not have any priority with me because it would extend the scope of my app. Maybe next year if I have spare time left. But in the mean time anyone is welcome to add a driver via a Github pull request.

I agree it would be less accurate, but it would still be useful, I think.

I have just started with Homey, and I don’t really know Javascript or Node.js, but I do work with programming, so if I am able to do this myself, I might try. I wonder if something like this could be achieved with homeyscript, at least as an experiment. Having a proper driver would of course be much better.