TLDR: My Z-Wave dimmer is ‘stepping’ when controlled via openHAB and using the dimmer will block the on/off function from working.(config files below)
I’ve recently been evaluating options to migrate my 15 year old X-10 / Comfort home control system and have settled on openHAB for it’s flexibility and configurability.
I’ve started with a very simple Z-Wave setup to learn the ropes and have run in to a problem which I’m hoping someone might be in a position to help with…
Here’s my setup;
- OpenHAB 1.8.3 / z-wave binding 1.8 / habMin 1.5 (running in Windows 8 VM on unRAID)
- Aeon Z-Stick
- TKB Dual Paddle Wall Dimmer (this one)
- FOXX Smart Plug (this one)
I have the dimmer switch wired in and connected to the main ceiling light in the room. The smart plug has a lamp plugged in. I have successfully included the wall switch and smart plug to the z-wave network and have associated the smart plug to group 2 on the wall switch so that paddle one controls and dims the main light and paddle 2 will switch the smart plug (lamp) on and off. I also have the binding configured in openHab and, having configured my items and sitemap, can control the on/off operation of both lights from the openHab UI. So far so good.
My problem arises when I attempt to add a dimmer/slider to my setup…
Adding a slider to the sitemap to control the dimmer would result in the following behaviour;
- UI displayed up and down arrows instead of a slider (chrome on OSX)
- On/Off function would work OK
- In off state, slider/buttons would have no effect
- In On state, short click on slider/buttons would have no effect
- In On state, long click on slider down button would dim the light smoothly to zero (regardless of length of press)
- In On state, long click on the slider up button would brighten the light to 5%
Researching this, it became apparent that I needed a rule to manage the dimming (surprised!). My items, sitemap and rules are below. This is where I’m stuck. Here’s what happens;
- The On/Off function will work initially
- Once on, if I interact with the slider/buttons, the On/Off function will no longer work (I’ve got to switch the light off at the physical paddle)
- Dimming up and down works and reports the correct %, however…
- Between each 5% dim, the light goes off resulting in a very disconcerting flashing effect rather than the expected smooth dim.
My main questions are;
- Should I be setting up this device to have both on/off switch and dimmer slider. Is tis the correct approach?
- How can I get the dimming function to be smoother without flashing?
- What’s causing the dimming function to cause the on/off switch to stop working?
- Why is the slider control showing up as buttons?
- Can I add more than one rule to a .rules file or do I need a separate file for each one?
Hare are my config files;
ITEMS
Group gGF (All)
Group GF_Living "Living room" <video> (gGF)
Switch Light_GF_Living_Lamps "Lamps [%b]" <light> (gf_Living) { zwave="3" }
Switch Light_GF_Living_Main "Main Light [%b]" <light> (gf_Living) { zwave="2" }
Dimmer Light_GF_Living_Main_Dimmer "Main Light [%.1f %%]" <light> { zwave="2" }
SITEMAP
sitemap ourhouse label="Main Menu"
{
Frame item=GF_Living label="Living Room" {
Switch item=Light_GF_Living_Lamps label="Lamps [%b]"
Switch item=Light_GF_Living_Main
Slider item=Light_GF_Living_Main_Dimmer
}
}
RULES
rule "DimmedLight"
when
Item Light_GF_Living_Main_Dimmer received command INCREASE or
Item Light_GF_Living_Main_Dimmer received command DECREASE
then
logInfo("DimmedLight.rules","triggered")
var Number percent = 0
if (Light_GF_Living_Main_Dimmer.state != Uninitialized)
{
percent = Light_GF_Living_Main_Dimmer.state
}
if(receivedCommand==INCREASE) percent = percent + 5
if(receivedCommand==DECREASE) percent = percent - 5
if(percent<0) percent = 0
if(percent>100) percent = 100
sendCommand(Light_GF_Living_Main_Dimmer, percent);
end