FHEM Forum

FHEM => Codeschnipsel => Thema gestartet von: Fuzzy am 04 März 2013, 08:49:25

Titel: EmonCMS logger
Beitrag von: Fuzzy am 04 März 2013, 08:49:25
Hi,

I have created a simple logger that sends readings to EmonCMS (http://emoncms.org/ (//emoncms.org/)).  This is an open-source cloud service for visualizing energy data.
Syntax:  define <name> EmonCMSLog YOURAPIKEY regexp
Log everything to EmonCMS:


define myLog EmonCMSLog YOURAPIKEY .*:.*


Br,
Peter
Titel: Antw:EmonCMS logger
Beitrag von: oliv06 am 09 Dezember 2013, 22:32:21
Thank you very much for your module which is very useful :)
I changed it a little :

1/ remove the following line which breaks fhem if you click on the EmonCMSLog link to get details on the fhem Web frontend
$hash->{GetFn}    = "EmonCMSLog_Get";

2/  Change the syntax in order to be able to use any emoncms instance (I myself installed emoncms on a hosted web server)
Syntax:  define <name> EmonCMSLog baseURL YOURAPIKEY regexp

3/ Change debuging log : I do not know why but Log 5, $emon_url; does not write into the log if I change the verbose level to 5 in the EmonCMSLog instance definition, while the following is ok : Log3 $dev->{NAME}, 5, "EmonCMSLog : $emon_url";

Olivier
Titel: Antw:EmonCMS logger
Beitrag von: oliv06 am 17 Dezember 2013, 20:24:23
Bug (mine) correction : verbose attribute was not working properly.
Titel: Antw:EmonCMS logger
Beitrag von: oliv06 am 25 Juni 2014, 22:31:02
This version uses non blocking HTTP calls