Data push ---> InfluxDB
Moderators: leecollings, remb0
-
- Posts: 8
- Joined: Thursday 12 February 2015 9:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2317
- Contact:
Data push ---> InfluxDB
Hello
Just noticed InfluxDB option has been added under Data push. How do I define user name and password for InfluxDB? as there is no option for that under General settings section.
Many Thanks
Just noticed InfluxDB option has been added under Data push. How do I define user name and password for InfluxDB? as there is no option for that under General settings section.
Many Thanks
- 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: Data push ---> InfluxDB
Excellent option, now I can see my data in Grafana finally.
I guess because of the timestamp... in '1970-01-01T00:24:47.358933Z' that problem is now over when using this option.
But maybe I did not read the documentation correctly with the time keywords. https://www.domoticz.com/wiki/HttpLink
Something that did not work when using http-link. I guess because of the timestamp... in '1970-01-01T00:24:47.358933Z' that problem is now over when using this option.
But maybe I did not read the documentation correctly with the time keywords. https://www.domoticz.com/wiki/HttpLink
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: 8
- Joined: Thursday 12 February 2015 9:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2317
- Contact:
Re: Data push ---> InfluxDB
Hi sincze.
How did you configure your connection settings? Did you create a new database without password in InfluxDB? or there is a way to include InfluxDB username and password from settings page? Could you send a screenshot of your InfluxDB connection please?
Thanks
Filip
How did you configure your connection settings? Did you create a new database without password in InfluxDB? or there is a way to include InfluxDB username and password from settings page? Could you send a screenshot of your InfluxDB connection please?
Thanks
Filip
- 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: RE: Re: Data push ---> InfluxDB
Ok will provide screenshot ASAP. Moved back to http-link btw.filipq wrote:Hi sincze.
How did you configure your connection settings? Did you create a new database without password in InfluxDB? or there is a way to include InfluxDB username and password from settings page? Could you send a screenshot of your InfluxDB connection please?
Thanks
Filip
Creates more recognizable table names. Both work. At the moment I prefer http-link.
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.
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.
- 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: Data push ---> InfluxDB
Please find attached my settings:
CREATE DATABASE domoticz
if I remember correctly.
Database was created in influx with:CREATE DATABASE domoticz
if I remember correctly.
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.
Re: Data push ---> InfluxDB
Hello,
If you have put a password to yout database (what I recommand)
In database field, put:
domoticz&u=DatabaseUser&p=DatabasePassword
and it works !
If you have put a password to yout database (what I recommand)
In database field, put:
domoticz&u=DatabaseUser&p=DatabasePassword
and it works !
- 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: Data push ---> InfluxDB
Yes that is correctdolby44 wrote:Hello,
If you have put a password to yout database (what I recommand)
In database field, put:
domoticz&u=DatabaseUser&p=DatabasePassword
and it works !
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: 9
- Joined: Tuesday 14 February 2017 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Data push ---> InfluxDB + Grafana: Success/Fail
I've configured Influx Data push from Domoticz (More Options/DataPush) and had initial SUCCESS; verified data is being sent an received/queried by InfluxDB, but FAILED - no luck at all querying the data and getting charts in Grafana. Would greatly appreciate guidance from the pioneers before me, in particular examples of exact queries or suggestions re: Grafana.
Here's my setup:
Domoticz on RPi3 with sensors from MySensors, and ESP Easy, running reliably several months. I configured several sensors as a test in Influx Data Push, and successful eliminating config errors showing in Domoticz Logs. I can now see the Domoticz log showing all configured device info going out, example:
InfluxDB & Grafana Installed and configured on separate Linux (Ubuntu) box. Created 'domoticz' database in Influx. Configured data source in Grafana linked to 'domoticz' database successfully.
Failed to create any chart in Grafana that would display data values with hours of fiddling, although query editor was correctly seeing data fields like "Temperature", "Humidity" etc. Chart area always showed spinner with any query, Googling suggests a 'stuck' query.
Decided to fall back to confirm Influx was really getting the data, ran through the Influx docs and ran command line queries and got results confirming the data structure and devices were certainly there
">show series" included:
> select * from "Temperature" shows values are there...
Yet in Grafana chart creation, although the relevant device names, etc are seen and selectable in the query, with a resulting query (among innumerable variants) like:
Set chart time range to past 5 years. Produces a blank chart and never-ending spinner in the upper right corner.
SO..... I i figure InfluxDB seems to be working and have the data, and thought maybe my Grafana install was botched, so I installed another instance of Grafana, from scratch, on a rPi3 and connected it to the same Influx database... No problem connecting to database. Same spinner, no data displayed.
Opinions?
Am I botching this query in Grafana?
Is something wrong with my Grafana config?
Is the spinner always there with any graph query in Grafana that produces no data?
Is there something wrong with the "time" data shown in the InfluxDB command line query above?
Any ideas greatly appreciated.
Thanks, Tim
Here's my setup:
Domoticz on RPi3 with sensors from MySensors, and ESP Easy, running reliably several months. I configured several sensors as a test in Influx Data Push, and successful eliminating config errors showing in Domoticz Logs. I can now see the Domoticz log showing all configured device info going out, example:
Code: Select all
2017-04-07 13:25:45.136 MQTT: Topic: domoticz/in, Message: {"idx":65,"nvalue":0,"svalue":"18.0;32;0"}
2017-04-07 13:25:45.143 HttpLink: sending global variable temp with value: 64.4
2017-04-07 13:25:45.172 HttpLink: response
2017-04-07 13:25:45.255 InfluxLink: value Temperature,idx=65,name=Ambient-ESP-Node-1 value=64.4
2017-04-07 13:25:45.255 InfluxLink: value Humidity,idx=65,name=Ambient-ESP-Node-1 value=32
Failed to create any chart in Grafana that would display data values with hours of fiddling, although query editor was correctly seeing data fields like "Temperature", "Humidity" etc. Chart area always showed spinner with any query, Googling suggests a 'stuck' query.
Decided to fall back to confirm Influx was really getting the data, ran through the Influx docs and ran command line queries and got results confirming the data structure and devices were certainly there
">show series" included:
Code: Select all
name: Temperature
-----------------
_key idx name
Temperature,idx=63,name=Radio2-Proto-MS-Shop 63 Radio2-Proto-MS-Shop
Temperature,idx=18,name=Outdoor@House-NA 18 Outdoor@House-NA
Temperature,idx=69,name=Outlet-ESP-Node-1 69 Shop-ESP-Node-1
Temperature,idx=65,name=Ambient-ESP-Node-1 65 House-ESP-Node-1
Code: Select all
time idx name value
899584 63 Radio2-Proto-MS-Shop 54
1348096 63 Radio2-Proto-MS-Shop 59.5
3990016 63 Radio2-Proto-MS-Shop 55.2
4172800 63 Radio2-Proto-MS-Shop 56.3
5989376 65 House-ESP-Node-1 64.8
6526464 63 Radio2-Proto-MS-Shop 59.7
Code: Select all
SELECT "value" FROM "Temperature" WHERE "name" = 'Radio2-Proto-MS-Shop' AND $timeFilter GROUP BY time(5m)
SO..... I i figure InfluxDB seems to be working and have the data, and thought maybe my Grafana install was botched, so I installed another instance of Grafana, from scratch, on a rPi3 and connected it to the same Influx database... No problem connecting to database. Same spinner, no data displayed.
Opinions?
Am I botching this query in Grafana?
Is something wrong with my Grafana config?
Is the spinner always there with any graph query in Grafana that produces no data?
Is there something wrong with the "time" data shown in the InfluxDB command line query above?
Any ideas greatly appreciated.
Thanks, Tim
- 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: Data push ---> InfluxDB
If the data is in Influx try the data in grafana not 5 years back but back to the year 1970. I had a similar issue of data not showing up.
Sent from my SM-G925F using Tapatalk
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.
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: 9
- Joined: Tuesday 14 February 2017 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Data push ---> InfluxDB
Great tip! Digging into the database sure looks like timestamps aren't right.
I'll look at my configs...do you recall how you fixed it?
Thanks, Tim
ADDENDUM: Spent may hours looking for workarounds, created entirely new database and messed with every possible variant. I'm fairly certain that the InfluxDB Data Push is simply broken and loads all data except with broken timestamps, making them useless.
I'll look at my configs...do you recall how you fixed it?
Thanks, Tim
ADDENDUM: Spent may hours looking for workarounds, created entirely new database and messed with every possible variant. I'm fairly certain that the InfluxDB Data Push is simply broken and loads all data except with broken timestamps, making them useless.
Last edited by grubstake on Sunday 09 April 2017 0:16, edited 1 time in total.
- 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: Data push ---> InfluxDB
Just to be sure. were you using HTTP link or INFLUXDB under DATAPUSH menu??
These are my settings.
Code: Select all
http://influxmachine:8086/write?db=domoticz&u=root&p=root&precision=ms
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: 9
- Joined: Tuesday 14 February 2017 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Data push ---> InfluxDB
I have been using "influxDB"
I am getting correct sensor values, and have experimented with tacking on 'precision' options to the DOmoticz InfluxDB push page, but still stuck in 1970.
I am getting correct sensor values, and have experimented with tacking on 'precision' options to the DOmoticz InfluxDB push page, but still stuck in 1970.
Last edited by grubstake on Saturday 08 April 2017 21:55, edited 1 time in total.
- 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: Data push ---> InfluxDB
mmm that one worked for me. can you switch for a test to httplink and add the line a shown in my earlier post??
I MOVED away from both http link and influxdb from within domoticz as I received error messages like 'to many open files'.... causing domoticz to lock up. Had to solve it in a different way. (Pass2Php with custom influxdb function). Has been running fine since then
I MOVED away from both http link and influxdb from within domoticz as I received error messages like 'to many open files'.... causing domoticz to lock up. Had to solve it in a different way. (Pass2Php with custom influxdb function). Has been running fine since then
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: 9
- Joined: Tuesday 14 February 2017 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Data push ---> InfluxDB
sincze, httplink is pushing, no errors in log, but I can't figure out how to get remotely similar data in the httplink config or any values. Most of the wiki and older posts seems to be from old version of InfluxDB,
General settings as you suggested adjusted for my ip.
Data:
device_%V value=%v %t1 %n %D Tried lots of variants...including what you sent. Syntax is unclear to me with commas, spaces, etc varying widely in examples I'm finding on posts
active and debug checked
Edit Link:
Target Type: Global variable (errors when I try Virtual Device)
Device name from popup for items.
Value to sent: no choice here
Target Variable: No idea what goes here, generic terms like "temp"
Include link checked
Link active checked
I'm not getting any values in Influx that I can pick out with queries
I think I'm probably going to have to give up on this unless the InfluxDB option gets fixed...too much time wasted on this in last several days. So close with that, just broken timestamps I can't fix.
Tim
General settings as you suggested adjusted for my ip.
Data:
device_%V value=%v %t1 %n %D Tried lots of variants...including what you sent. Syntax is unclear to me with commas, spaces, etc varying widely in examples I'm finding on posts
active and debug checked
Edit Link:
Target Type: Global variable (errors when I try Virtual Device)
Device name from popup for items.
Value to sent: no choice here
Target Variable: No idea what goes here, generic terms like "temp"
Include link checked
Link active checked
I'm not getting any values in Influx that I can pick out with queries
I think I'm probably going to have to give up on this unless the InfluxDB option gets fixed...too much time wasted on this in last several days. So close with that, just broken timestamps I can't fix.
Tim
- 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: Data push ---> InfluxDB
mm this should work.
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: 9
- Joined: Tuesday 14 February 2017 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Data push ---> InfluxDB
Correction of correction! I'm not having success with HTTP push, the data posted below yesterday is definitely from the InfluxDB push, I had the wrong database in use. But I have not spent much time trying to get the data configured correctly.
----------
But what do I know.
Tim
----------
I seriously wonder if part of the problem here is related in some way to how InfluxDB assigns schema and data types based on the first data in to the file? I wonder if the code verification is challenging unless its done with a virgin empty database? I simply created a series of new database files as I went along with my trial-and-error as it appeared that behavior sometimes changed when I did this.Correction - with the HTTP Data Push config listed just above, I AM getting values and seeing name and tags....but the dates are as I reported before:
Code: Select all
> select "value" from "Temperature" name: Temperature ----------------- time value 1970-01-01T00:00:00.001276416Z 63.3 1970-01-01T00:00:00.001276416Z 54.1 1970-01-01T00:00:00.007817216Z 54.1 1970-01-01T00:00:00.024077824Z 63.3 1970-01-01T00:00:00.039430144Z 48.6 1970-01-01T00:00:00.046879232Z 63.1 1970-01-01T00:00:00.068955136Z 54.7 1970-01-01T00:00:00.08276224Z 63.1 1970-01-01T00:00:00.110287872Z 54 1970-01-01T00:00:00.129910272Z 54
But what do I know.
Tim
Who is online
Users browsing this forum: No registered users and 1 guest