Hello,
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:
sensors.items
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>
motion.rules
rule "LR Motion ON"
when
Item Livingroom_Motion changed
then
if (Livingroom_Motion.state == ON ){
LR_MotionLatch.sendCommand(ON)
logInfo("motion.rules", "Motion Detected in the Living Room")
}
end
rule "Ensuite Motion ON"
when
Item Ensuite_Motion changed
then
if (Ensuite_Motion.state == ON ){
Ensuite_MotionLatch.sendCommand(ON)
logInfo("motion.rules", "Motion Detected in the Ensuite")
}
end
rule "Ensuite Motion Latch goes OFF"
when
Item Ensuite_MotionLatch changed to OFF
then
// perhaps turn off lights in the ensuite...
logInfo("motion.rules", "Timer elapsed, no motion in the Ensuite")
end
rule "Living ROom Motion Latch goes OFF"
when
Item LR_MotionLatch changed to OFF
then
// perhaps turn off lights in the ensuite...
logInfo("motion.rules", "Timer elapsed, no motion in the Living Room")
end
influxdb.persist
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.