[APP][Pro&Cloud] Shelly

image

Control Shelly devices with Homey

  • Description: This Homey app allows you to control a wide variety of Shelly devices.
  • App Store Page: Shelly App for Homey | Homey (changelog is at the bottom)
  • Supported devices: All Shelly WiFI, Wave and Bluetooth devices are supported. See the app store description or this page for the full list.
  • Knowledge base: View the Shelly devices knowledge base here.
  • API documentation: If you want to know more about integration, check out the documentation here.

Help, I need support?!

Are you in need of additional support? Please use the e-mail link in the App Store Support Contact » so we can help you as soon as possible!

We are not actively monitoring this forum as it is hard to keep track of everything going on here and we will most certainly miss something.


Pairing with Homey (Pro)

Pairing instructions WiFi devices with Homey (Pro)

View the pairing instructions
  1. Make sure Homey and your Shellies have a static IP addresses assigned in your router and that Homey has a static IP address as well
  2. Add your Shelly device to the official Shelly smartphone app;
  3. Update the Shelly to the latest device firmware version by first connecting it to the Shelly cloud and then checking for any new firmware versions. You can disable cloud connection afterwards if you do not need it. The pairing wizard will an error or a white screen if you are on outdated firmware;
  4. 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 mDNS discovery even though it’s connected to your network you can try to reboot the Shelly from it’s webinterface and possible even Homey and try again or manually pair it using it’s IP address. If you still cant find your device you probably have a misconfigured network and will need to look into that.
  5. If it is a battery operated device make sure to keep it awake during pairing. This often involves repeatly pressing the wake button at an interval during the pairing process. Read the device user manual how to wake the device (usually by single pressing a button inside or a pinhole outside the device). The pairing wizard will not discover your device or will stall during pairing with an error if you do not keep it awake correctly;
  6. If you have configured device authentication you are asked to enter these details as well during pairing.
  7. After confirmation your Shelly device is paired and you are good to go.

Pairing instructions Bluetooth (BLU) devices with Homey (Pro)

View the pairing instructions
  • Please be aware, Shelly BLU devices only work properly with Homey if you also have a Plus/Pro device connected to Homey which can serve as a Bluetooth Proxy. The Bluetooth implementation of Homey isn’t sufficient as it’s not properly implemented and has bad range.
  • Also be aware that the Plus/Pro device you choose to act as Bluetooth Proxy for Homey wont be able to send the status of the Shelly BLU to Shelly cloud for the mobile app as well. You will need to choose or use separate Plus/Pro devices for this.
  1. Pair the Shelly BLU device with the official Shelly app. You will be asked to pair it with a Plus/Pro device. Best would be to choose a Plus/Pro device which you wont be using as Bluetooth proxy for Homey. Plus/Pro devices which will be used as Bluetooth Proxy for Homey wont be able to also send the status of the Shelly BLU to Shelly Cloud for usage in the mobile app as well;
  2. Next, pair your Shelly BLU device with Homey using the Bluetooth device driver. Make sure you have the device close to Homey during pairing;
  3. When the device discovery process is running send a Bluetooth signal from the device, for instance by pressing a button on the device;
  4. Repeat step 1 and 2 until your device is discovered and pair it;
  5. Open the advanced device settings of a paired Plus/Pro device in Homey which you will be using as Bluetooth Proxy for Homey;
  6. Click the maintenance action for enabling the BLE Proxy on that Plus/Pro device.
  7. Check the Bluetooth settings of the Plus/Pro devices you have configured as Bluetooth Proxy to see if Bluetooth is enabled and Bluetooth Gateway is disabled. Reboot the Plus/Pro to make sure all changes are applied properly.
  8. Repeat the previous three steps for any other Plus/Pro device which you would like to use as a Bluetooth proxy for Homey as well.
  9. If you plan to use your Shelly BLU device as a presence beacon you will need to enable beacon mode on the Shelly BLU device. You can also customize the beacon presence timeout value (time after last detection before marked as away) under the Shelly BLU device settings in Homey.

Pairing instructions Z-Wave (Wave) devices with Homey (Pro)

View the pairing instructions
  1. Make sure the device is within range of Homey or any another device that acts as a Z-Wave router within your mesh;
  2. Follow the pairing wizard of your specific device. In the wizard it is explained how you can put your Shelly Wave device into pairing mode;
  3. Follow all the steps of the wizard and your Shelly Wave device is paired with Homey Pro.

Pairing with Homey Cloud

Pairing instructions Gen1/Gen2 devices with Homey Cloud

View the pairing instructions
  1. Add your Shelly device to the official Shelly smartphone app;
  2. Enable cloud on the Shelly device;
  3. Update the Shelly to the latest device firmware if needed;
  4. Then pair your Shelly device in Homey Cloud. Upon pairing you will initially be asked to enter the credentials of your Shelly cloud account.
  5. After confirmation your Shelly device is paired and you are good to go.

Pairing instructions Bluetooth (BLU) devices with Homey Cloud

View the pairing instructions
  1. Add your Shelly BLU device to the official Shelly smartphone app;
  2. Within the Shelly smartphone app connect your BLU device with a Plus/Pro devices which is already connected to the cloud;
  3. Afterwards make sure this Plus/Pro devices:
  • Is actually connected to the Cloud
  • Has Bluetooth enabled
  • Has the Bluetooth Gateway enabled
  • (you can reboot this device to make absolutely sure these settings are maintained)
  1. Then pair your Shelly BLU device in Homey Cloud. Upon pairing you will initially be asked to enter the credentials of your Shelly cloud account if this is the first Shelly device you are pairing over the cloud.
  2. After confirmation your Shelly BLU device is paired and you are good to go.

Pairing instructions Z-Wave (Wave) devices with Homey Cloud

View the pairing instructions
  1. Make sure the device is within range of the Homey Bridge or any another device that acts as a Z-Wave router;
  2. Follow the pairing wizard of your specific device. In the wizard it is explained how you can put your Shelly Wave device into pairing mode;
  3. Follow all the steps of the wizard and your Shelly Wave device is paired with Homey Bridge.

Known issues

Multichannel Shelly Wave devices dont show correct values and/or switches toggle main node as well.

There is a known bug in Homey with setting multichannel Zwave association upon pairing the device. You will need to go into the Zwave parameters under the main node and first change the association of group 1 from 1.1 to 1 and save it. Then change it back to 1.1 and save it again and the issue is resolved.

Shelly BLU devices do not work properly when only connected to Homey

Please be aware, Shelly BLU devices only work properly with Homey if you also have a Plus/Pro device connected to Homey which can serve as a Bluetooth Proxy. The Bluetooth implementation of Homey isn’t sufficient as it’s not properly implemented. Read the pairing instructions for Shelly BLU devices on how to configure a Shelly Plus/Pro device as Bluetooth Proxy.

Shelly Gas and TRV can not be controlled using Homey Cloud

Thats right, this is also mentioned in the app store page. If you missed this and was looking for cloud control of these devices you are out of luck. Allterco Robotics (company behind Shelly) hasnt implemented support for the capabilities of these devices in their Shelly Cloud API yet. They also wont anytime soon as for now there is no business case for them. The best thing to do is request support for this with their support team.

Shelly Wave can not be controlled with errors similar to TRANSMIT_COMPLETE_NO_ACK

Errors like these indicate connection issues between Homey and the Shelly Wave device. It sometimes helps to just reboot Homey but if the issue comes back you will need to solve this connection issue. The Z-Wave range from Homey Pro/Bridge is limited. Make sure the device is close to Homey Pro/Bridge or there are enough Z-Wave routing devices within the network to create a proper mesh.

Shelly devices that have smart meter capabilities do not show up as smart meter

The Shelly 3EM, Shelly 4Pro, Shelly EM en Shelly Pro 3EM are capable of measuring the consumption of a total house and act as a smart meter. The Shelly app for Homey registers these devices with the energy parameter cumulative set to true. This will add an extra setting under the device called "Include in total" allowing you to register it as a smart meter visible under the energy tab. There is however a bug in Homey where pairing these devices using the smartphone app will not register this cumulative parameter and thus will not allow you to register these devices as a smart meter. To enable the smart meter functionality for these devices you will have to pair them using the Web interface.

Inputs of the Shelly Wave i4 are not updated

There is an issue with all firmware version prior to 11.x with the Shelly Wave i4 where it doesn’t register input changes. You will need to find a way to update the firmware of your Shelly device. Currently Zwave OTA updates arent supported by Homey. A possible solution is to setup ZwaveJS2MQTT with an external Zwave stick and update the device from there.


Troubleshooting your setup

Users often blame the app when things are not working as expected but most of the time the issue is related to their own actions and/or (network) configuration and/or by not following the instructions posted here. Consider this, the app is used by 25000+ users with over 100.000 connected devices, if there arent other people with the same issue it’s probably something on your end. We cannot supply customer support for these situations as user network and configuration are out of our control. Having said that, the steps below help you to identify the most common user errors.

Start with rebooting Homey and your Shelly device and try again: this will solve most issues. If that didn’t work, continue with the troubleshooting steps related to your issue. As a last resort you could try and factory reset the Shelly device.

If you are still experiencing issues after completing these steps and you are sure they are not related to your configuration, you can contact us using our support email , possibly accompanied by a diagnostic report code from the app settings. Note that we are not actively checking this forum, so contacting us through our official support email address is the only way to get a relevant response!


Use this visual guide to understand where you issue is coming from (click on the image for a larger version).


1. Homey Pro: Timeout during pairing of gen1 device / any battery operated device on the icon select screen
  • If it’s a mains powered device and you receive a timeout / white screen 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.
  • If it’s a battery operated device and you receive a timeout / white screen during pairing, you should have read and followed the pairing instructions. You need to keep the device awake by pressing a button during pairing. Read the device user manual how to wake the device (usually by single pressing a button inside a pinhole or inside the device).

2. Homey Pro: Delayed status updates for gen1 devices or no updates for gen1 battery powered devices

If you experience delayed devices status updates for gen1 devices or no updates for battery powered gen1 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 communication.

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) look under "Internet & Security > Advanced > Enable CoIoT. Make sure it is enabled and the CoIoT peer setting is configured with the correct IP address of Homey and port 5683. It should look something similar to 192.168.0.10:5683. If the IP address does not match correct it and make sure Homey uses a static IP address so it doesn’t change again.


3. Homey Pro: Delayed status updates for Plus/Pro devices or no updates at all for Plus/Pro battery powered devices

If you experience delayed devices status updates for Plus/Pro devices or no updates for battery powered Plus/Pro devices at all it’s most likely caused by incorrect configuration of the outbound websocket. Homey opens a websocket server for Plus/Pro device and during pairing configures the Shelly Plus/Pro device to report status updates to this websocket server. Sometimes this configuration fails or is incorrect (for instance when Homey is not assigned a static IP address) causing status updates to fallback on the slower polling method. To fix this:

  1. Open the webinterface of your Shelly by entering it’s IP address in the browser.
  2. Go to Settings > Outbound websocket.
  3. Make sure the option is enabled and pointing to your Homey IP with port 6113. The address should look similar to ws://192.168.0.2:6113/ but with the IP address of your Homey. For connection type it should be set to TLS no validation.
  4. If this configuration is missing either re-pair the device or add it manually using these instructions.

4. Homey Pro: Device is unreachable errors (EHOSTUNREACH) for gen1 and gen2 (Plus/Pro) devices

If you experience no status updates and devices are 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. Also using different WiFi networks for 2.4 GHZ and 5GHz which are isolated or using client isolation within the network are common issues in this scenario.
  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 and Homey 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. Devices being unreachable is often a temporary state but if this flow fails consistently 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.

5. Homey Pro: Inconsistent Bluetooth device status updates

Please be aware, Shelly BLU devices only work properly with Homey if you also have a Plus/Pro device connected to Homey which can serve as a Bluetooth Proxy. The Bluetooth implementation of Homey isn’t sufficient. If you havent enabled a Bluetooth Proxy on any Plus/Pro devices yet first look at the pairing instructions for Bluetooth devices somewhere above here which you havent followed yet. If you did enable a Bluetooth Proxy but are still seeing inconsistent status updates for Bluetooth devices (for instance a BLU DW sensor only registering the open alarm and not the close alarm), even after rebooting the Plus/Pro device, check the following.

  1. Make sure Bluetooth is enabled, the setting Enable RPC is enabled and that Enable Bluetooth gateway is disabled on the Plus/Pro device which is acting as the Bluetooth Proxy. Restart the Plus/Pro device if you change any of these settings.
  2. Make sure the Homey BLE Proxy script (menu item scripts under the Web UI of the Plus/Pro device) is added (visible under scripts), set to auto start (switch in scripts list) and is currently running (pause icon in front of script - script that are not running can be started by clicking on it and pressing the start button) on the Plus/Pro device. If the script is not there, go into the Plus/Pro device advanced settings within Homey and first remove and afterwards add the BLE Proxy script again. Then start with step 1 again.
  3. Make sure the outbound websocket is configured correctly on the Plus/Pro device acting as Bluetooth Proxy. You can follow the steps as described under the troubleshoot guide Homey Pro: Delayed status updates for Plus/Pro devices or no updates at all for battery powered devices to troubleshoot this specifically.

If it still isnt working after these steps it could be a out-of-range issue or you not following the above steps correctly. You can check this to see if the BLE Proxy script actually receives the BLE advertisement events of your BLU device and if it’s actually forwarding them to Homey.

  1. You can do this by first enabling websocket debug in the Web UI of the Plus/Pro (it’s under settings > debug).
  2. Then head over to the Homey BLE Proxy script and add the following code console.log(BTHparsed); above the line with Shelly.emitEvent('NotifyBluetoothStatus', BTHparsed); around line 149.
  3. Now you can see which events the Plus/Pro device is actually receiving and is sending to Homey. If events are missing it’s most likely not following the pairing instructions and troubleshoot steps above (for instance still having the Enable Bluetooth gateway setting enabled) or it’s a range issue where the BLU devices is not within acceptable range of the Plus/Pro acting as BLE Proxy.
  4. If you do see the correct BLE advertisements but they are not reflected in Homey there is still something wrong with the outbound websocket connection of the Plus/Pro device acting as BLE Proxy. You should double check the steps as described under the troubleshoot guide Homey Pro: Delayed status updates for Plus/Pro devices or no updates at all for battery powered devices.
  5. If you still experience issues after triple checking all these steps please post:
  • a screenshot of the outbound websocket settings of the Plus/Pro device acting as BLE Proxy (as some users still do not read all the previous steps mention on how to configure that properly)
  • a screenshot of the Bluetooth settings of the Plus/Pro device acting as BLE Proxy (as some users still do not read all the previous steps mention on how to configure that properly)
  • a screenshot of the About page under the Homey settings in the Homey smartphone app (to see the versions and which IP address Homey has)
  • a screenshot of the Shelly BLE debug smartphone app with the BLE device paired (to see the model ID of the BLU device and to make sure the firmware is up to date)
  • the output of the console of the BLE proxy script from step 2 of the troubleshoot steps above (to see if the script is running properly and if there are BLE advertisements)
  • a diagnostic report from the app settings 5 minutes after a fresh reboot of Homey where you have made sure a BLE advertisement from the BLU device (like a motion) has taken place. Make sure you reference this ID you are given after sending this report in your post in this topic here.

6. Homey Pro & Cloud: Deprecation warning: 'This device might not be supported in the future'

Release 3.29.4 has removed all device specific drivers that have been deprecated since august 2022. There have been various ways that this has been communicated like changelogs, a message shown under the device view in the app and timeline notifications for deprecated devices but apparently you missed or ignored them all. Devices that are still using these deprecated drivers will stop functioning from release 3.29.4. You ill need to remove these devices in Homey and pair them again using the generic WiFi devices driver. You will have to fix your flows afterwards.


13 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.