domoticz, influxdb and grafana

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: domoticz, influxdb and grafana

Post by mlamie »

Can the wiki page be of any help?
https://www.domoticz.com/wiki/HttpLink
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
hrikken
Posts: 2
Joined: Sunday 12 February 2017 20:37
Target OS: -
Domoticz version:
Contact:

Re: domoticz, influxdb and grafana

Post by hrikken »

Use node-red and mqtt. Works perfect.


Verzonden vanaf mijn iPhone met Tapatalk Pro
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: RE: Re: domoticz, influxdb and grafana

Post by sincze »

mlamie wrote:Can the wiki page be of any help?
https://www.domoticz.com/wiki/HttpLink
I also followed the wiki and had the same results. Image no data points

Sent from my SM-G925F using Tapatalk
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.
fergalom
Posts: 74
Joined: Thursday 24 September 2015 11:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz, influxdb and grafana

Post by fergalom »

seems to be a new specific data push to InfluxDB in the latest betas - same location as the http / fibarolink data push
kiwi
Posts: 14
Joined: Thursday 28 January 2016 13:41
Target OS: Linux
Domoticz version:
Contact:

Re: domoticz, influxdb and grafana

Post by kiwi »

Hum Influxdb is really pretty cool. Really I'd would like to have the option to send all data to InfluxDB instead of choosing all things, one per one... :/
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: RE: Re: domoticz, influxdb and grafana

Post by sincze »

sincze wrote:
mlamie wrote:Can the wiki page be of any help?
https://www.domoticz.com/wiki/HttpLink
I also followed the wiki and had the same results. Image no data points

Sent from my SM-G925F using Tapatalk
A finally:
http://localhost:8086/write?db=domoticz ... ecision=ms

Gives me results in influxdb no more nasty 400 error messages. :D
Grafana3.png
Grafana3.png (124.35 KiB) Viewed 5947 times
Grafana2.JPG
Grafana2.JPG (75.9 KiB) Viewed 5947 times
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.
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: domoticz, influxdb and grafana

Post by mlamie »

sander815 wrote:yes, followed wiki also, no data point

but i think its because of the wrong date. I have no clue where the 1970 year comes from
I tried this weekend to setup InfluxDB via the Domoticz HTTP wiki page, it is a bit outdated but I did succeed. I used InfluxDB 1.2.
1) For example the the built-in web administration GUI is deprecated in InfluxDB 1.2 and is disabled by default. I used the CLI and works.
P.s. I found you can still use the administration GUI, you have to enable it in the influxdb.conf file

Code: Select all

[admin]
  # Determines whether the admin service is enabled.
enabled = true
2) The Domoticz setup details on the wiki page are for InfluxDB 0.8. At the bottom of the wiki page I found the url and data fields for InfluxDB 0.9 which also works for InfluxDB 1.2.

If I or someone else has time a wiki page update would be nice. Adding the screenshots from sincze could be usefull.

Regarding the incorrect date, on the InfluxDB website it is stated that InfluxDB uses the host’s local time in UTC to assign timestamps to data and for coordination purposes. So there is no need to search on InfluxDB time correction. You have to validate your host time configuration.

In case you use a Raspberry Pi use raspi-config.

What time and date is the host on?
If you use the command line interface and a Pi with Raspbian use:

Code: Select all

date --utc
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: domoticz, influxdb and grafana

Post by sincze »

Let me first build some more screens before starting at the wiki. :D
Grafana_OTGW.JPG
Grafana_OTGW.JPG (72.35 KiB) Viewed 5897 times
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.
Nhzz
Posts: 8
Joined: Monday 21 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Deventer, Netherlands
Contact:

Re: domoticz, influxdb and grafana

Post by Nhzz »

I'm also playing with Grafana, already got some graphs in it. Real neat. :-)

What I am trying to do is to make the graph for cumulative usage start at zero for every time-interval I select.

Currently I have the following query for a single metric:

Code: Select all

SELECT mean("value") FROM "youless" WHERE $timeFilter GROUP BY time($interval) fill(null)
What I want is to subtract the lowest value from that interval, so it only counts the values from within that interval. That way the graph starts at zero and you know exactly what the usage is in that interval. To get the lowest value from that interval I use:

Code: Select all

SELECT min("value") FROM "youless" WHERE $timeFilter GROUP BY time($interval) fill(null)
So I thought combining those two (with subquery) like this should work:

Code: Select all

SELECT mean("value") - (SELECT min("value") FROM "youless" WHERE $timeFilter GROUP BY time($interval) fill(null)) FROM "youless" WHERE $timeFilter GROUP BY time($interval) fill(null)
Unfortunately this doesnt work. The query is not accepted as a subquery, although the query itself works just fine.

Anyone can give me a push in the right direction?
Nhzz
Posts: 8
Joined: Monday 21 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Deventer, Netherlands
Contact:

Re: domoticz, influxdb and grafana

Post by Nhzz »

No one? :idea: :oops:
Trigun
Posts: 390
Joined: Wednesday 30 November 2016 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: domoticz, influxdb and grafana

Post by Trigun »

sorry mate can't help you, whish I could.

is there perhaps a chance you can help me out?
I am looking all over the internet for a solution to put my smart 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 in advance!
grubstake
Posts: 9
Joined: Tuesday 14 February 2017 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz, influxdb and grafana

Post by grubstake »

There is a problem with the InfluxDB Data Push option, it correctly uploads all the device information but the date is not correctly being loaded in InfluxDB.

It appears to be something like the data push posting date/time with without declaring "precision". In any case, the date ends up being "null" which ends up starting with 1/1/1970.

See: https://github.com/influxdata/influxdb/issues/6041

Anyway, a query in the influxDB shell shows the least significant digits of time counting up from the time the data load was started on a new database, but the date is never correct:

Code: Select all

> select "value" from "Humidity"
name: Humidity
--------------
time				value
1970-01-01T00:00:00.024077824Z	32
1970-01-01T00:00:00.039430144Z	47
1970-01-01T00:00:00.046879232Z	33
1970-01-01T00:00:00.153165824Z	47
1970-01-01T00:00:00.376367104Z	32
1970-01-01T00:00:00.399168512Z	32
1970-01-01T00:00:00.671788544Z	32
1970-01-01T00:00:00.694589952Z	32
1970-01-01T00:00:00.944408576Z	32
1970-01-01T00:00:00.967209984Z	32
1970-01-01T00:00:01.239830016Z	32
1970-01-01T00:00:01.262631424Z	32
1970-01-01T00:00:01.296697856Z	32
1970-01-01T00:00:01.319499264Z	32
1970-01-01T00:00:01.592119296Z	32
1970-01-01T00:00:01.614920704Z	32
1970-01-01T00:00:01.62981888Z	47
1970-01-01T00:00:01.887540736Z	32
1970-01-01T00:00:01.910342144Z	33
It's not a problem with Grafana, its just that Grafana charts default to a time range that doesn't include timestamps way back in 1970.

Very frustrating.
hrikken
Posts: 2
Joined: Sunday 12 February 2017 20:37
Target OS: -
Domoticz version:
Contact:

Re: domoticz, influxdb and grafana

Post by hrikken »

Trigun wrote:sorry mate can't help you, whish I could.

is there perhaps a chance you can help me out?
I am looking all over the internet for a solution to put my smart 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 in advance!

I've used the combination Node-Red and MQTT (
mosquitto) where Domoticz pushes the data to the Misquitto broker and Node-Red pushes thes values to InfluDB. Node-red has all the necessary modules to do the job. It worksvery reliable too. I push all data that come from a smart meter every second to 2 InfluxDB servers simutaneously. Works flawless. Succes!



Verzonden vanaf mijn iPhone met Tapatalk Pro
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest