rule "Wohnzimmer Dimmer"
when
Channel "hue:0820:001788ae569d:2:dimmer_switch_event" triggered
then
switch(receivedEvent.getEvent()) {
case "2002.0": {
Wohnzimmer_dimmer.sendCommand("INCREASE")
// Button 2 press - Increase brightness
}
case "3002.0": {
Wohnzimmer_dimmer.sendCommand("DECREASE")
// Button 3 press - Decrease brightness
}
}
end
I found it like this in the Forum, The Slider in the Paper UI Works but nothing happens when i press the Buttons.
May Someone knows a other Rule how i could bind The Dimmer to the Item ?
Or What is wrong with this one?
Sry for The Pictures next time i know how to Post it
what is openhab version and binding version please?
These devices recently received some attention
I just set mine up in the Hue app and point them at the bulb I want to control in the app and it just works although I did use rules to control the volume of the radio with one for awhile so it does work in OpenHAB with rules
There is no reason to use a follow profile if you only have one Channel.
When you add more lights, the best approach is to create a separate Item for each light and put all of those into a Group. You can sendCommand to the Group which will be forwarded to all the members.
There is nothing apparently wrong with the Rule. In all likelihood there is something wrong with the Thing configuration or the Item.
As mentioned, add logging to the Rule so you can see whether or not it’s triggering. Always look at the logs for errors when loading any config file and when the rule runs.
You can see the button presses in the events.log. I don’t got those sometimes and this seems to be my issue. Could it be that you need to send INCREASE and DECREASE instead of “INCREASE” and “DECREASE” so just with the “”?
Nope - thats not the issue. I had a look at my rules, it the same
I would also add logging, at the start of the rull (just before the switch). So, you know the rule has started, and you can add info about the event in it.
Thx alot for all the Help,
I put the Loginfo in my rule.
I saw in the Documentation that there should be a file “org.eclipse.smarthome.model.script” but in the Folder : /var/lib/openhab2/etc
Do i need to activate the logging or create the file by my self?
I have the same issue.
I have the follow rule set up:
rule "BedroomSwitchRule"
when
Channel "hue:0820:0017887922f1:2:dimmer_switch_event" triggered
then
logInfo("HueRule", "Switching bedroom lights.")
end
I also have the dimmer switch state set up as an item:
Number BedroomDimmerState "Bedroom Dimmer State" {channel="hue:0820:0017887922f1:2:dimmer_switch"}
In the logs I can see that the binding sees the switch being pressed: The status item is also being updated
2020-04-25 21:34:23.175 [DEBUG] [ue.internal.handler.HueBridgeHandler] - Status update for Hue sensor '2' detected: {buttonevent=1002.0, lastupdated=2020-04-25T12:34:43}
2020-04-25 21:34:23.176 [DEBUG] [ue.internal.handler.HueBridgeHandler] - Sending sensorStateChanged for sensor '2'
│2020-04-25 21:31:00.445 [vent.ItemStateChangedEvent] - BedroomDimmerState changed from 4002.0 to 1002.0
But I never get the log output from the rule.
I have also tried switching things in the rule, but that also does not work.
Any idea what I am doing wrong here?
There is no event in the events.log shown for hue:0820:001788ae569d:2:dimmer_switch_event, so there is nothing to trigger the rule.
You need to look at that channel’s configuration.
This is what this looks like.
Perhaps I should also mention that I am on openhab:2.5.4-snapshot
So unless I copy-pasted nonsense from the paperui, it should be correct.