[APP][Pro&Cloud] Shelly

Yes, it solved problem, by default all devices had optical middle value equal to 50 instead of 0.5

Ok, will look into that and come up with a fix soon.

2 Likes

@Phuturist the i3 works fine :grin:https://m.facebook.com/story.php?story_fbid=1038743143187810&id=398138687248262

I was still having disconnects with my Shelly Plugs. I reinstalled them, and added them in the app through fixed IP with user/pwd login. But they continue (after a while) to say ā€˜unreachableā€™ with a red exclamation mark.

Accessing the plugs in a brower or via the Shelly App is no problem. Their WIFI signal is 2 stripes of the 3, so no connection problem. Except in Homey.

Any idea? Settings? Something else?

Can you restart the app, let it run until your plugs become unreachable and send a crash report from the app settings shortly after refering this issue as comment.

Done: 4d520b82-0c84-4ae3-a537-413845cbc604

The errors are due to the Shelly Plug being unreachable by Homey. This indicates network issues most likely due to the unreliable network stack from Homey. You could try increase the polling to see if that helps but there is nothing I can do about.

2020-06-16 22:10:03 [log] [ManagerDrivers] [shelly-plug] [1] FetchError: request to http://192.168.68.106/status failed, reason: connect EHOSTUNREACH 192.168.68.106:80
    at ClientRequest. (/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:311:20)
    at Socket.socketErrorListener (_http_client.js:426:9)
    at Socket.emit (events.js:311:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  message: 'request to http://192.168.68.106/status failed, reason: connect EHOSTUNREACH 192.168.68.106:80',
  type: 'system',
  errno: 'EHOSTUNREACH',
  code: 'EHOSTUNREACH'
}

Not sure what this means. Is this a problem with Homey (read: If I have to address this with the Athom helpdesk, Iā€™m not sure what to tell them)?

As far as I can tell yes. My app polls the IP address of every connected device every x seconds (5 by default). If Homey says an IP is unreachable while you can access it through the webinterface I can only assume there is something wrong with the network traffic from Homey to this device. If you are saying this is random and it does sometimes work that rules out a lot of other possible network related issues and points to the network stability of Homey. Iā€™m seeying this more with users that have a lot of WiFi devices connected to Homey.

Iā€™m afraid Athom will not help you much further but you can try. But also try to decrease the polling frequency to limit the traffic.

Indeed Athom is first asking about firewalls and access points to make sure nothing is being blocked and/or connected to the same network.

However, I think there might be something with the app as well. I first deleted the (red exclamation mark having) devices from Homey. Next I did a factory reboot of the Shelly plugs and re-added them as new devices (without any problem) to the Shelly Android app. Going back to Homey, the Homey Shelly app cannot find the devices (same network, good wifi, etc.). Apparently there is some history being stored and/or something else is wrong that the newly reset plugs cannot be found.

@Phuturist I expect to receive the Shelly Dimmer 2 today, Iā€™ll try to send you the output of http://yourshellyip/status tonight. And of course I would like to make a donation so you can buy your own Shelly Dimmer 2 soon. :slight_smile:

2 Likes

If the Shelly devices that you are trying to re-add have connection issues with Homey itā€™s likely these connection issues are also present during device discovery and your devices are not discovered. What happens if you manually try to add these devices in my app (this option is given in the paiing wizard if no devices are found during pairing).

If you really want to look into this further you can try and run the app from the command line using this tutorial. It will spit out extra logging on the command line when the app is run using the homey app run command.

I ran the app through the command line. The only message I get is attached. It looks like a time-out to some device that I donā€™t know. Maybe it is the door-window sensor that is asleep? I canā€™t see anything connection to that IP address on my router.2020-06-18_1535

Installing manually did work (activating restricted login with username and password on the Plug). The Shelly plugs are connected to the same network/AP as Homey. When I first installed the Shelly Plugs a few months ago, they were found by the Homey App automatically, now IĀ“m having problems adding them and they are losing connection.

LetĀ“s hope the factory reset did something and they stay connected now.

Itā€™s a Shelly Door/Window sensor that is refusing the connection. Seems like the username / password is missing or incorrect in Homey.

Could you do me a favor and run this debug version from the command line and while itā€™s running re-pair your Shelly plug. https://github.com/jghaanstra/cloud.shelly/tree/debug

Have you been adding a lot of WiFi devices since then? It would support my theory that Homey cant handle the network traffic when a lot of WiFi devices are connected. And has it shown the as unreachable since you have manually added it?

v1.22.3 - 2020-06-18

Add support for Shelly Dimmer 2

4 Likes

Tried the debug version. The only output it gives me is the same as the production version (cannot connect to DW sensor). I deleted a Plug and added it again (search first no result, then via the IP address). Log didnā€™t show anything.

Not connecting to the DW sensor is weird too. The IP address is correct and the Homey Shelly app is showing the open/close events in the log correctly.

I have not installed any new WIFI devices as far as I know. I believe the only WIFI connected devices are 5 Shelly devices (3 plugs, 1 door sensor, 1 shelly1).

What did change however is that I sold my Homey and replaced it with a Homey Pro last month. I reinstalled it thought the backup function that Athom offers. Could that be related to anything? Old/wrong caching data or something like that?

Maybe I need to remove the app and reinstall. Or would that make no difference?

Looks like I forgot to push the changes to GitHub with the extra debug logging. Could you redownload the debug branch and re-pair a Shelly plug while running the app from the command line again.

If you have setup the callback urls this is not strange. The sensor is reporting itā€™s status back to Homey but Homey canā€™t read out the sensor (for instance the battery level).

Donā€™t think so. Would be strange that you would be the only one effected by something like that out of 1300 users. Seems to be an isolated issue related to your setup / network and/or a specific scenario within my app that is not handled correctly. Try the debug version again.

ok, tested it again.

  1. I deleted the Plug from Homey
  2. I added a new device to Homey and selected the Shelly Plug
  3. Interestingly the search for a plug results in a wrong device showing up. It shows the Shelly1 Roller-Shutter device, which is already existing for the 107 IP address as a different device in Homey. See log:
    2020-06-19_1557_001
  4. I selected the Roller-Shutter one and added it. It now shows up with an exclamation mark in Homey (either because it is not a plug or because it is already added / duplicate)
  5. I again added a Shelly Plug, this time it cannot find any. It also doesnā€™t show the option button to add it manually. See log (and again it seems like it is doing something with the roller shutter switch):
    2020-06-19_1603

I added debug logging that would show all discovered devices. Since it does not show the plug can mean 3 things:

  1. the plug is not listening to mDNS discovery messages and does not announce itself to be discovered. You can check this by using Discovery for Apple and Bonjour browser for Windows and see if the plug is discovered using this program.
  2. Homey can not reach the plug because of network issues
  3. Something is wrong with Homey cache where it does not allow the device to be discovered because itā€™s thinks itā€™s been added already. You could test this using the homey app run -c command which will clear the cache. But it may also remove any other paired Shelly devices.

Seeying the previous connection issues Iā€™m still thinking its option 2 and that is out of my minds. There is nothing I can do anymore.

Correct, that was just for testing purpose. Adding a roller shutter as plug will not work. You should remove that device if you havent already. All your other remarks are related to this.

I just ran the debug version, since I have two Shelly devices in my network, and it looks like Homeyā€™s discovery mechanism is rather unstable: on the first discovery, I either get 0, 1 or 2 discovered devices (should be two).

It also looks like when it has discovered any number of devices, it will cache the results and keep on using them, which means that when it has discovered just one device, it will keep showing that single device on the pairing page, at least for some time (30 seconds?).