FHEM Forum

FHEM => English Corner => Thema gestartet von: jussi.peltoniemi am 14 Juli 2015, 13:30:28

Titel: How Can I use HourCounter together with EIB and PRESENCE
Beitrag von: jussi.peltoniemi am 14 Juli 2015, 13:30:28
I want to use HourCounter for EIB devices to make statistics and calculation.
I also want to use HourCounter with PRESENCE to make statistics and calculation for example how many hours computer is running or how many hours mobile phone is in home.

Example in wiki is not clear enough.
I do not understand onoff.
EIB and PRESENCE do not have onoff
EIB and PRESENCE have state that should trigger HourCounter.
How can I do that?

For example I have this EIB definition
define Ovi_kosketin_paaovi EIB 1/0/205
define FileLog_Ovi_kosketin_paaovi FileLog ./log/Ovi_kosketin_paaovi-%Y.log Ovi_kosketin_paaovi

I tried these definitions but I do not see any changes in HourCounter countsOverall.
It is always zero.

define Ovi_kosketin_paaovi_counter HourCounter Ovi_kosketin_paaovi:onoff:.on EIB:Ovi_kosketin_paaovi:onoff:.off
#define Ovi_kosketin_paaovi_counter HourCounter Ovi_kosketin_paaovi:state:.on EIB:Ovi_kosketin_paaovi:state:.off
attr Ovi_kosketin_paaovi userReadings onoff {(ReadingsVal("Ovi_kosketin_paaovi","state","on") = "on")?1:0;;}


Titel: Antw:How Can I use HourCounter together with EIB and PRESENCE
Beitrag von: fruit am 14 Juli 2015, 19:25:34
It's not something I've tried but a search for presence gplot brings up some links that may be useful as a start, at least describing how to get a value from a gplot file