Okay, I finally had a chance to install 1.8 last night.
Some good news:
- I am no longer getting the “No database entry” error message
- I’m able to see status in OpenHAB using the below binding def (was working in 1.7 too BTW).
//Items
Contact FrontDoor “Front Door [%s]” { zwave=“7:command=SENSOR_BINARY” }
//SiteMap
Text item=FrontDoor
However, I’m not sure if the status is being reported back consistently or in a timely manner. I created a simple rule to email me when the state changes, but it doesn’t fire. I also have a motion sensor, and the rule for the motion sensor is working, so I know the email configuration is working properly.
Not owning any other contact door/window sensor, I’m not sure how it should behave. From the documentation I believe the sensor is working properly. When opened or closed, the red LED does blink indicating a state change. Should I see something on the OpenHAB debug logs right away on the state change?
I also installed HABMin2, if that would help with troubleshooting. I’m just nor very familiar with it yet.
//rule
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.openhab.core.library.types.DecimalType
val String mailTo = "xx@xx.com"
rule “Front Door Email Notification - OPEN”
when Item FrontDoor changed from CLOSED to OPEN
then
sendMail(mailTo, “Front Door Email Notification - Opened”, “Front Door Opened”)
end
rule “Front Door Email Notification - CLOSED”
when Item FrontDoor changed from OPEN to CLOSED
then
sendMail(mailTo, “Front Door Email Notification - Closed”, “Front Door Closed”)
end
rule “Motion Detected - OPEN”
when Item EntryMotion changed from CLOSED to OPEN
then
sendMail(mailTo, “Motion Detected”, “Motion Detected”)
end
rule “Motion Detected - CLOSED”
when Item EntryMotion changed from OPEN to CLOSED
then
sendMail(mailTo, “No more Motion”, “No More Motion”)
end