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

Hi

i could need some help with implementing the devices of the Shelly family.
Especially the https://shelly.cloud/shelly2/ as i want to make my already electronic roller shutters smart and integrate them into HA.

I am acomplete noob so any help in any direction would be great.
Maybe somebody could even make a module. I would be glad to do testing etc.
I have found the API but do not know where to start:
http://shelly-api-docs.shelly.cloud/

1 Like

Little push…

They have updated their API documentation.
MAybe this helps somebody to help me how to implent this into HA :wink:

1 Like

Just ordered Shelly 1, wish can be integrated

Just flash Tasmota on it. Problem solved :wink:

I fried 2 POW and a Basic while flashing. I am done with flashing, no more for me.

How did you fry them? Applied more than 3.3 volts? That will make the smoke come out if so. But if it is just a bad or incomplete flash you just flash them again.

Sorry wrong term I used, English is not my primary language. Fried, in the sense that a firmware upload went bad and now they do not work.
It was my fault for sure, but nevertheless I will not flash again.
One was with Sonota.exe with OTA

Gotcha. Hard to permanently brick those things. Super easy to flash with the USB adapter. Bet I can flash them quicker and get them on the network faster than someone can pair them with the stock app now. Took me 20 minutes of trying one time and it kept failing so I have up and just flashed it.

Definitely don’t give up. The Tasmota firmware on a Sonoff is quite simply amazing all it can do for such a little cheap wifi chip.

From my simple/stupid knowledge it should be easier to use the available GET / POST arguments.
However i have no clue at all how to implement and how to call them?
Is curl a way?

1 Like

Looks like they already support the Shelly 1 and home assistant here.

http://shelly-api-docs.shelly.cloud/#shelly1-mongoose-os-application

Really worth watching:

1 Like

That’s great, but seems it needs to be flashed with the shelly1 Mongoose-OS application The video from @nickrout describes how to flash the Tosmota, which is great!

Using the video doesn’t that negate this entire thread since MQTT is already supported by HomeAssistant?

1 Like

What is great is that the manufacturer actually encourages and supports flashing other firmware, making all sorts of things possible.

1 Like

For those that want a simple way to use a Shelly 1 out of the box (with no flashing), this is one approach:

  - platform: command_line
    scan_interval: 2
    switches:
      counter_leds:
        command_on: '/usr/bin/curl -Ss "http://192.168.X.X/relay/0?turn=on" >>/tmp/foo 2>&1'
        command_off: '/usr/bin/curl -Ss "http://192.168.X.X/relay/0?turn=off" >>/tmp/foo 2>&1'
        command_state: '/usr/bin/curl -Ss "http://192.168.X.X/relay/0" 2>>/tmp/foo | grep ison.:true'

Change 192.168.X.X to match your devices IP address.

5 Likes

Thanks!
Would this work for shelly2 as well?

Fantastic, great

The API is the same. Change /relay/0 to /relay/1 for the second switch.

And now there’s this: https://gist.github.com/ispiropoulos/90a5f215e71f4dde635e3e3407fb5804

3 Likes