Is the device online and on the same WiFi network as Homey?
Yes, of course, both of them are online.
I only have one Wifi-network.
I can see both of them in the Shelly app, and can control them.
I can also reach the internal webpages (192.168.x.x) of both.
But Homey will only add one, after that it says: âEr zijn geen nieuwe apparaten gevonden.â
Dunno, is it possible to remove the currently paired device and do discovery again to see if both devices are shown in the pairing wizard.
I deleted the first Shelly Plug in Homey.
When trying to add again, the installer only shows me 1 Shelly device.
I checked all setting for both Shelly Plugs, they were exactly the same.
But it always shows me one device.
ButâŚI tried changing the IP-addresses for the Shelly Plugs and noticed the following is happening:
The Shelly device-installer only shows the first device, with the lowest IP-address.
So when Plug#1 has 192.168.1.1 and Plug#2 has IP 192.168.1.2, it only shows Plug#1.
When Plug#1 has 192.168.1.3 and Plug#2 has IP 192.168.1.2, it only shows Plug#2.
etcâŚ
It looks like the discovery bit in the software only shows the first device it comes acrossâŚ
Ok, I implemented the discovery bit from Athom. So either the documentation about this is not completely clear or incorrect, I have implemented it incorrectly or there is a bug in the discovery that only shows one device per discovery. Iâm gonna try and find out.
Did some more testing:
So I tried disconnecting the first Shelly Plug after I had it added to the Homey.
My thinking was: Homey will now discover/see only the 2nd one, and then I can add the 2nd Shelly Plug to the Homey.
But the second device still wasnât showing up on discovery.
Only after I deleted the first Shelly Plug from Homey (the one that was not plugged in), then the second Shelly Plug was immediately discovered by Homey.
Looks like some limit is in effectâŚ
Or maybe the app thinks the discovered devices are the same? Based on device type or something?
The host names are different when I look at the DHCP leases on my router, but whichever one is detected first, they both show up as âShelly Plug [192.168.1.1]â or âShelly Plug [192.168.1.2]â
Any ideas?
I also have two Shelly 1âs (still in box). I will try to make a test setup and see how they behave, when adding more then one. Will update laterâŚ
UPDATE:
The problem is with the Shelly Plugs only.
I just added two Shelly 1âs in the Shelly app.
Adding multiple Shelly 1âs to the Homey just works as expected.
Homey discovers all devices, and can add them as intended.
Looks like there is a limit (max. 1) for Shelly PlugsâŚ
Could both devices have the same internal id?
Nope:

Itâs good to hear the issue is only with the Shelly Plugs but that makes solving it even harder as all the drivers are similar in the way they discover devices. That also kinda rules out that itâs the Homey discovery process in general. They question asked by @robertklep would be the first thing to think of indeed as the discovery process filters based on device id but they look different indeed in your screenshot.
If you know your how to run an app from the command line I could create a debug version that spits out what the Homey discovery process detects. Perhaps that gives me more information. Let me know.
v1.13.0- 2019-09-29
NEW: added support for Shelly Humidity & Temperature sensor (thanx to Stefan Rehnberg for loaning the devices)
The Shelly HT Sensor and Shelly Flood Sensor go into WiFi sleep mode to save battery and only wake up once in a certain period or when a certain treshold has been met. This means Homey is only capable of reading out the device when it wakes up. During the time it sleeps it will poll the device with no result. I ask Allterco (the company behind Shelly) to add functionality where the device will call an endpoint to push itâs values when it wakes up to avoid having to poll devices that are not online. I have not heard anything from them but if you think this is a good idea go bug them about it. Perhaps they listen when more people ask about it.
Any chance you could add a calculation to the total consumption, as its in w/min now. Kwh would be more appropriate. I guess Wmin * 0.000017 = Kwh.
Yes, that will be no problem
You can submit a feature request on GitHub. And please mention what device, thatâs unclear in this text.
Try it with this branch: https://github.com/jghaanstra/cloud.shelly/tree/debug and let me know the output on the console.
So when both Shelly Plugs are online, and not yet added to Homey.
It only discovers one Shelly Plug:
2019-10-01 20:34:06 [log] [ManagerDrivers] [shelly-plug] DiscoveryResultMDNSSD { domain: null, _events: {}, _eventsCount: 0, _maxListeners: undefined, address: '192.168.1.54', host: 'shellyplug-7BA381', port: 80, name: 'shellyplug-7BA381', fullname: 'shellyplug-7BA381._http._tcp.local.', txt: {}, id: 'undefined', lastSeen: 2019-10-01T18:33:54.530Z }
When unplugging that Shelly from the socket it discovers another IP:
2019-10-01 20:22:40 [log] [ManagerDrivers] [shelly-plug] { undefined: DiscoveryResultMDNSSD { domain: null, _events: {}, _eventsCount: 0, _maxListeners: undefined, address: '192.168.1.58', host: 'shellyplug-7BA381', port: 80, name: 'shellyplug-7BA381', fullname: 'shellyplug-7BA381._http._tcp.local.', txt: {}, id: 'undefined', lastSeen: 2019-10-01T18:20:24.188Z } }
But with the same ID?
Looking at the DHCP leases on my router it says:
shellyplug-7BA381 192.168.1.54
shellyplug-F9CA99 192.168.1.58
In the result I see the TXT object is empty and the ID is undefined. This seems to be a bug in the mDNS of the Shelly Plug. It could also be in the Homey discovery protocol but since that is working fine for all other Shelly devices Iâm suspecting itâs the Shelly Plug firmware.
Only one way to find out, you should check how the discovery message of the Shelly Plug looks like using Discovery for Mac or Bonjour browser for Windows.
It somehow is mixing IPâs and hostnames if there are two Shelly Plugs available.
Probably because they have the same ID = undefined, it is discovered as one device.
But you are right, the Plugs give less info then the Shelly1âs:
FWIW, the mDNS/DNS-SD part of Shelly is purely used to advertise the built-in HTTP server, and not strictly for discovering devices. A (populated) TXT record is optional, and its contents are unstructured, so you canât really rely on them.
Iâve checked other Shelly implementations (both Node.js and Python) and they all use COAP for discovery.
As a quick fix, instead of using txt.id, use name as a unique identifier (provided that it isnât user-changeable).
Iâll use the host field as a unique identifier, I believe the name field is indeed user changeable. That will fix it for now. Still strange though that the mDNS implementation differs between Shelly devices. Anyway, thanx to the both of you for sorting this out.
v1.13.1- 2019-10-01
- IMPROVEMENT: added total power usage in KWh for Shelly 1 PM, Shelly2.5, Shelly Plug and Shelly Plug S (this requires the re-pairing of the device). The value from the Shelly device is in Wmin. The total power usage in KWh is calculated by doing Wmin * 0.000017.
- FIX: fix for discovery of multiple Shelly Plugs due to deviating implementation of mDNS in Shelly Plugs
