Shelly Plus Plug S (Gen2) with OH 3.4

Is there a way to get a Gen2 Shelly Plus Plug S running with OH 3.4 ?
I just installed 3.4.5-1 and it’s still not supported.
For the moment I don’t want to upgrade to OH 4.0.

1 Like

If the Shelly binding not yet supports new devices, you can always use mqtt and manually integrate the device.

If you Google for Shelly + mqtt you find some content

hi,
i’m on openhab 3.4.4 and use Shelly Dev Binding 3.4.5.202308020631.
My Shelly plus plug S is working.
Greets

Indeed, mqtt works fine. I’ve tested with my lab setup.

Any indication when the DEV binding 3.4.5 including Shelly Plus Plug S is going to be released? I somehow dislike using DEV versions in productive environments.

I wonder if it is worth waiting rather setting up an additional mqtt setup just for some Plug S Gen2.

I think there are no Updates for openhab3…

Only Dev versions are available for openHAB 3.x.x
There will be no feature updates, only bug fixes.

Hello! I always have a problem with integrating the Shelly Plus Plug S into Openhab. The adapter plug works perfectly in the Shelly app.
So I installed the Mosquitto Brooker on the Pi with Opbenhab 3.4. Then the Brooker is integrated into Openhab and everything is online. Then I put on a thing and connected it to the Brooker. And what happens next? I don’t know what you have to specify as a topic. I’ve tried a lot of things and only get error messages. Every now and then openhab simply logs offline for 5 minutes, then all the blinds in the house close and the alarm system goes on… I just want to integrate the switch. Does anyone have an idea how to get the new Shelly running in openhab via mqtt? I would be very happy. Thank you and best regards

Try to integrate the Shelly Plus Plug S using the thing type “Shelly Plus 1PM”.
The plug obviously acts the same way and provides the same basic functionality.
I’ve tried this and it works fine so far. The “Shelly Plus 1PM” is available as thing type in OH3.4

1 Like

Thank you very much… this really works. I was able to integrate the adapter plug straight away. Works perfectly. Thanks for the very quick solution. :slight_smile: Wish you a nice rest of the week.

1 Like

Thank you, @Lapu-Lapu and @RedTiger . This solution has helped me, too!

Hi there,
recently I configured both version Gen1 and Gen2 Shelly Plug Plus S in OpenHAB 3.4. Below you can find a Thing code for channels in both cases. Simply this channel only turn on/off a Shelly socket but the principle will be same with Shelly relays and other parameters.

Shelly Gen1

    UID: mqtt:topic:pihome:shelly
    label: Shelly zásuvka
    thingTypeUID: mqtt:topic
    configuration:
      payloadNotAvailable: off
      payloadAvailable: on
    bridgeUID: mqtt:broker:pihome
    location: MQTT
    channels:
      - id: Relay0
        channelTypeUID: mqtt:switch
        label: Relay0
        description: null
        configuration:
          commandTopic: shellies/shellyplug-s-XXXXXXXXX/relay/0/command
          stateTopic: shellies/shellyplug-s-XXXXXXXXXXX/relay/0
          off: off
          on: on

or Gen 2 structured MQTT message:

UID: mqtt:topic:pihome:shellyplusplugs-xxxxxxxxxx
label: Shelly PLug SW001
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: off
  payloadAvailable: on
bridgeUID: mqtt:broker:pihome
location: MQTT
channels:
  - id: relay0
    channelTypeUID: mqtt:switch
    label: Power Switch
    description: null
    configuration:
      commandTopic: shellyplusplugs-xxxxxxxxxxxx/rpc
      formatBeforePublish: '{"id":0, "src":"MQTT","method":"Switch.Set", "params":{"id":0,"on":%s}}'
      stateTopic: shellyplusplugs-xxxxxxxxxxxxxx/status/switch:0
      transformationPattern: JSONPATH:$.output
      off: "false"
      on: "true"

Detailed tutorial can be found in our original article here.

Hope it helps.

Majkee, OpenTUX

1 Like