cjkrolak / ThermostatSupervisor

supervisor to detect and correct thermostat deviations
MIT License
0 stars 0 forks source link

Honeywell supervisor mysteriously stopped #40

Open cjkrolak opened 3 years ago

cjkrolak commented 3 years ago

session 3, poll 67, running on pi(), session stopped. free memory looks OK no traceback in supervisor log

/home/pi/log/pyhtcc/pyhtcc.txt shows this error message 2021-03-10 05:14:02,112 - pyhtcc.pyhtcc.py:190 - DEBUG - Unable to decode json data returned by GetZoneList on page {page_num}. Data was:

followed by some HTML page attached unexpected_error.html.txt

cjkrolak commented 3 years ago

03/18/21: during session 3, poll 28 it hung again on Pi, after trying to copy the output via CTRL-C this message appeared: DEBUG: get_current_mode entrypoint 2021-03-18 09:37:37: (poll=28) HEAT MODE [following schedule] actual=68, set point=68, override=68 ^CTraceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 377, in _make_request httplib_response = conn.getresponse(buffering=True) TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "supervise.py", line 169, in main(tstat_type) File "supervise.py", line 126, in main zone.refresh_zone_info() File "/home/pi/github/ThermostatSupervisor/honeywell.py", line 482, in refresh_zone_info all_zones_info = self.pyhtcc.get_zones_info() File "/home/pi/github/ThermostatSupervisor/honeywell.py", line 176, in get_zones_info result = self._post_zone_list_data(page_num) File "/home/pi/.local/lib/python3.7/site-packages/pyhtcc/pyhtcc.py", line 324, in _post_zone_list_data return self.session.post(f'https://mytotalconnectcomfort.com/portal/Device/GetZoneListData?locationId={self._locationId}&page={page_num}', headers={'X-Requested-With': 'XMLHttpRequest'}) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post return self.request('POST', url, data=data, json=json, kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, *kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1336, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 294, in recv_into return self.connection.recv_into(args, **kwargs) File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1821, in recv_into result = _lib.SSL_read(self._ssl, buf, nbytes) KeyboardInterrupt

Pyhtcc log tail shows: 2021-03-18 09:37:36,836 - pyhtcc.pyhtcc.py:290 - DEBUG - Used cache to say 1457408 -> LIVING ROOM 2021-03-18 09:37:37,765 - pyhtcc.pyhtcc.py:495 - DEBUG - Refreshed zone info for {self.device_id} 2021-03-18 09:40:37,867 - pyhtcc.pyhtcc.py:174 - DEBUG - Attempting to get zones for location id, page: 1357508, 1

cjkrolak commented 3 years ago

4/7/21: script hung on session 1 poll 123: 2021-04-07 15:55:20: (session:1, poll:120) OFF MODE [following schedule] actual=74 DEBUG: main: refreshing zone... DEBUG: get_current_mode entrypoint 2021-04-07 15:58:23: (session:1, poll:121) OFF MODE [following schedule] actual=74 DEBUG: main: refreshing zone... DEBUG: get_current_mode entrypoint 2021-04-07 16:01:26: (session:1, poll:122) OFF MODE [following schedule] actual=74 DEBUG: main: refreshing zone... DEBUG: get_current_mode entrypoint 2021-04-07 16:04:29: (session:1, poll:123) OFF MODE [following schedule] actual=74 DEBUG: main: refreshing zone...

/home/pi/log/pyhtcc/pyhtcc.txt tail: 2021-04-07 16:04:29,054 - pyhtcc.pyhtcc.py:497 - DEBUG - Refreshed zone info for 1457408 2021-04-07 16:04:29,055 - pyhtcc.pyhtcc.py:173 - DEBUG - Attempting to get zones for location id, page: 1357508, 1 2021-04-07 16:04:29,194 - pyhtcc.pyhtcc.py:176 - DEBUG - finished get zones for location id, page: 1357508, 1 2021-04-07 16:04:29,195 - pyhtcc.pyhtcc.py:173 - DEBUG - Attempting to get zones for location id, page: 1357508, 2 2021-04-07 16:04:29,315 - pyhtcc.pyhtcc.py:176 - DEBUG - finished get zones for location id, page: 1357508, 2 2021-04-07 16:04:29,316 - pyhtcc.pyhtcc.py:198 - DEBUG - page 2 is empty 2021-04-07 16:04:29,317 - pyhtcc.pyhtcc.py:290 - DEBUG - Used cache to say 1457408 -> LIVING ROOM 2021-04-07 16:04:29,780 - pyhtcc.pyhtcc.py:497 - DEBUG - Refreshed zone info for 1457408 2021-04-07 16:07:29,883 - pyhtcc.pyhtcc.py:173 - DEBUG - Attempting to get zones for location id, page: 1357508, 1

cjkrolak commented 1 year ago

another hang:

refresh_zone_info: trial 2 of 11 at 2023-02-07 23:51:06

email sent from module '<module 'thermostatsupervisor.email_notification' from '/home/pi/github/ThermostatSupervisor/thermostatsupervisor/email_notification.py'>' running on raspberrypi4 (127.0.1.1)
[log_msg]: smtp connection successful
[log_msg]: email account authorization for account cjkrolak2@gmail.com successful
[log_msg]: mail send was successful
[log_msg]: Email sent!
2023-02-07 23:51:13: (tstat:honeywell, zone:0, session:1, poll:76) HEAT_MODE [following schedule] act temp=65.0°F, act humidity=45% RH, set point=65.0°F, tolerance=2.0°F, override=65.0°F
revert_thermostat_mode: target_mode='UNKNOWN_MODE', doing nothing.
2023-02-08 00:01:23: (tstat:honeywell, zone:0, session:1, poll:77) HEAT_MODE [following schedule] act temp=65.0°F, act humidity=45% RH, set point=65.0°F, tolerance=2.0°F, override=65.0°F
revert_thermostat_mode: target_mode='UNKNOWN_MODE', doing nothing.
2023-02-08 00:11:32: (tstat:honeywell, zone:0, session:1, poll:78) HEAT_MODE [following schedule] act temp=65.0°F, act humidity=45% RH, set point=65.0°F, tolerance=2.0°F, override=65.0°F
^CTraceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/supervise.py", line 133, in <module>
    exec_supervise(debug=True, argv_list=argv_inputs)
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/supervise.py", line 113, in exec_supervise
    supervisor(api.uip.get_user_inputs(api.uip.parent_keys[0],
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/supervise.py", line 76, in supervisor
    measurement = Zone.supervisor_loop(Thermostat, session_count,
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/thermostat_common.py", line 1004, in supervisor_loop
    current_mode_dict = self.get_current_mode(
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/thermostat_common.py", line 325, in get_current_mode
    self.store_current_mode()
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/thermostat_common.py", line 350, in store_current_mode
    if self.is_heat_mode():
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/honeywell.py", line 369, in is_heat_mode
    return int(self.get_system_switch_position() ==
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/honeywell.py", line 606, in get_system_switch_position
    self.refresh_zone_info()
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/honeywell.py", line 725, in refresh_zone_info
    all_zones_info = self.pyhtcc.get_zones_info()
  File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/honeywell.py", line 258, in get_zones_info
    **self._get_outdoor_weather_info_for_zone(device_id)}
  File "/home/pi/.local/lib/python3.9/site-packages/pyhtcc/pyhtcc.py", line 555, in _get_outdoor_weather_info_for_zone
    result = self.session.get(
  File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/home/pi/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/pi/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/home/pi/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.9/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
KeyboardInterrupt

pi@raspberrypi4:~/github/ThermostatSupervisor $ 
cjkrolak commented 11 months ago

2023-01-17 15:33:35: (tstat:honeywell, zone:0, session:13, poll:105) HEAT_MODE [following schedule] act temp=68.0°F, act humidity=44% RH, set point=68.0°F, tolerance=2.0°F, override=68.0°F revert_thermostat_mode: target_mode='UNKNOWN_MODE', doing nothing.

^CTraceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/supervise.py", line 133, in exec_supervise(debug=True, argv_list=argv_inputs) File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/supervise.py", line 113, in exec_supervise supervisor(api.uip.get_user_inputs(api.uip.parent_keys[0], File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/supervise.py", line 76, in supervisor measurement = Zone.supervisor_loop(Thermostat, session_count, File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/thermostat_common.py", line 1004, in supervisor_loop current_mode_dict = self.get_current_mode( File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/thermostat_common.py", line 275, in get_current_mode self.query_thermostat_zone() File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/thermostat_common.py", line 154, in query_thermostat_zone self.current_setpoint = int(self.get_heat_setpoint_raw()) File "/home/pi/.local/lib/python3.9/site-packages/pyhtcc/pyhtcc.py", line 169, in get_heat_setpoint_raw def get_current_temperature_raw(self) -> int: File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/honeywell.py", line 725, in refresh_zone_info all_zones_info = self.pyhtcc.get_zones_info() File "/home/pi/github/ThermostatSupervisor/thermostatsupervisor/honeywell.py", line 247, in get_zones_info result = self._get_check_data_session(device_id) File "/home/pi/.local/lib/python3.9/site-packages/pyhtcc/pyhtcc.py", line 413, in _get_check_data_session ) File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/pi/.local/lib/python3.9/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/home/pi/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/pi/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/home/pi/.local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse