I’m trying to setup my dimmer POPP dimmer and having problem. I can ON/OFF but it doesn’t increase or decrease the level of light.
My rule:
rule "Dimmed Light"
when
Item Test received command
then
var Number percent = 0
if(Test.state instanceof DecimalType) percent = Test.state as DecimalType
Thank you but it still not working. I just checked the log and found following error message:
“Error during the execution of rule ‘Dimmed light’: Index: 1, Size: 1.”
But the same error message occurs even before changing from postUpdate to Test.SendCommand.
I don’t see a reason for what appears to be an ArrayIndexOutOfBoundsException (based on the message text), but I think if you trigger a rule on Item Test received command, then you don’t want the body of the rule to Test.sendCommand(...) because that seems like a never-ending loop would occur.
I noticed that if I use sendCommand then never-ending loop occurs. So changed to postUpdate. But even with postUpdate still have the same error message “…index …”.
What kind of dimmer hardware you are using? Fibaro Dimmer 2 after auto-calibration can recognize the load as non-dimmable, then you have such strange effect.
It works much better!! but now the light (standard bulb) blinks every time when the lamp is dimmed. It doesn’t matter if I set the step 1 or 10. Obviously the step 1 is more gradient but unfortunately blinks. It looks like every time when the dimmer is decreased or increased the lamp is switched off (for miliseconds) and the set up for the new value.
In my previous automation system Vera the same dimmer worked smoothly. So I don’t thing it’s a dimmer issue.
Is there any explanation how the command sendCommand works? It’s strange behavior that the every time the dimmer is increased or decreased the bulb blinks (each step). The blinking is not related to any power source frequency. As I described before it looks like during changing the value with sendCommand the light is set to 0 and then set to ‘percent’ variable.
The log doesn’t show any ‘0’. It logs increased or decreased values as expected. It only looks like it set to ‘0’ as the bulb is switched off for milisecs and then set to the proper value. The effect is blinking light which is very unpleasant. I wanted to move from Vera system to OpenHAB as I think is much more powerful but this issue is very important.
Previously I used the POPP dimmmer with Vera and attached led bulb. It worked ok. Now I use standard bulb. Maybe there is an issue but I didn’t change any settings (parameters) in the dimmer.
i’m trying to get a dimmer to work too and i need your help, please.
I need my dimmer to return simple commands like: +1 or -1 (Increase or Decrease).
Now i get the exact numeric values and that does not help me, because the thing that I control over MQTT with this dimmer can’t receive/return the exact numeric STATE.
I tried with a rule like this one below, but “receivedCommand” in never INCREASE/DECREASE, because it’s a numeric value.
if(receivedCommand==INCREASE) …
if(receivedCommand==DECREASE) …
Here are my settings:
on Items:
Dimmer JVCVolume “JVC Volume [%s/33]” {mqtt=">[broker:cmnd/JVCVolume/VOLUME:command:*:default]"}
on Sitemap:
Setpoint item=JVCVolume minValue=0 maxValue=33 step=1
on Rules:
rule “My http dimmer"
when
Item JVCVolume received command
then
// sendBroadcastNotification(receivedCommand.toString)
if (receivedCommand == DECREASE) {
sendBroadcastNotification(”-")
}
else if (receivedCommand == INCREASE) {
sendBroadcastNotification("+")
}
end
How do you cotrol the dimmer? If dimming through Basic UI/Paper UI/Apps you will get only absolute dimming. There are several ways to enforce an INCREASE/DECREASE Command, e.g. you could define a widget like this:
I guess, you can’t get information about the absolute dimm level either, so the best way would be to use a proxy item. The bound item would be of type String or Number (I can only guess, you will have to test this) and this item will not show up in the UI, but will only receive commands from a rule. This rule will be driven by the proxy item, which will appear in the UI. It doesn’t matter which item Type you chose, because you can only send UP/DOWN commands, the simplest one would be a switch item:
.items:
Switch pJVCVolume "JVC Volume" {autoupdate="false"}
Number JVCVolume "" {mqtt=">[broker:cmnd/JVCVolume/VOLUME:command:*:default]"}
rule "JVC Volume UP/DOWN"
when
Item pJVCVolume received command
then
if (receivedCommand==ON) {
JVCVolume.sendCommand(1)
sendBroadcastNotification("+")
}
else if (receivedCommand==OFF) {
JVCVolume.sendCommand(-1)
sendBroadcastNotification("-")
}
end