Shelly wifi device integration

I was wondering if anyone has tried integrating the new Shelly wifi devices into smartthings? https://shelly.cloud/

There is a rest API, and as they are ESP8266-based there is also the possibility of flashing new firmware (similar to Sonoff devices) and bypassing the Shelly cloud altogether. In particular the Shelly 1 relay is very compact and could be useful for installing in switch boxes and/or a ceiling rose. the smoke detector also looks like it could be good.

2 Likes

It actually takes the Tasmota firmware so I’m assuming it takes all esp8266 based firmware as well. I’ve been waiting for one to come in-stock on Amazon for a few days now but haven’t seen one.

Hi,

the official website sais, it can support “smartthings” …
since the “shelly one” is really open source i will try my best - maybe need some support.

i ve ordered 2 of the shelly one … so we will see

The “can support smartthings” is reliant on someone creating an integration - there is not currently one available. I have also ordered one.

Given that it uses the same ESP8266 as the Sonoff Basic, it should be quite straightforward to edit the firmware at [RELEASE] Sonoff, Sonoff TH, S20, Dual, 4CH, POW, & Touch Device Handler & SmartApp ($5 & $10 Smart Switches) with the correct GPIO pins for the Shelly? GPIO4 = relay control, GPIO5 = switch.

You can if you get the source files to compile. I couldnt. But there is a patched version of Tasmota for the Shelly.

The source is located in Github.

I couldn’t get it to compile in the Arduino IDE. I keep getting the following error:

'class WiFiManager' has no member named 'setHostName'

Any idea what I’m doing wrong? Is there a custom library that i need?

I think you can comment that out. I may have added a functions to the library.

AH HA! So, I updated to v2.4.2 of the ESP8266 library and it compiled. :slight_smile: Thank you!!!

For anyone else who’s trying to compile it, i had to comment out the lines around setHostName and also the two lines with the function setProjectName. I also had to remove the lives for support of the fan speed for the ifan02. Those errored as well.

Submitted a pull request with updates for the Shelly1 per the devices specifications. Still waiting to get one since they are sold out completely for a while. :frowning:
Only other thing i did was wrap the fan speed stuff in an #ifdef.

1 Like

Thanks, I merged it into master. I don’t have one to test either, but it looked good and compiled just fine.

1 Like

Thanks! You always remember the first time you get merged. :sunglasses::clown_face:

1 Like

Just had a message to say that mine is in Bulgarian post…will hopefully get a chance to play with it next weekend.

1 Like

So I have my Shelly 1. Before I compile and try flashing, can anyone give me instructions as to how to backup and restore the existing firmware just in case it all goes wrong…?

I don’t. I also have not tested this firmware at all so i have NO idea if it will work.

So I found some posts on how to backup the flash memory, but can’t read the flash on the Shelly device for some reason.

esptool --port /dev/ttyS1 --baud 115200 read_flash  0x00000 2097152 backup.2097152."$(date +%Y%m%d%H%M)".bin

Gives the error:

esptool.py v2.1
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...

A fatal error occurred: ESP8266 ROM does not support function read_flash.

Is there a possibility to use the “original” firmware on those shelly devices and try to get a pass within the “official” REST API ?

You can, but then it’s a cloud integration that relies on your internet working. Would rather have it be local.

Just a massive warning notice for anyone planning to flash these devices:

Do NOT attempt to use the header pins when the Shelly is attached to mains power

The internal wiring is such that some pins (I think GND specifically) may be at mains voltage.

I mean, I wouldn’t recommend doing that with any ESP board, but while you might get away with it on some, these ones you definitely won’t!
:zap::zap::exploding_head:

1 Like

is it only in term of data privacy ? because my hubV2 does only work with internet working …

has anybody realized a “cloud integration” solution for those shelly devices to work with ST ?

1 Like