Home Assistant Community

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

#1

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

#2

Little push…

0 Likes

#3

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

1 Like

#4

Just ordered Shelly 1, wish can be integrated

0 Likes

#5

Just flash Tasmota on it. Problem solved :wink:

0 Likes

#6

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

0 Likes

#7

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.

0 Likes

#8

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

0 Likes

#9

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.

0 Likes

#10

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?

0 Likes

#11

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

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

0 Likes

#12

Really worth watching:

1 Like

#13

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!

0 Likes

#14

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

1 Like

#15

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

1 Like

#16

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.

3 Likes

Sonoff Alternatives?
#17

Thanks!
Would this work for shelly2 as well?

0 Likes

#18

Fantastic, great

0 Likes

#19

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

0 Likes

#20

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

3 Likes