Shelly Cloud - new Component? How to implement it? API is available

The CE brandis something the manufacturer put on and by doing it the state that the product is compliant. No tests is needed. So not really worth much anyway

Not totally true Yuran,

You can make any claim you want and stick a CE mark, just need to prove it:

Point is, just be extremely carefull on how you use ANY products when dealing with 230VAC and have questionable compliance.


This says it all…

But that is tru for all products unfortunately

Has anyone managed to set up Shelly RGBW2 over MQTT?

Did you try using these settings?

yes but can not get it to work, that is why I am asking if anyone managed to get it working, to share the config.

Well start troubleshooting.

What is your MQTT broker seeing?

What exactly is your config?

I don’t own the device but I have been helping devise the correct MQTT Light configuration for someone else. It would be helpful if you were to participate in the testing process. The latest iteration of the configuration can be found in this post.

1 Like

Hi - is auto discovery for Shelly’s available? I have a batch of 2.5s coming soon :grin:

This is just to make you know that I started to develop a custom-component for Shelly Cloud devices.
My idea was to be as much conservative as possible.

I’m aware that Shelly devices are awesome: they support LAN discovery, provide local monitor and control (Mqtt, CoAP), etc. The problem is that I wanted a stand-alone custom-component, I wanted to maintain the Cloud service (you lose it activating Mqtt on the devices) and I needed to handle battery-enabled devices (that require a minimum amount of network interactions).

The only solution I found was to interact with the Shelly Cloud server to discover the devices, monitor their status and control the switching functionalities (on/off).

You can enjoy the custom-component here:

In case of any issue, please, open a new issue directly on Github (follow the above mentioned link).



I am getting the following error after months without issues: “Integration shelly not found when trying to verify its switch platform.”
I am using this code:

  - platform: shelly
    name: "Sala - Luzes"
    path: /relay/0 (optional, defaults to /relay/0)
    username: xxxxxxx
    password: xxxxxxx

Anyone with this problem?

No. No one can help you. Please read How to help us help you - or How to ask a good question.

Thanks Vincenzo, I got your custom component installed last night on 0.91.3 and it’s working great (just needed a couple of restarts) :grinning:

Hello everyone, just got a couple of Shelly 1pm and Shelly 2.5 and I’m wondering how you guys are you using those to measure energy consumption.

I’ve read that shellies report energy in Watt-Minute every 30s. Does anyone have a solution to convert it to kwh and keep a track of it with utility_meter?

Thank you all!


for shelly 2.5 you can check this out:

I can’t find anything for Shelly 1pm. I just bought 2 of them but I cannot measure power consumption. Any idea?

With this script energy sensor is in kWh. But Shellies reset this meter on every reboot. You can use power sensor, integration sensor and utility_meter:

  - platform: integration
    source: sensor.shelly2_5b2604_power
    name: 'Shelly Energy'
    unit_prefix: k
    round: 2

    source: sensor.shelly_energy
    cycle: monthly

Hi gekomax,

Shelly 1pm works almost exactly as Shelly 2.5, follow my configs for both switch and sensors:

Closet AC Shelly Instant Power

- platform: mqtt
  name: "Closet AC Instant Power"
  state_topic: "shellies/shelly1pm-YOUSHELLYRID/relay/0/power"
  unit_of_measurement: "Watts"

Closet AC Shelly Instant Power

- platform: mqtt
  name: "Closet AC Energy"
  state_topic: "shellies/shelly1pm-YOUSHELLYRID/relay/0/energy"
  unit_of_measurement: "Wm"

Shelly 1PM AC Switch

  • platform: mqtt
    name: “Closet AC”
    state_topic: “shellies/shelly1pm-YOUSHELLYRID/relay/0”
    command_topic: “shellies/shelly1pm-YOUSHELLYRID/relay/0/command”
    qos: 1
    payload_on: “on”
    payload_off: “off”
    retain: true

Thanks! :+1: