Rheem Hotwater heater, econet?

I spoke too soon. Something (version upgrade?, IDK) has changed and now about once a day I get a non-responsive command. Checking the state reports “unavailable”. The log only shows it took more than 10 seconds. I’m now going to make sure the log is in debug.

I’m trying not to come up with some way to alert or notify me that it has gone unresponsive? That way I’ll know to reboot.

Maybe this will be of help:

2019-04-04 23:31:06 ERROR (MainThread) [homeassistant.helpers.entity] Update for 
water_heater.hw fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in 
async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in 
async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/water_heater/econet.py", 
line 210, in update
    self.water_heater.update_state()
  File "/config/deps/lib/python3.7/site-packages/pyeconet/equipment/water_heater.py", line 111, in 
update_state
device_state = self.api_interface.get_device(self.id)
  File "/config/deps/lib/python3.7/site-packages/pyeconet/api.py", line 99, in get_device
return arequest.json()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 518, in loads
return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I’ve been away for a few days and will be downloading and running the latest starting today. I’m still receiving some debug responses which I’ve capture below, but I don’t know how much info that will give you. Hopefully the next round will be more detailed.

The best part about the latest version is that even when I get the errors, it doesn’t completely dump the entire status of the water heater. Before when the error was encountered, it would make it so that restarting HA was the only way to get the entity operating. Now, even when it fails to update, it regains control once communication is reestablished.

2019-04-01 22:16:10 ERROR (SyncWorker_3) [pyeconet.api] Failed to decode response
2019-04-01 22:16:10 DEBUG (SyncWorker_3) [pyeconet.api] <Response [408]>

@Phrede Well, I’m glad that the work that @w1ll1am23 has been putting into getting this back up and running wasn’t for nothing. Thanks for the update. Fingers crossed that we’re near the end of getting a final working product!

Based on your last couple of logs you have sent I think this is the best we can do. You have received a 504 and an 408 response from their API. Both of these are things we don’t have control over, but shouldn’t crash when we get them which doesn’t happen now.

@Phrede can you give 0b8 a try and let me know if your issues clear up?

Some additional ERROR logs.

2019-04-09 21:27:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for water_heater.heat_pump_water_heater_gen_4 fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x6f1feab0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='econet-api.rheemcert.com', port=443): Max retries exceeded with url: /equipment/67577 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6f1feab0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/water_heater/econet.py", line 210, in update
    self.water_heater.update_state()
  File "/config/deps/lib/python3.7/site-packages/pyeconet/equipment/water_heater.py", line 114, in update_state
    device_state = self.api_interface.get_device(self.id)
  File "/config/deps/lib/python3.7/site-packages/pyeconet/api.py", line 103, in get_device
    arequest = requests.get(url, headers=HEADERS)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='econet-api.rheemcert.com', port=443): Max retries exceeded with url: /equipment/67577 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6f1feab0>: Failed to establish a new connection: [Errno -3] Try again'))

Most of the DEBUGS are coming back with the following:

2019-04-09 21:22:10 DEBUG (SyncWorker_2) [pyeconet.api] <Response [200]>

AND another

2019-04-09 22:15:08 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.dona_lane_status fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 296, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 257, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 367, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 686, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 306, in _raise_timeout
    raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.86.10', port=81): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/zoneminder/sensor.py", line 84, in update
    state = self._monitor.function
  File "/usr/local/lib/python3.7/site-packages/zoneminder/monitor.py", line 94, in function
    self.update_monitor()
  File "/usr/local/lib/python3.7/site-packages/zoneminder/monitor.py", line 88, in update_monitor
    result = self._client.get_state(self._monitor_url)
  File "/usr/local/lib/python3.7/site-packages/zoneminder/zm.py", line 66, in get_state
    return self._zm_request('get', api_url)
  File "/usr/local/lib/python3.7/site-packages/zoneminder/zm.py", line 82, in _zm_request
    verify=self._verify_ssl)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.86.10', port=81): Read timed out. (read timeout=10)

Finally

2019-04-10 12:33:48 ERROR (MainThread) [homeassistant.helpers.entity] Update for water_heater.heat_pump_water_heater_gen_4 fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x6f20a3f0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='econet-api.rheemcert.com', port=443): Max retries exceeded with url: /equipment/67577 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6f20a3f0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/water_heater/econet.py", line 210, in update
    self.water_heater.update_state()
  File "/config/deps/lib/python3.7/site-packages/pyeconet/equipment/water_heater.py", line 114, in update_state
    device_state = self.api_interface.get_device(self.id)
  File "/config/deps/lib/python3.7/site-packages/pyeconet/api.py", line 103, in get_device
    arequest = requests.get(url, headers=HEADERS)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='econet-api.rheemcert.com', port=443): Max retries exceeded with url: /equipment/67577 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6f20a3f0>: Failed to establish a new connection: [Errno -3] Try again'))

So one of those errors is for a different platform zoneminder so it kinda looks like some sort of network issues on your side maybe? Either way I think things are good, we are handling the errors correctly now, and it isn’t getting in to a state where it is sending a bad equipment ID.

Mine has run fine for a couple of days. Not an acid test but is sure looking good.

The log still shows a few of these:
Update of water_heater.hw is taking over 10 seconds
10:53 PM main.py (WARNING) - message first occured at April 11, 2019, 3:30 AM and shows up 109 times
Update for water_heater.hw fails
8:46 PM deps/lib/python3.7/site-packages/pyeconet/api.py (ERROR) - message first occured at April 11, 2019, 4:01 AM and shows up 6 times

But it never goes unresponsive needing a restart.

BTW, the OCD part of me will mention that occurred has two r s.

Okay good deal. I will work on getting this beta version pushed officially.

I wonder of that occurred miss spelling is in HA or if that is something built in to the python3.7 logging library. :thinking:

Unfortunately, just hours after my comment this it failed. I’ve had repeated failures, sometimes after just an hour. I think this is a clue. It ran without failure for days then, quickly repeated. Hmmm.

It seems like maybe something else is effecting it? Of course, I’m trying to determine if that’s true. I reset last time without saving the log. I’ll snag it next time.

Are you running the beta pyeconet library?

Sorry, I’m not sure how to confirm versions. I have the custom component “water_heater” as downloaded from the homeassistant github last week. I’ve searched for versions info and found:

Metadata-Version: 2.1
Name: pyeconet
Version: 0.0.10
Summary: Interface to the unofficial EcoNet API
Home-page: http://github.com/w1ll1am23/pyeconet
Author: William Scanlon
Author-email: UNKNOWN
License: MIT
Platform: UNKNOWN
Requires-Dist: requests (>=2.0)
Requires-Dist: tzlocal
Requires-Dist: python-dateutil

UNKNOWN

in what I believe to be the libraries. I think this could be version 0.0.10

In econet.py I have found
REQUIREMENTS = [‘pyeconet==0.1.0b2’]

So I think your point of a version conflict may be valid. How do I find and install the beta version (0.1.0b2) library?

The most recent error info:

2019-04-16 00:31:06 ERROR (MainThread) [homeassistant.helpers.entity] Update for water_heater.hw fails

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 220, in async_update_ha_state
await self.async_device_update()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 379, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/econet/water_heater.py”, line 210, in update
self.water_heater.update_state()
File “/config/deps/lib/python3.7/site-packages/pyeconet/equipment/water_heater.py”, line 111, in update_state
device_state = self.api_interface.get_device(self.id)
File “/config/deps/lib/python3.7/site-packages/pyeconet/api.py”, line 99, in get_device
return arequest.json()
File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/local/lib/python3.7/site-packages/simplejson/init.py”, line 518, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.7/site-packages/simplejson/decoder.py”, line 370, in decode
obj, end = self.raw_decode(s)
File “/usr/local/lib/python3.7/site-packages/simplejson/decoder.py”, line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

In your econet.py change the 0b2 to 0b8 and restart. It will download to the newest version automatically.

Whoah! Mind blown! I thought I had to download the program each time and then change the version from that. It didn’t make any sense to me why it wasn’t being updated in the zip file when I downloaded it. That totally makes sense now.

FWIW, I haven’t had any issues other than what I posted several days ago. I haven’t had any lost connection which ultimately was requiring a complete restart of HA to correct.

@w1ll1am23 Thank you again for all of your support and for ensuring that this remains a successful component!

Update: After looking at the log and thinking everything looked familiar I went back and checked and the library was back to ob2. I changed it to ob8 and we will try again. Sorry for the confusion. Would this have reverted back to ob2 with a normal version update?

Problem still happening.

From my latest log for sure running 0b8

2019-04-19 13:16:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for water_heater.hw fails
Traceback (most recent call last):
  File "/usr/local/lib/python3 .7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in async_device_update await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/econet/water_heater.py", line 210, in update self.water_heater.update_state()
  File "/config/deps/lib/python3.7/site-packages/pyeconet/equipment/water_heater.py", line 123, in update_state for equipment in vacation.get("participatingEquipment"):AttributeError: 'str' object has no attribute 'get'

FWIW I am also having many forgotten Zigbee devices. Related or not, IDK

Your line numbers don’t line up with what I have which makes me think you are running 0b8? It is possible it failed to download? Can you check to make sure you updated the version correctly?

How to check the actual version installed?

try to run pip3 freeze | grep 'pyeconet' should spit out a line that looks like pyeconet==0.1.0b8 if you have the correct version.

1 Like
-bash:: command not found

Maybe you forgot I am running Hass.io no pip.