(TLDR: If you’ve having this lost connection issue you can provide valuable troubleshooting information in this thread by going here, and then clicking the link to load your hub internal IP/port to test outside and separate from HA. Usually this page has basic hub details on it. If this page doesn’t load, it is most likely an issue with the hub itself. To be sure you can temporarily disable or restart HA. Try loading the hub local ip and port via your browser again and if the page doesn’t load, its a hub issue. If you want to ping the hub via command line remember that you cant ping a port so either telnet or use something like PaPing.)
I am currently troubleshooting this, or a very similar issue. I have a Insteon 2245-222 hub that is having very frequent periods of unresponsiveness to HTTP requests. Importantly, connectivity does eventually return without manual intervention, it can simply take a while. Wired lightswitches (2477D SwitchLinc Dimmers) and linked Mini remotes (2342-242) do not have issues and commands from them directly are always fine. Only HTTP requests fail.
I was curious about a way to track this to gather more information. Normal ping requests of the hub IP return successful whether it’s having an issue or not, however once you include the associated port you can see the issue. So a
telnet 192.168.1.123 25105
during an outage will be unsuccessful, but will be work fine while other HTTP requests are working.
(you can see your local hub IP and port by going to Get SmartLinc Info)
Attempting to find a way to actually track the outages I settled on PaPing which is a lightweight TCP port testing utility. Output looks the same as ping but you can point it at a port:
Above you can see the start to an outage. Keeping this running while researching today I noted the timestamps:
timeout start 3:04
timeout end 3:13
timeout start 3:27
timeout end 3:44
timeout start 3:55
timeout end 4:29 - power cycle
timeout start 4:47:35
timeout end 4:58
timeout start 5:39
timeout end 5:41 - power cycle
Given troubleshooting suggestions in this thread I confirmed an outage will resolve if I power cycled the hub.
I then tried setting up a firewall rule on my router to block the hub IP as well as stopping the home assistant container within docker.
These things had no effect as a new outage occurred anyway, however a power cycle did resolve it again.
Digging into the issue of the hub only allowing a single connection at a time I did find additional context here, however now things get a little murky. While it’s certainly true the hub will “lock out” other local connections, I’m not certain that is what is happening in my case, and others with this issue might want to review before making that assumption.
For one, I am able to successfully turn lights on and off via HTTP commands (browser or curl) on my desktop PC while simultaneously turning them on and off via the HA app on my phone, if not during an outage.
Second, I’ve had these outages occur without the HA container even running. I’ve also gone as far as unplugging my logitech harmony hub, alexa devices, and turning wifi off on my phone. I don’t believe there is anything else on my network that would ever establish a connection with the hub besides the insteon devices themselves.
Third, and possibly most strange, I discovered I can “brute force” a command through an outage and resolve it early.
If you aren’t familiar with insteon HTTP requests they look like:
http://USERNAME:[email protected]:25105/3?0262AABBCC0F11FF=I=3
http://USERNAME:[email protected]:25105/3?0262AABBCC0F1300=I=3
The first turns a light with device ID AABBCC on. The second turns a light with device ID AABBCC off. More info here.
To test if it works you can simply throw the request in your browser. Going just a bit further you can also use curl to make this request via batch file. Looks like:
@Echo off
curl http://USERNAME:[email protected]:25105/3?0262AABBCC0F11FF=I=3
Now I’m sure there are better ways of spamming HTTP requests, but I’ve just been spam opening the file a bunch. Usually around 5-10 times. The first or second request always fails, but with enough attempts, the requests seems to brute force their way through.
Here you can see the start to an outage, that I forced my way out of via spamming requests.
It’s like the hub is deciding to go to sleep randomly, but if you yell loud enough it will wake up.
From my perspective, the thing that would be really helpful would be the ability to log ANY network connections to or from the hub. That way, if it is actually this “single connection at a time” issue, I could see where that connection might be coming from. Sadly my router doesn’t have this capability. If you know how to do this via wireshark or other tool, please feel free to link a tutorial or let me know.