Indeed indeedropske wrote: ↑Thursday 19 April 2018 22:37hi mate,sincze wrote: ↑Saturday 08 April 2017 23:56 I use Pass2PHP ;-0
And dump the data straight into influxdb.Code: Select all
<?php $input = ($s['Electra']); $meter = explode(";",$input); influxdb("Electra_Usage",$meter[4]); influxdb("Electra_Return",$meter[5]);
If you would use Pass2Php the function could looks like:
Code: Select all
function influxdb($device,$value) { // FAMOUS STRING REPLACEMENT UTILITY if (strpos($device, " ") !== false) { $device=str_replace(" ","_",$device); } // ENDOF FAMOUS STRING REPLACEMENT UTILITY $postdata = ("device_$device value=$value ".system('date +%s%N')); // lg('InluxDB Data: '.$postdata); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-Type:application/octet-stream', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('http://192.*.*.*:8086/write?db=domoticz', false, $context); }
long time no see :p
just wondering if you have an 'updated' version of your influx program in php?
I want to use it also, i was writing something myself, but why writing something on my own, when there is already something existing :p
You know how to reach me my friend

Actually the current setup as shown above has been working ever since. I'm totally happy with it. Something not working for you correctly?
I moved my influxdb to a spare machine and have grafana in a docker on a synology for representing the data. So the domoticz machine is not under a lot of stress..