Hi,
In Lua, I am trying to retrieve the KwH number for a simple cost calculation, but I just can't figure out how to!
If I look at otherdevices_svalues["NormalTariff"], I get 2 values. 1 is the current energy usage, the other is a number that seems to bear no relation to kwh used.
Can someone point me in the right direction? I am assuming I am looking in the wrong place, or the kwh is somehow derived from that second value?
Thanks.
Get Kwh value from computed energy counter
Moderator: leecollings
-
- Posts: 408
- Joined: Wednesday 26 February 2014 15:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: the Netherlands
- Contact:
Re: Get Kwh value from computed energy counter
2 is probably total energy consumption while you expect total energy consumption of today.
Maybe you can try using DzEvents.
https://www.domoticz.com/wiki/DzVents:_ ... counter.29
Maybe you can try using DzEvents.
https://www.domoticz.com/wiki/DzVents:_ ... counter.29
-
- Posts: 26
- Joined: Thursday 28 December 2017 20:51
- Target OS: Windows
- Domoticz version: 3.8153
- Contact:
Re: Get Kwh value from computed energy counter
Thanks. The simple lua script did some other things too, but I managed to re-code it in dzvents and retrieve the value with .WhToday
Who is online
Users browsing this forum: No registered users and 1 guest