Shelly 1 and RGBW2 integration

Hi, I’m very new to openHub2 (installed yesterday).
I like to connect 2 Shelly 1 and 1 Shelly RGBW2 to OH2 via mqtt.
I’ve installed mosquitto and is running.

I need a very easy guide because mqtt is not clear to me…
Last thing: I’m moving to new home, so I cannot access to my MAC for now, only an IPad 2 or a linux PC at work, but out from my network so non openhab connection.

  • Platform information:
    • Hardware: Raspberry Pi 3b+
    • OS: openHabian (last)
    • openHAB version: last

How about reading this? Since you can not access your openHAB installation, you should have enough time to read!

Thank you.
I’ve read that and a ton of other stuff regarding mqtt and shellys.

Most of the literature are oriented in the remote programming (aka files) and there are very poor docs for paperUI implementation of shellys (most are mix of files and paperui).
I’ve tested all the hints found but after the creation of the item chain (from broker to switch) I have no status change when switch on the item.

There are some things you simply cannot do through PaperUI. For example, you cannot create a sitemap through PaperUI.

So almost all examples and tutorials will be a mixture of text configs and GUI based configs.

Outside openHAB

  1. Configure the Shelly to use MQTT and connect to your MQTT Broker
  2. Verify that Shelly is sending messages to the MQTT Broker and reacts to messages send to the Broker to the correct MQTT topics

Inside openHAB
3. Install the MQTT binding
4. Create an MQTT Broker Thing
5. Create a Generic MQTT Thing
6. Configure Channels on the Generic MQTT Thing to subscribe and/or publish to the Shelly 1 MQTT topics
7. Create Items of the appropriate types and link them to the Channels on the Generic MQTT Thing
8. Put those Items on your sitemap or HABPanel.


Thank you for help.
I’ve successfully connected booth Shelly 1 and RGBW2 to OH2 and i’m now able to switch on/off.

Now I’ve to implement some functions, but a lot of them requires JSON (i’ve installed the translator).
I now like to:

  • know if Shellies are online
  • know the state of the contact (as device response)
  • know the state of every channel of RGBW2
  • dim every channel of RGBW2
  • change the state of the item (in OH2) if I activate shellies by phisical switch.

How to do?

Network Binding

Subscribe to the status topic which is shellies/shelly1-<unique id>/relay/0 which you can do on the same Thing as the command Thing.

I can’t answer the rest. I don’t know the RGBWs.

1 Like

To add to this. If you want to know the status of the switch connected to the shelly1, you can use the state topic