Excellent work! A lot better than my hackish MQTT Hub -> Mosquitto -> Telegraf -> InfluxDB integration
I’ve got a few constructive notes I was hoping you could look into.
The naming structure seems a bit chaotic. Could I recommend this kind of structure instead:
SELECT mean(“measure_temperature”) FROM “Bedroom” WHERE (“name” = ‘Bedroom sensor’)
Right it’s like this:
SELECT mean(“measure_temperature”) FROM “Bedroom_sensor” WHERE (“name” = ‘Bedroom sensor’)
Which means the Bedroom_sensor name is used twice. Using the Zone as part of the data would make more structural sense. Let me know your thoughts on this.
Also, is it also possible to maybe have push interval part of the configuration? Or is it based on value change?
Other than that, great work and finally a way to collect metrics properly!
While I agree it’s a hassle that people using the app now would have to change their dashboards, I believe it would benefit a better structure in the long run.
This would be my suggestion:
measurement - Zone name (ie. Bedroom, Bathroom, Living room etc.)
tag - ID = UID
tag - Name = Device name
value - Capability (ie. measure_temperature, measure_current etc).
This way you would be able to create simpler queries.
Example:
I’ve got a lot of miflora plant sensors in the living room. Each of these report the value flora_measure_moisture. If I were to use the current setup, I would have to create one query per device. With the measurement being a zone, I could simply itterate through all name tags returned and create a graph for the moisture of all plants in one query.
A typical request for this type of query would be:
SELECT last(“flora_measure_moisture”) FROM “Living_room” WHERE $timeFilter GROUP BY “name”
Using ALIAS BY with $tag_flora_measure_moisture , I would be able to see graphing of the value for all devices in that zone.
I’m not saying you should change it if you don’t think it’s the correct way to do it. It’s always possible to work around this by creating one query per device, but with over a 100 devices in my house, and at least three values per device, we’re talking quite a lot of queries for a big dashboard.
P.S: I use grafana to poll the data from influxDB. I guess in other tools there might be other ways of doing polling which makes more sense in your configuration.
Works like a charm! This makes it quite a lot easier to collect metrics from mutliple devices in the same Zone I just enabled the “By Zone” name standard. Thanks again for a great app, and for implementing the features.
I use http://192.168.*.x:18086 for protocol and port number, but stays disconnected.
Trying http://192.168.*.x:18086/ping in a webbrowser, and fill in the same userid and password, I get the empty page (which i should). Using this same method I can do queries as well.
I installed influxdb v1 in a docker on my Nas, and grafana as well. Grafana is able to connect as well (docket to docket and via browser.
Made a database homey_6months and granted the user all privileges to this database.
Or could it be that this test Homey is running on version 5.
Hi. This looks verry interesting, but I also get 0 measurements. Is it only new measurements it uploads? Does it take time before it uploads it to InfluxDb cloud? I’ve checked that Im using https and 443.