I have an MQTT temperature sensor and an automation based on the temperature to turn a plug off and on. I have my aquarium heaters plugged into a smart outlet. Anytime the temperature goes over 85 degrees it should power off the outlet, and when the temperature drops below 84.75 it turns the outlet back on. However since the upgrade there are random times when the automation just stops working. The temperature keeps climbing and I have alerts setup to text me when it hits 86 degrees and those are working, but I’ll login to the UI of homeassistant and can see the temperature at 86 degrees and the outlet is still on. Anyone else having automation issues since the upgrade?
are you getting errors in the logs? I’m guessing the automation is working but the sensor/device is erroring out.
I’m not seeing anything specific to my automation or switch with an error, but decently close to when the automation should have been triggered I do have some Fatal Errors.
2018-05-24 19:14:56 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/selector_events.py", line 723, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
2018-05-24 19:14:56 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/websocket_api.py", line 360, in handle
msg = await wsock.receive_json()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_ws.py", line 404, in receive_json
data = await self.receive_str(timeout=timeout)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_ws.py", line 388, in receive_str
msg = await self.receive(timeout)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_ws.py", line 348, in receive
msg = await self._reader.read()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/streams.py", line 571, in read
return await super().read()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/streams.py", line 533, in read
await self._waiter
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 285, in result
raise CancelledError
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 381, in start
resp = await self._request_handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_app.py", line 322, in _handle
resp = await handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 88, in impl
return await handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/http/static.py", line 68, in staticresource_middleware
return await handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/http/real_ip.py", line 27, in real_ip_middleware
return await handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/http/auth.py", line 54, in auth_middleware
return await handler(request)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/http/view.py", line 104, in handle
result = await result
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/websocket_api.py", line 230, in get
return await ActiveConnection(request.app['hass'], request).handle()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/websocket_api.py", line 422, in handle
await self._writer_task
File "/usr/lib/python3.5/asyncio/futures.py", line 382, in __iter__
return self.result() # May raise too.
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/websocket_api.py", line 264, in _writer
await self.wsock.send_json(message, dumps=JSON_DUMP)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_ws.py", line 266, in send_json
await self.send_str(dumps(data), compress=compress)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/web_ws.py", line 255, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/http_websocket.py", line 609, in send
return await self._send_frame(message, WSMsgType.TEXT, compress)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/aiohttp/http_websocket.py", line 588, in _send_frame
await self.protocol._drain_helper()
File "/usr/lib/python3.5/asyncio/streams.py", line 211, in _drain_helper
yield from waiter
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/selector_events.py", line 723, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
Not sure if that helps or not…
Are you using websocket_api component? The error is coming from that component.
Actually just found one that specifically mentions my switch failing
2018-05-24 21:43:27 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.edimax fails
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x686a9df0>: Failed to establish a new connection: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.0.82', port=10000): Max retries exceeded with url: /smartplug.cgi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x686a9df0>: Failed to establish a new connection: [Errno 113] No route to host',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
yield from self.async_device_update()
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/switch/edimax.py", line 86, in update
self._now_power = float(self.smartplug.now_power)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/pyedimax/smartplug.py", line 205, in now_power
res = self._post_xml_now_power(self._xml_cmd_get_now_power("NowPower"))
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/pyedimax/smartplug.py", line 138, in _post_xml_now_power
res = requests.post(self.url, auth=self.auth, files=files)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.0.82', port=10000): Max retries exceeded with url: /smartplug.cgi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x686a9df0>: Failed to establish a new connection: [Errno 113] No route to host',))
I’m just using the Edimax Component. Not sure what it does behind the scenes:
- platform: edimax
host: 192.168.0.82
name: Edimax
Also using Template Sensor to monitor power usage out of this switch:
- platform: template
sensors:
edimax_watts:
friendly_name: "Current Power"
value_template: '{{ states.switch.edimax.attributes["current_power_w"]}}' # | float * 1000 | round(0)}}'
unit_of_measurement: 'W'
- platform: template
sensors:
edimax_watts1:
friendly_name: "Total Power Today"
value_template: '{{ states.switch.edimax.attributes["today_energy_kwh"]}}' # | float * 1000 | round(0)}}'
unit_of_measurement: 'KW'
That’s a connection issue looks like. Hard to say if it’s a bug or not. what does the connection look like to your device through other methods (outside ha)?
I’m sorry I don’t think I understand your question? I have Edimax’s mobile app i can use to connect to it, but other than that I only use Homeassistant to connect to it. I’ve just never had a problem with it until this 69.1 update.
Are you using python 3.5.3?
Yeah I’m on 3.5.3 right now
homeassistant@raspberrypi:/home/pi$ source /srv/homeassistant/homeassistant_venv/bin/activate
(homeassistant_venv) homeassistant@raspberrypi:/home/pi$ python
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
Did you change anything with your network? this stands out for me
[Errno 113] No route to host
You can downgrade fairly easily to make sure its not the system but the HA code and to make sure your fish are ok.
pip3 install --upgrade homeassistant==0.68.0