[APP][Pro&Cloud] Shelly

small

Control Shelly devices with Homey

App Store Page: Shelly App for Homey | Homey
Changelog: Shelly App for Homey | Homey

Description

This Homey app allows you to control a wide variety of Shelly devices.

Pairing instructions

View the pairing instructions
  1. Add your Shelly device to the official Shelly smartphone app;
  2. Update the Shelly to the latest device firmware version by first connecting it to the cloud and then checking for a new firmware version;
  3. Then pair your Shelly device in Homey. The Shelly app for Homey uses mDNS discovery for finding your Shelly device(s) on your network. If you are unable to find your Shelly device using discovery even though it’s connected to your network you can try to manually pair it using it’s IP address.
  4. If you have configured a username and password you are asked to enter these as well during pairing.
  5. After confirmation your Shelly device is paired and you are good to go.

Generic action event trigger card

Read how to use the generic action event trigger card for devices with inputs.

A lot of Shelly devices are capable of notifying Homey when a specific action has taken place like a short- or longpress of a switch. If you have paired a supported device and you want to use this functionality you can find the “Action Event” trigger card under the app flow cards and not under any specific Shelly device (so search for Shelly when adding the card in the flow). When you added the card to a flow you can select which device and what action should trigger your flow.

Troubleshooting your setup

Users often blame the app when thing are not working as expected but most of the time the issue is related to their own actions and/or configuration. These steps help you identify the most common user errors.

1. Timeouts during pairing for gen1 devices on the icon select screen

If you receive a timeout during pairing for gen1 devices, you should have read and followed the pairing instructions. Make sure you update the firmware of your device. You might need to connect your Shelly to the cloud before being able to see the latest available update.

2. Delayed status updates for gen1 devices

If you experience delayed devices status updates for gen1 devices or no updates / events for battery powered devices at all there could be multiple causes but all of them are related to the network traffic used for communicating status updates from Shelly devices to Homey. Shelly Gen 1 devices use a networking technique called CoAP. During pairing with Homey it tries to update the Shelly device where it enables CoAP and configures the IP address of Homey to allow communcation. Things to check:

  1. Make sure CoAP is (still) configured correctly. You can check this through the webinterface of the Shelly device by accessing it over it’s IP address (http://yourshellyiphere) and look under "Internet & Security > Advanced > Enable CoIoT. Make sure it is enabled with the correct IP address of Homey and port 5683.
  2. Make sure you do not skip a lot of major app version updates (by disabled auto updates). You could break the upgrade path and therefor break CoAP traffic. You will need to re-pair your devices to fix this issue.
  3. Make sure you have not accidently disabled CoAP communication from the app settings. This is an advanced setting for experienced users only. The tickbox under the app settings should be disabled.
3. No status updates or device is unreachable errors for gen1 and Plus/Pro devices

If you experience no status updates and devices appearing as offline in Homey while they are accessible through the native Shelly app or the webinterface there are issues with the network traffic between Homey and the Shelly devices. There are various things to check but in the end it could also be Homey’s own networking stack which has proven to be unstable for some users.

  1. Make sure Homey and your Shelly device are on the same local network (LAN) or any VLAN’s are configured correctly. Using VLAN’s could block the network traffic between devices and Homey.
  2. Make sure your network configuration allows unicast broadcasts which is needed for CoAP traffic. Default network configurations should allow this. Older Shelly firmare versions (< 1.10.x) only allowed multicast broadcast which could give issues on even default configuration but if you followed the previous instructions you have upgraded the firmware of your Shelly device already.
  3. Make sure you assign static IP addresses for your Shelly devices in your router. Check if the IP address of your Shelly still corresponds with the IP address under the device settings in Homey. Also make sure you can access the webinterface of your Shelly devices under that IP address (http://yourshellyip/).
  4. If you followed all previous steps but still experience delays or no communication check the error message under the device. If it’s something like EHOSTUNREACH or device not reachable Homey still cant reach your device. Make sure your WiFi signal of both Homey and your Shellies is stable. Things to check is that your WiFi channel is not set to auto but to a specific channel, for instance 1,6 or 11. You can try and test the network traffic between Homey and your Shelly device with the following flow where you replace the IP address of your Shelly device in the condition card (use /rpc/Shelly.GetConfig as endpoint for Plus and Pro devices instead of /settings). Devices being unreachable is often a temporary state but if this flow fails consistantly you are 100% sure there are still networking issues.
  5. If none of the above steps solved your issues and your WiFi is stable chances are it’s Homey’s own network stack which has proven to be unstable for some users. Sometimes this can be fixed by just restarting Homey. If the issue persists or comes back after some time it could be you are out of options. This especially can be the case for users that have a lot of WiFi devices connected to Homey. You could look into reducing the number of devices to see if that helps. Feel free to send me a diagnostic report from the app settings. Based on this I can at least confirm it’s indeed network issues. Do this by restarting the app, wait until the devices show as unreachable in Homey and send the diagnostic report from the device settings. Afterwards post the crash report ID in the support topic here together with extra information about your issue, like the firmware version, app version, Homey version and Shelly devices you have connected.
4. Flow not working but direct control from Homey works fine

If you experience flows not working as expected. Solution is most likely to update your flows as there have been breaking changes in the way the app works which requires you to update your flowcards. This is announced in the changelog but you might have missed that.

8 Likes

Changelog

The changelog is now available on the app page in the Homey store.

v1.1.0 - 2018-09-09

  • NEW: add support for the Shelly 2
  • REFACTORING: switched from request node module to node-fetch (reduced footprint from 7,5MB to 400 kB)

did order some units today, are you happy with the unit?

I only have one Shelly 1. I had some issue with connectivity at first but after fiddling around with it it’s now working very well. Only thing I really changed was disconnect the unit from the cloud. Not really needed anyway since I can control it using Homey. Other than that it all looks good hardware and software wise.

do i just need you app? no settings in unit?

You will need the Shelly smartphone app to setup the device (like configure the WiFi etc.). After that you should not really need it anymore. Controlling the device can be done through Homey.

Hello!

I buy a pair of shelly 1 and 2. The 1 works perfectly with homey, but the shelly 2 don’t work as a roller shutter. I push the button of relay 1 and relay 2 and nothing happens. With shelly android app they work perfect. I do anything wrong?

Captura

No, currently only relay mode is supported. I’d have to find out how to dynamically change the capabilities when it’s switched to roller shutter mode.

2 Likes

Thanks for fast reply!

Are you working on this? Need some donation for buy shelly 2?

If shelly 2 works fine for roller shutter is an excellent option in price, 20€ and not 50€ of fibaro and qubino roller shutters.

I worked on it this morning. It’s a bit of guessing without the actual device but I just pushed a new release to Github. Do you know how to do a command line install so you can test this?

If so, please be specific in your findings so I can try improve the support.

1 Like

Hi @Phuturist

I install your new version 1.2.0 and nothing changes.

if helps, in homey (preview) android app, i get this error when i click on relay buttons:

Something went wrong adressing device (name of device) (invalid_capability)

Shelly 2 is more complex than shelly 1, it have several options to configure:

I appreciate your work a lot. If you need more information I will help you as much as I can. Thank you!

You will need to repair the device as a “Shelly 2 Roller Shutter” device.

1 Like

OK!!

Re-paired as a roller shutter. Now shows 6 buttons, none of them works:

In theory shelly 2 only have 2 buttons, whit several options to work. If you need more info i give you some screenshots of the shelly app.

And every several seconds the device show as unreachable in homey, but really don’t loose comunication.

roller

I have uploaded a new release. You will need to remove and repair your Shelly 2 Roller Shutter device. Could you use the athom app run command and post any errors in the output here when pairing and controlling the device.

1 Like

App updated and devide re-paired. Now show 3 buttons and no go to unreachable.

But nothing happens when i click the buttons.

in command athom app run no info is displayed when i add the device and click the buttons:

again I thank you for all your work and help!! it seems incredible to me that without having the device you can make it work!!

Well, as you can see it’s not working yet and getting it to work without the device is not the most efficient way. But it should be possible. Don’t have a clue why it’s not working yet though, I’ll see if I can add some extra debug logging that should give me more hints on what is going on.

I have added extra debug logging in the latest version on GitHub. Could you use the CLI command athom app run, try and change the roller shutter from the device card and post the output from the console here.

1 Like

Here is the log I have in command prompt:

send command result is:
{ wifi_sta: { connected: true, ssid: ‘ubiquiti’, ip: ‘192.168.1.110’ },
cloud: { enabled: true, connected: true },
mqtt: { connected: false },
time: ‘00:00’,
serial: 37,
has_update: false,
mac: ‘827D3A5B270D’,
relays:
[ { ison: false,
has_timer: false,
overpower: false,
is_valid: true },
{ ison: false,
has_timer: false,
overpower: false,
is_valid: true } ],
rollers:
[ { state: ‘stop’,
power: 0,
is_valid: true,
safety_switch: false,
stop_reason: ‘normal’,
last_direction: ‘close’ } ],
meters:
[ { power: 0,
is_valid: true,
timestamp: 1542067208,
counters: [Array],
total: 0 } ],
update:
{ status: ‘idle’,
has_update: false,
new_version: ‘20181031-101144/v1.3.5@62608979’,
old_version: ‘20181031-101144/v1.3.5@62608979’ },
ram_total: 50560,
ram_free: 36968,
fs_size: 233681,
fs_free: 161644,
uptime: 120782 }
[ { state: ‘stop’,
power: 0,
is_valid: true,
safety_switch: false,
stop_reason: ‘normal’,
last_direction: ‘close’ } ]
rollers[0].state is: stop

This all looks good, I fixed another bug that prevented controlling the roller shutter. Could you try downloading and running it again.