Using OH2 to control AeonTec RGBW bulb via mqtt

I have a couple of these bulbs connected to OH via an AeonTec z-stick 5. I’d like to control all bindings, (brightness, color and temperature) using mitt, but I can’t find anything specific to these bulbs. Can someone point me in the right direction?
Thanks

If they are connected to a zwave controller then they only talk zwave. You can’t control them using MQTT. They don’t even talk on your home LAN. It is a completely separate special purpose wireless network.

That’s disappointing, but thanks.

By the way, any recommendations on an RGBW bulb that I can control via OH2?

You can control a Zwave RGBW bulb through OH. You should be able to control the one you already have.

Are there any example item configurations for these types of bulbs? I’d like to control them via a script.

You can only control them via the zwave binding. Or I suppose you could reverse engineer the protocol to communicate with the control or use some other third party tool but why would you when the zwave binding works perfectly well?

See the zwave README in the docs for how to use the binding, discover the Things and link them to Items.

I was able to get the bulbs to work in OH. I configured the Thing in PaperUI and setup an item in my items file something like this:

Dimmer ZLight "Example" <light> {channel="zwave:device:XXXXXXXXX:node3:somechannel"}

After setting it up in my sitemap, I can control the light from OH using PaperUI, BasicUI, etc.

What I need to do is control the via OH from an external trigger. For example, I have a few Wemo devices that I control using mqtt. Here is an item:
Switch PorchLight_Switch "Porch Light" <light> (gOutsideLights) {mqtt="<[openHabBroker:outside/porch_light_on:command:ON],<[openHabBroker:outside/porch_light_off:command:OFF]"}

I have a python script that runs periodically and given circumstances, sends an mqtt command to the broker which, in turn, triggers OH to toggle the bulb. I know I can’t use mqtt to control the zwave bulb, but is there an alternative way of achieving the same behavior with these zwave bulbs?

Thanks for your reply.

You could replace the second part of your python script (the one that toggles the bulb) with an openHAB rule.
The rule would fire on the condition of the MQTT bound item and toggle the Z-Wave bound light.

Example:

rule "Z_ON" // Turn ON ZLight when Porch Switch goes ON
when
	Item PorchLight_Switch changed from OFF to ON
then
	ZLight.sendCommand(100)
end

Since your ZLight item is Dimmer type, I give an example with a command that sends 100.
Maybe you can also use: ZLight.sendCommand(ON)

1 Like

That is a different question entirely and the answer is yes.

What you need is an item bound to the mqtt topic. When the item received a message it triggers a rule. There rule sends the desired commands to the items linked to the bulbs.

1 Like

I’ll try it. Thanks everyone!

1 Like

Just as a followup, I’m posting an example Item for one of my RGBW bulbs in case someone else needs help.

Dimmer ZGarage "Garage Light Brightness [%.1f %%]" <dimmablelight> {channel="zwave:device:8b948369:node3:switch_dimmer"}

Color ZGarage_Color_Control {channel="zwave:device:8b948369:node3:color_color"}
Switch ZGarage_Switch "Garage Light" <light> (gOutsideLights) {mqtt="<[openHabBroker:outside/zgarage_on:command:ON],<[openHabBroker:outside/zgarage_off:command:OFF]"}
Switch ZGarage_Color {mqtt="<[openHabBroker:outside/zgarage_color_on:command:ON],<[openHabBroker:outside/zgarage_color_off:command:OFF]"}```

A couple of rules to turn the bulb on and to set a particular color:

```rule "Turn on Garage Light"
when
        Item ZGarage_Switch received command ON
then
        ZGarage.sendCommand(100)
end```

```rule "Turn on garage holiday colors"
when
        Item ZGarage_Color received command ON
then


        val HSBType orange = new HSBType(new DecimalType(11),new PercentType(100),new PercentType(100))
        ZGarage_Color_Control.sendCommand(orange)
        ZGarage.sendCommand(100)
end
2 Likes