Hi @ranielsen , @tcgerhard ,
This ended up being user error, i.e. I shot myself in the foot…
I had this working until I changed the tracking Reed switch item to use states OPEN and CLOSED instead of 1 and 0, and I did not update the rules to use the new states, so the rules were not working correctly. But there never was a problem with the Insteon binding.
I think I was confused by the following verbiage in the Insteon binding documentation, especially the part about “for button toggle mode set to always on or off, only ON or OFF commands will be processed, in line with the physical interaction”:
“By default, the binding will only change the button led state when receiving on/off commands, depending on the keypad local radio group settings. For button broadcast group support, set the bridge parameter deviceSyncEnabled to true. Additionally, for button toggle mode set to always on or off, only ON or OFF commands will be processed, in line with the physical interaction.”
However, I guess none of this applies to me as the button is not associated with any scenes or devices; turning on or off a button’s LED by sending the corresponding ON or OFF command from openHAB works just fine.
Here’s what my rules look like, in case it helps others (one rule to always reflect the open/close status of the Reed switch, and another to send a command via 1-Wire to open/close the garage door when the KeypadLinc button is pressed):
rule "Garage Door Status Light"
when
Item Garage_Door_Status changed
then
if (Garage_Door_Status.state == OPEN) {
Garage_Hallway_Keypad_Button_A.sendCommand(ON)
logInfo("InsteonSync", "Garage door state changed to \"OPEN\". Sent ON command to KPL button A LED.")
} else {
Garage_Hallway_Keypad_Button_A.sendCommand(OFF)
logInfo("InsteonSync", "Garage door state changed to \"CLOSED\". Sent OFF command to KPL button A LED.")
}
end
rule "Handle garage KeypadLinc button A"
when
Channel "insteon:device:9cc839ad8c:3389ce:event-button-a" triggered
then
logInfo("insteon.rules", "KPL Button A was pressed. Sending pulse to garage door controller...")
val curr_state = Garage_Door_Status.state
// The first parameter is the timeout in seconds
val String results = executeCommandLine(Duration.ofSeconds(5),
"/usr/bin/owwrite", "-s", "192.168.76.112", "/87.000000000002/dob", "1")
logInfo("insteon.rules", "owwrite ommand output: " + results)
// For the keypad button LED to always reflect the door open/close status,
// we need to set the LED to the previous state before executing the command
// above to toggle the door. This handles the case where the button is pressed
// and then before the door sensor is read, the button is pressed again.
// Setting the LED to the final state will come later, and is handled by
// the "Garage Door Status Light" above.
if (curr_state == OPEN) {
Garage_Hallway_Keypad_Button_A.sendCommand(ON)
logInfo("InsteonSync", "KPL Button A pressed: Garage door is closing. Sent ON command to KPL button A LED.")
} else {
Garage_Hallway_Keypad_Button_A.sendCommand(OFF)
logInfo("InsteonSync", "KPL Button A pressed: Garage door is opening. Sent OFF command to KPL button A LED.")
}
end
I forgot to mention, I am running 5.2.
Thanks again for your replies.
Cheers,
Eloy.-