Following on from my previous issue I have done a bit more troubleshooting and this is the error I get when I make a change on HADash,
2016-12-12 19:26:22,932 INFO switch.bedroom -> state = off, brightness = 30
2016-12-12 19:26:22,946 WARNING Unexpected error calling Dashing: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //10.3.6.250:3030/widgets/bedroom (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x762d0710>: Failed to establish a new connection: [Errno -2] Name or service not known',))
When I make a change on the HASS web UI I get the following error:
2016-12-12 19:28:38,073 INFO switch.bedroom -> state = on, brightness = 100
2016-12-12 19:28:38,090 WARNING Unexpected error calling Dashing: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //10.3.6.250:3030/widgets/bedroom (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x762d08f0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
The errors appear to be the same apart from this value 0x762d0710 in the HAS web UI change and this value 0x762d08f0 in the HADash change. I’m not sure if this is a red herring as this 0x value changes each time you toggled a light switch on or off on either the HADash or the HASS web UI.
Here is another error output when you CTRL+C out of hapush:
> 2016-12-12 21:01:45,142 CRITICAL Traceback (most recent call last):
> File “./hapush.py”, line 265, in run
> for msg in messages:
> File “/usr/local/lib/python3.4/dist-packages/sseclient.py”, line 64, in next
> nextline = self.resp_file.readline()
> File “/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/response.py”, line 380, in read
> data = self._fp.read(amt)
> File “/usr/lib/python3.4/http/client.py”, line 500, in read
> return super(HTTPResponse, self).read(amt)
> File “/usr/lib/python3.4/http/client.py”, line 529, in readinto
> return self._readinto_chunked(b)
> File “/usr/lib/python3.4/http/client.py”, line 614, in _readinto_chunked
> chunk_left = self._read_next_chunk_size()
> File “/usr/lib/python3.4/http/client.py”, line 552, in _read_next_chunk_size
> line = self.fp.readline(_MAXLINE + 1)
> File “/usr/lib/python3.4/socket.py”, line 371, in readinto
> return self._sock.recv_into(b)
> File “/usr/lib/python3.4/ssl.py”, line 745, in recv_into
> return self.read(nbytes, buffer)
> File “/usr/lib/python3.4/ssl.py”, line 617, in read
> v = self._sslobj.read(len, buffer)
Regardless of the error if I make a change and toggle a light on/off on the HASS web UI or I repeat the process on the HADash the changes are synced between each other, although you have to refresh the HADash webpage to see each change made from the HASS web UI.
@ReneTode I have tested removing every widget in main.erb except for 1 light switch (switch,bedroom) and I still get the above error on any light widget. This is how my widget is configured:
<ul>
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
<div data-id="bedroom" data-view="Hadimmer" data-title="Bedroom" data-color="255,255,255"></div>
</li>
I have also tried this as the widget, but get same issue
<ul>
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
<div data-id="bedroom" data-view="Hadimmer" data-title="Bedroom" data-color="#FF0000"></div>
</li>
The entity_id in HASS is light.bedroom, I read in the wiki that it is not possible to add the full entity_id such as light.bedroom into the widget. the “data-id” must be everything after the dot of the first part of the “entity_id” so “light.bedroom” would become “bedroom”. However this didn’t stop me from testing it with the full “entity_id” in “data-id” this didn’t work as expected
I’ve now also tested this with and without a HASS API-Key, with HASS on HTTPS and HTTP -no change in error
Any insight would be great