Grafana with InfluxDB for Domoticz
Moderator: leecollings
-
- Posts: 25
- Joined: Tuesday 29 September 2015 19:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Poland
- Contact:
Grafana with InfluxDB for Domoticz
Easy to start and implement description of running all on single device: https://blog.jokielowie.com/en/2016/11/ ... e-wykresy/
- remb0
- Posts: 499
- Joined: Thursday 11 July 2013 22:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: Grafana with InfluxDB for Domoticz
Great work! works nice..
maybe somethin to place also in our wiki?
maybe somethin to place also in our wiki?
-
- Posts: 25
- Joined: Tuesday 29 September 2015 19:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Poland
- Contact:
Re: Grafana with InfluxDB for Domoticz
Let me know where - I'll re-write it for Wiki style.
-
- Posts: 4
- Joined: Wednesday 15 June 2016 15:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Grafana with InfluxDB for Domoticz
The wiki entry https://www.domoticz.com/wiki/HttpLink explains how to integrate Domoticz with InfluxDB and Grafana. However, the information given there seems somewhat outdated.
thorian, your blog entry was very helpful to me when I recently suceeded to integrate domoticz with influxdb on my rpi 3. Thanks for sharing!
In order to install influxdb on rpi 3 I followed the instructions for Debian users given here https://docs.influxdata.com/influxdb/v1 ... tallation/ This procedure seems even more simple compared to the procedure outlined in thorian's blog entry.
thorian, your blog entry was very helpful to me when I recently suceeded to integrate domoticz with influxdb on my rpi 3. Thanks for sharing!
In order to install influxdb on rpi 3 I followed the instructions for Debian users given here https://docs.influxdata.com/influxdb/v1 ... tallation/ This procedure seems even more simple compared to the procedure outlined in thorian's blog entry.
-
- Posts: 25
- Joined: Tuesday 29 September 2015 19:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Poland
- Contact:
Re: Grafana with InfluxDB for Domoticz
Grafana is developing fast, so the entry is getting outdated. Thanks for the easier way @arraWX.
-
- Posts: 25
- Joined: Tuesday 29 September 2015 19:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Poland
- Contact:
Re: Grafana with InfluxDB for Domoticz
Checked into wiki, I think the best way would be to provide additional new entry with updated information and alternative data entry for grafana.remb0 wrote:Great work! works nice..
maybe somethin to place also in our wiki?
-
- Posts: 390
- Joined: Wednesday 30 November 2016 11:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Contact:
Re: Grafana with InfluxDB for Domoticz
Hey Guys,
I just ran into this topic and seems promising. I was looking for something like this to create a dashboard for having a Live look at my power usage, tempeature etc.
i managed to install influx en grafana but as mentioned above the Wiki is a bit outdated. I am having trouble with setting up domoticz and being able to actually send data to influx. is there a chance someone can help me out?
thanks in advance!
I just ran into this topic and seems promising. I was looking for something like this to create a dashboard for having a Live look at my power usage, tempeature etc.
i managed to install influx en grafana but as mentioned above the Wiki is a bit outdated. I am having trouble with setting up domoticz and being able to actually send data to influx. is there a chance someone can help me out?
thanks in advance!
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Grafana with InfluxDB for Domoticz
I'm very happy with the possibilities of Influx and Grafana.
General overview Monitor the CV Monitoring Ziggo
General overview Monitor the CV Monitoring Ziggo
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 22
- Joined: Monday 15 December 2014 23:39
- Target OS: Windows
- Domoticz version: 2.3674
- Location: Weert, Netherlands
- Contact:
Re: Grafana with InfluxDB for Domoticz
Just out of curiosity, How did you manage to implement the Ziggo speedtest into grafana ?sincze wrote:I'm very happy with the possibilities of Influx and Grafana.
General overview Monitor the CV Monitoring Ziggo
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Grafana with InfluxDB for Domoticz
I found the instructions somewhere here in the forum and thought it was a nice feature.Jeff wrote:Just out of curiosity, How did you manage to implement the Ziggo speedtest into grafana ?sincze wrote:I'm very happy with the possibilities of Influx and Grafana.
General overview
Grafana.JPG
Monitor the CV
Grafana-OTGW.JPG
Monitoring Ziggo
Grafana-Ziggo.JPG
https://www.domoticz.com/wiki/Bash_-_Sp ... monitoring
And I just read the file that is creates.
After retrieving the data from the file it is just as any other value. Dump it into InfluxDB and access via Grafana.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 390
- Joined: Wednesday 30 November 2016 11:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Contact:
Re: Grafana with InfluxDB for Domoticz
Hi Jeff and sincze,
is there a chance you are able to help me out showing my P1 meter data in Grafana?
I already have everything up and running, within domoticz it works perfectly but I can't seem to get it to work in Grafana.
I am using Grafana in combination with Influx.
Thanks!
oh yeah, I also saw the wiki being outdated perhaps this might help.
create database and setup domoticz
is there a chance you are able to help me out showing my P1 meter data in Grafana?
I already have everything up and running, within domoticz it works perfectly but I can't seem to get it to work in Grafana.
I am using Grafana in combination with Influx.
Thanks!
oh yeah, I also saw the wiki being outdated perhaps this might help.
Code: Select all
sudo apt-get update
sudo apt-get upgrade
Install INFLUXDB
wget https://repos.influxdata.com/debian/pool/stable/i/influxdb/influxdb_1.2.1-1_armhf.deb
sudo dpkg -i influxdb_1.2.1-1_armhf.deb
-- start the service
sudo service influxd start
-- run the CLI
influx
install GRAFANA (only for raspberry pi 2 and pi 3)
sudo apt-get install adduser libfontconfig
curl -L https://github.com/fg2it/grafana-on-raspberry/releases/download/v4.0.1/grafana_4.0.1-1480722482_armhf.deb -o /tmp/grafana_4.0.1-1480722482_armhf.deb
sudo dpkg -i /tmp/grafana_4.0.1-1480722482_armhf.deb
sudo apt-get update
sudo apt-get install grafana
to start Grafana:
sudo /bin/systemctl start grafana-server
-
- Posts: 9
- Joined: Tuesday 14 February 2017 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Grafana with InfluxDB for Domoticz
The InfluxDB data push on Domoticz is broken, dates do not load correctly in InfluxDB, putting them out of range and resulting in empty charts in Grafana even though it has a connection with the database.
Don't waste your time trying to get this to work until the data push is fixed.
Don't waste your time trying to get this to work until the data push is fixed.
-
- Posts: 390
- Joined: Wednesday 30 November 2016 11:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Contact:
Re: Grafana with InfluxDB for Domoticz
Hi, I checken the outcome in domoticz and grafana with influx seem to work fine. I believe it's a matter of configuration. How do you know it's broken?grubstake wrote:The InfluxDB data push on Domoticz is broken, dates do not load correctly in InfluxDB, putting them out of range and resulting in empty charts in Grafana even though it has a connection with the database.
Don't waste your time trying to get this to work until the data push is fixed.
Sent from my iPhone using Tapatalk
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Grafana with InfluxDB for Domoticz
It should still be possible with httplink right?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 390
- Joined: Wednesday 30 November 2016 11:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Contact:
Re: Grafana with InfluxDB for Domoticz
In the latest domoticz version the influx data push option is not there anymore. I am running on 3.5877. I used the option with httplink and it works indeed
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Grafana with InfluxDB for Domoticz
in the beta 3.7266 inflixdb is available.
However currently I am not using it.
Last time I used it it was still working. So currrently can not confirm nor deny the functionality.
However currently I am not using it.
Last time I used it it was still working. So currrently can not confirm nor deny the functionality.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 390
- Joined: Wednesday 30 November 2016 11:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Contact:
Re: Grafana with InfluxDB for Domoticz
@ Sincze, are you also using a seperate query to generate info from influx to Grafana ? Still no luck with the power graphs from the smart meter. Grtz
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Grafana with InfluxDB for Domoticz
I use Pass2PHP ;-0
And dump the data straight into influxdb.
If you would use Pass2Php the function could looks like:
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);
}
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 390
- Joined: Wednesday 30 November 2016 11:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Contact:
Re: Grafana with InfluxDB for Domoticz
This might actually be solution. Would like to try it but am not really familiar with using these scripts in domoticz. Can you let me know how to set this up? would like to try it and compare it with the httplink output.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Grafana with InfluxDB for Domoticz
No worries. we started a thread here: https://www.domoticz.com/forum/viewtopic.php?t=12343
Requires some patience however... no more "script ... over 10 seconds... " messages in your domoticz log. This really speeds up domoticz bigtime. Especially if you have complicated scripts (example: show ip camera on all devices that are switched on in your home when doorbell is pressed and send images via telegram to the mobile phones of the family members)..
Requires some patience however... no more "script ... over 10 seconds... " messages in your domoticz log. This really speeds up domoticz bigtime. Especially if you have complicated scripts (example: show ip camera on all devices that are switched on in your home when doorbell is pressed and send images via telegram to the mobile phones of the family members)..
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Who is online
Users browsing this forum: No registered users and 0 guests