FHEM Forum

FHEM - Hausautomations-Systeme => RFXTRX => Thema gestartet von: oliv06 am 08 Dezember 2013, 18:03:47

Titel: OWL support
Beitrag von: oliv06 am 08 Dezember 2013, 18:03:47
Hello Willi,
I have just bought an OWL micro+ energy meter, which is recognized as OWL CM180 within the RFXTRX module
I was wondering why do you include units in "energy_current" and "energy_total" readings (W and kWh), because it make them more difficult to use in calculations. For exemple, I would like to calculate average power over last period using userReadings, but it will be more complicated (at least less readable) than if there was no units.
Is it possible that you change this behavior ? It seems to me that other modules do not include units, which are only documented.
Olivier
Titel: Antw:OWL support
Beitrag von: Willi am 08 Dezember 2013, 19:08:15
Hello Olivier,

some modules use units, some don't.

I am not sure what happens when I drop units for CM180.

Who else is using the CM180?

Best seems to be to make depend from a attribute to turn units on or off. I will put this to the TODO list.
In the meantime, you may change this at 46_TRX_WEATHER.

-- Willi
Titel: Antw:OWL support
Beitrag von: oliv06 am 08 Dezember 2013, 22:45:56
Thanks Willi, I will do it in the meantime
Olivier
Titel: Antw:OWL support
Beitrag von: oliv06 am 19 Januar 2014, 12:44:37
Zitat von: Willi am 08 Dezember 2013, 19:08:15
some modules use units, some don't.

I am not sure what happens when I drop units for CM180.

Who else is using the CM180?

Best seems to be to make depend from a attribute to turn units on or off. I will put this to the TODO list.
In the meantime, you may change this at 46_TRX_WEATHER.

Hi Willi,
- Did you have time to review this improvement (attribute for units on/off) ?
- There is a unwanting warning in the log if verbose = 1 because of a typo (I think)
2014.01.19 12:24:05 1: TRX_WEATHER: name=OWL_etage device=CM180_8852 energy_total scale_total=1
Would need to change a line in 46_TRX_WEATHER.pm :
1325c1326,1327
<             Log3 $name, 1, "TRX_WEATHER: name=$name device=$device_name energy_total scale_total=".$def->{scale_total};         
---
>             #Log3 $name, 1, "TRX_WEATHER: name=$name device=$device_name energy_total scale_total=".$def->{scale_total};         
>             Log3 $name, 5, "TRX_WEATHER: name=$name device=$device_name energy_total scale_total=".$def->{scale_total};   
Titel: Antw:OWL support
Beitrag von: Markus M. am 19 Januar 2014, 15:34:39
+1 for removing it
It ends up in the VALUE field in dbLog.
FBDECT writes V, A, H, W, Wh as well - should probably be removed there, too.
Where does the value for UNIT in dbLog come from?
Titel: Antw:OWL support
Beitrag von: Willi am 30 Januar 2014, 19:40:05
- units removed on energy_current and energy_total.
- Fix for Log deployed.

Do a update tommorrow and report if it is working please.

-- Willi
Titel: Antw:OWL support
Beitrag von: oliv06 am 02 Februar 2014, 21:17:51
Thank you very much Willi, it works !

Could you also integrate the patch I proposed for chacon security sensors ? http://forum.fhem.de/index.php/topic,15040.0.html