It seems after a few of hours that my dashboard (running on Safari iOS on iPad) is no longer responding properly. I refresh of the URL gets it back but it’s a but annoying to have to randomly refresh the dashboard to get it controlling things again.
Looking on my Appdaemon server I see the following which I assume is the event causing the disconnect of the dashboard:
Fatal read error on socket transport
protocol: <RequestHandler none:none connected>
transport: <_SelectorSocketTransport fd=19 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/selector_events.py", line 724, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 60] Operation timed out
2017-08-17 00:11:25.155325 INFO Dashboard disconnected
@aimc So I ran it on a desktop browser, when I saw the error again I look at the Javascript console errors for Safari. I found:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://:5050/css/materialdesignicons.min.css.map
Failed to load resource: the server responded with a status of 404 (Not Found)
http://:5050/css/materialdesignicons.min.css.map
Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.gridster.css.map, line 0)
http://:5050/css/dist/jquery.gridster.css.map
Looks like you are running on Python 3.6 - I am running on 3.5, I wonder if there is some kind of issue there? I’m running iOS as well, how often does this happen? I don;t see the same error in my setup.
So far the errors are thrown on my mac (where Appdaemon is runnign) a few times a day. So far my last one was at 22:50 last night, nothing since then. I wonder if I should downgrade to Python 3.5?
What type of OS are you running your Appdaemon on?
I might have to head that direction. Although I just got my build of HA just about done (only need to get Alexa moved to HA from my ST hub) their are just too many work arounds I have in place on the mac. Just need to decide if I want to run it on a Rasberry Pi or just load a piece of gear I have here in the house with linux.
For now I am restarting the Appdaemon every 15 mins and this seems to be avoiding the issue although I still find that after long periods of not using HADashboard, say over night, the iPads all need to have their dashboard reloaded to work.
So I tried following your setup @aimc. I loaded up Ubuntu 16.04.3 in a virtualbox VM and made sure my python version was 3.6. So far so good. It’s only been really setup since today but it seems the dashboards on the iPads are not losing their connectivity. For S&G’s I left one also running on OSX and that iPad lost contact with the dashboard not updating but the other two both homed ot the Ubunutu VM seemed okay.
Tomorrow AM will be the test to see if they can make it through the night…
So @aimc my dashboards worked perfectly. One last question on the topic, do you run your AppDaemon in native Ubuntu or Docker?
My current setup is as I said on a Mac using docker (HASS, mosquitto and smartthings-mqtt-bridge) except for AppDaemon and a Life360 script to grab presence/location data which both run natively on the mac. Mac for docker has issues requiring restarts so I was thinking of moving everything over to Docker inside the Ubunut VM.
That is interesting. I wonder if HA can just recover better. All I can say is that once that Python error showed up on Appdaemon my iPads lost their connection. So far (knock on wood) running Appdaemon inside the Ubuntu VM seems to not have either the Python error nor any iPad’s disconnecting.
The engineer in me wants to dig deeper to figure out what is going on but the desire to stop being yelled at by the wife that the iPad’s aren’t working is winning out right now so I am just happy to have the issue seemingly fixed even without a root cause identified.