Java Version: OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+10-LTS)
I started having an issue with my switch. It seems like the frequency of the problem increased during a short span of time from none to all the time.
Problem: Pressing any of the buttons doesn’t trigger any of the rules that had been working since I configured the switch more than 6 months ago.
The switch was initially added to the Hue app but not configured there. The Thing was added through the Main UI but the Items through file configuration and the rules with DSL.
I’m not sure if the problem started after I upgraded OH to 3.3 from 3.2.
When I press a button and look at the Hue app, the button pressed is recognized, so the switch works. However, the rules don’t get triggered on OH.
I set the log to DEBUG mode:
openhab> log:set DEBUG org.openhab.binding.hue
But nothing is displayed when I press any of the buttons.
Actions taken:
I soft reset the switch by pressing the 4 buttons until the led blinked red. No change.
I deleted the accessory from the Hue app and the Things, and added it back. I reconfigured the Items and Rules with the new sensor ID. No change.
rule "Main Dimmer Button 1 Short Pressed"
when
Channel "hue:0820:0017884eXXXX:81:dimmer_switch_event" triggered 1002.0
then
logDebug(logName, "Starting execution of Dimmer Button 1 short pressed.")
if (group_LR_Lamp_Switch.state == OFF) {
group_LR_Lamp_Switch.sendCommand(ON)
} else if (group_LR_Lamp_Switch.state == ON) {
group_LR_Lamp_Switch.sendCommand(OFF)
}
logDebug(logName, "Ending execution of Dimmer Button 1 short pressed.")
end
My bad, I meant to say that I don’t see anything in the logs generated by the action of pressing the buttons on the switch.
The log displayed when the new Thing was added to the Inbox and even the added Thing became online, but nothing when pressing the buttons.
Other Hue-related events are displayed in the log.
Same issue here, everything was working fine up until 2~3 weeks ago. Now I have to press the button up to 4 times before the press is taken into account.
I restarted OpenHab, my bridges and my router, it was working again for ~1 week, then it started bot responding again.
Triggering the events from any other source (UI, philips hue motion sensors, etc) is working just fine. Lights are responsive. The only thing that doesn’t seems to work well are the wall switches.
It seems like it come from the trigger channel (dimmer_switch_event), the state channel (dimmer_switch) seems to work fine.
Replacing “Channel XXXX triggered” by “Item XXXX received update” and using newState instead of receivedEvent in my scripts seems to work for now, I tested it during my lunch break, will see if the problem appear again despite this.
You just made me realize that @Argurth mentioned “update”. I will change my rule, although it worked with “command” for a while. Besides, my Hue light rules have worked with “received command” flawlessly for years.