Hints to solve some scenarios in openHab (coming from homee)

I have at the moment the home automatisation system “homee” and I am trying to check how all scenarios can be solved via openHAB.

I have two rules in “homee” where I don’t know how I can solve this in openHAB.

1.) I tap “off” on the Philips Hue Dimmer Switch and the lights are turning off after 10 seconds (not immediately)

2.) I have a Philips Hue Dimmer Switch in the corridor where I can tap on “on” and this will trigger:
a) The Z-Wave Fibaro Motion Sensor will be activated
b) The Z-Wave Fibaro Switch will turn on the light

3.) If I tap on “off” on the Hue Dimmer Switch in the corridor this will trigger:
a) The Z-Wave Fibaro Motion Sensor will be de-activated
b) The Z-Wave Fibaro Switch will turn off the light

How can I solve this scenarios in openHAB?
Because the Hue Dimmer Switch isn’t a “Thing” in openHAB (in homee it is added as a controller, the don’t use the Philips Bridge)!

rule "Delayed off for lights"
when
    Item Hue_Dimmer_Switch changed
then
    if(receivedCommand == OFF || (Hue_Dimmer_Switch.state as Number) == 0){
        Thread::sleep(10000)
        Lights_Group.sendCommand(OFF)
    }
end

This is one way to do it. There are plenty of others including using a Timer.

I don’t know how or whether the Fibaro Motion Sensor can be separately activated so I’ll assume no.

Create an Unbound Switch that represents whether the Motion Sensor is activated or not. In rules that trigger from the Motion Sensor add:

    if(MotionSensor_Active.state == ON) {
        // Motion Sensor code
    }
```

This will cause the rules to only operate when MotionSensor_Active is ON.

Then in the activate rule:

```php
rule "Corridor switch ON"
when
    Item Corrifor_Switch receivedCommand
then
    if(receivedCommand == ON){
        MotionSensor_Active.sendCommand(ON)
        CorridorLight.sendCommand(ON)
    }
    else {
        MotionSensor_Active.sendCommand(OFF)
        CorridorLight.sendCommand(OFF)
    }
end
```

[quote="chrisonline, post:1, topic:30263"]
Because the Hue Dimmer Switch isn't a "Thing" in openHAB (in homee it is added as a controller, the don't use the Philips Bridge)!
[/quote]

According to the Philips Hue docs:

> The Hue bridge is required as a “bridge” for accessing any other Hue devices.

So you must use the Hue Bridge to use these devices with the Philips Hue binding. The older 1.x Hue binding also requires a Bridge.

I don't use these but I believe that once connected to the Bridge the device will show up as a ON/OFF Plugin Unit or Dimmable Plugin Unit Thing after auto-discovery.

Thanks for your tips, but the main problem is that the “Hue Dimmer Switch” is not a Thing/Item in openHab.
And the Hue Bridge does not send commands from the Hue Dimmer Switch to the openHAB. Only lamps are supported.

So I need a “workaround” to use my Hue Dimmer Switches (4 pieces) as the same as with homee.
Otherwise they are useless and I need new hardware buttons/switches from other manufactors.

Well… the only way that I can think of (after this discussion) is…
Use a TI ZigBee stick and the ZigBee binding and make the Switch an openHAB thing.

Great idea!! Thanks.
So I have the Hue Dimmer Switch as “thing” in openHAB and can do exactly the same as in homee!

But I don’t find any info if the Hue Dimmer Switch are really working with the ZigBee binding.
Any user out here who have connected the Hue Dimmer Switch with the ZigBee binding?