[SOLVED] InfluxDB+Graphana - some values not being stored / accessible for graphana

I’ve recently gotten influxDB and graphana set up on my openhabian (RPi3B) 2.4 stable. I installed it using openhabian-config, and have some values correctly being stored in influxdb and graph-able in graphana.

I am getting my values from two 1 in 4 multisensor (Monoprice, same hardware as Zooz). These sensors were easily added via PaperUI (once the shotty inclusion instructions were supplemented with the Zooz ones), and their values all show up fine in Paper UI. I configured them in an items file, so that I could have the values stored in influxDB. Unfortunately, when I try to make a graph in Graphana, I can only access the artificial MovementLatch switches that are connected to the movement sensors (via a rule and the expire binding). I cannot access the temperature, humidity, or the LUX reading, but these values display fine in PaperUI as well as in HabPanel (which uses the item names from the item file, confirming those are working correctly). I duplicated one of the temperatures, only this time not using any units, in case a string was being passed and the valuable wasn’t graphable - I’m still suspicious this may be a problem, but wanted to ensure I’m not missing something else. I don’t see anything wrong in my logs.

in Graphana, when I add a new panel, select graph, and go into the metrics, I choose Data Source: openhab_home. Then, in the ‘Select’ line for the query below, I click ‘select measurement’, and can see only two options: Ensuite_MotionLatch and LR_MotionLatch. This is despite multiple reboots.

Thanks for any help / troubleshooting strategies you may be able to give!

My files:


Number Livingroom_Temperature "Temperature [%.1f °C]" <temperature> (gTemperatureItems) {channel="zwave:device:713fde47:node22:sensor_temperature"}

Number LR_Temperature_unitless "Temperature" <temperature> (gTemperatureItems) {channel="zwave:device:713fde47:node22:sensor_temperature"}

Number Ensuite_Temperature "Temperature [%.1f °C]" <temperature> (gTemperatureItems) {channel="zwave:device:713fde47:node23:sensor_temperature"}

Number Livingroom_Humidity "Humidity [%.1f %%]" <humidity> (gHumidityItems) {channel="zwave:device:713fde47:node22:sensor_relhumidity"}

Number Ensuite_Humidity "Humidity [%.1f %%]" <temperature> (gHumidityItems) {channel="zwave:device:713fde47:node23:sensor_relhumidity"}

Number Livingroom_Light "Light [%.0f Lux]" <sun> (gLightSensorItems) {channel="zwave:device:713fde47:node22:sensor_luminance"}

Number Ensuite_Light "Light [%.0f Lux]" <sun> (gLightSensorItems) {channel="zwave:device:713fde47:node23:sensor_luminance"}

Switch Livingroom_Motion "Motion" <motion> (gMotionItems) {channel="zwave:device:713fde47:node22:basic_sensor_binary"}

Switch Ensuite_Motion "Motion" <motion> (gMotionItems) {channel="zwave:device:713fde47:node23:basic_sensor_binary"}

Switch LR_MotionLatch "Motion" <motion> (gAnyRecentMotion,Presence_Sensors) {expire="1h,command=OFF"}

Switch Ensuite_MotionLatch "Motion" <motion> (gAnyRecentMotion,Presence_Sensors) {expire="1h,command=OFF"}

Group:Switch:OR(ON,OFF) gAnyRecentMotion "Recent Motion In House" <motion>


rule "LR Motion ON"
    Item Livingroom_Motion changed
    if (Livingroom_Motion.state == ON ){
		logInfo("motion.rules", "Motion Detected in the Living Room")

rule "Ensuite Motion ON"
    Item Ensuite_Motion changed
    if (Ensuite_Motion.state == ON ){
		logInfo("motion.rules", "Motion Detected in the Ensuite")

rule "Ensuite Motion Latch goes OFF"

     Item Ensuite_MotionLatch changed to OFF
 // perhaps turn off lights in the ensuite...
    logInfo("motion.rules", "Timer elapsed, no motion in the Ensuite")

rule "Living ROom Motion Latch goes OFF"

     Item LR_MotionLatch changed to OFF
 // perhaps turn off lights in the ensuite...
    logInfo("motion.rules", "Timer elapsed, no motion in the Living Room")


Strategies {
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
every2Minutes : "0 */2 * ? * *"
every5Minutes : "0 */5 * ? * *"

Items {
gTemperatureItems*: strategy = every2Minutes, everyChange
gHumidityItems*: strategy = every5Minutes, everyChange
gMotionItems*,gAnyRecentMotion*: strategy = everyChange
gLightSensorItems*: strategy = everyChange
gWeatherTemp*, gWeatherHumidity*: strategy = everyHour

My appologies if my attempt at code fences doesn’t work.

1 Like

Are these groups defined?

1 Like

I believe the default for the Influx http endpoint is to have logging enabled. See this link. Therefore you should see the writes in the /var/log/syslog file. If they are being written, then your problem is with the settings in Grafana. If they are not being written, then the problem is on the openHAB side writing them out and maybe @vzorglub’s idea may help. You can also do queries directly in Influx to see what data is there with ‘select *’ queries. See this page for examples. Make sure you get the right retention policy - that can cause confusion.

1 Like

Not having the groups defined was the problem. I had them all defined in my default.items file, but then had completely reworked it a while ago and lost the groups!
Now I am getting all the values as expected into graphana.
(The reason those other stats worked was because my Presence_Sensor group was defined elsewhere)

thanks @vzorglub
Also thanks @jswim788 for the information about influxdb logging - it was being logged, and I imagine this will be quite useful for future challenges.