- Platform information:
- Hardware: Raspberry Pi 4 Model B Rev 1.2
- OS: Raspbian GNU/Linux 10 (buster)
- Java Runtime Environment: openjdk version “1.8.0_252”
- openHAB version: 2.5.6-2
Briefly, configuring a Switch channel with a Switch item is not working.
I have a Zwave water sensor added to OpenHAB (Aeotec Water Sensor 6) and is online. I have the items configured manually and temperature and battery are being reported. As for the alarm channels, there’s the problem. If I configure the alarm channel as a Number, it reliably reports 0 or 1 based on the presence of water, which is great. However, the Thing shows that the alarm channel should be configured as a Switch. This is the part that doesn’t work. If I configure the Item as a switch, the alarm never gets updated.
Here’s the funny part – in fact, the switch did appear briefly in Paper UI and was getting updated, but only briefly. It disappeared shortly afterwards for no apparent reason. I could not link the disappearance to anything I changed. A restart of the Raspberry Pi once resulted in the switch reappearing briefly, but another restart had no effect. Very frustrating!
Anybody have an idea what might be happening? I’d like to use the Alarm as a Switch so I can have Alexa discover it as a device.
Here are my items. Note that I configured two items for the Alarm, one as a number and one as a switch, for diagnostic purposes. Only the number shows up and gets updated.
Number:Temperature Sensor_Temp_F "Sensor Temperature F" { channel="zwave:device:a5f14603:node3:sensor_temperature" }
Number Battery_Level "Battery Level" { channel="zwave:device:a5f14603:node3:battery-level" }
Number Alarm_Flood_Num1 "Alarm (number)" { channel="zwave:device:a5f14603:node3:alarm_flood1" }
Switch Alarm_Flood_Sw1 "Alarm (switch)" { channel="zwave:device:a5f14603:node3:alarm_flood1" }
Here’s what I see in Paper UI:
Here’s what the sensor Thing says for the channel:
Thanks to all who can help.
EDIT:
I created a sitemap for the temperature, battery and flood switch, and the sitemap is now showing a toggle switch that updates when water is detected. Alexa also discovered the switch, so perhaps all is well. However, I’m wondering why the flood sensor switch won’t show up in Paper UI? Is it just a bug in the UI?
Frame label="Aeotec Flood Sensor" {
Text item=Sensor_Temp_F
Text item=Battery_Level labelcolor=[<15="red"] valuecolor=[<15="red"]
Default item=Alarm_Flood_Sw1 labelcolor=[ON="red"] valuecolor=[ON="red"]
}