Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3m50 still failing for socket.timeout occasionally #197

Closed
cjkrolak opened this issue Nov 12, 2021 · 2 comments
Closed

3m50 still failing for socket.timeout occasionally #197

cjkrolak opened this issue Nov 12, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@cjkrolak
Copy link
Owner

after #78 was implemented I am still seeing a low level of socket.timeout failures on 3m50 thermostat, may need a longer delay.

2021-11-11 23:44:55: (session:1, poll:14) HEAT MODE [following schedule] act temp=66.5°F, set point=67, tolerance=2, override=68
DEBUG: get_current_mode entrypoint (switch position=1)
Traceback (most recent call last):
File "C:\Users\cjkro\onedrive\documents\github\ThermostatSupervisor\supervise.py", line 175, in

File "C:\Users\cjkro\onedrive\documents\github\ThermostatSupervisor\supervise.py", line 99, in main
while not api.max_measurement_count_exceeded(measurement):
File "C:\Users\cjkro\onedrive\documents\github\ThermostatSupervisor\thermostat_common.py", line 137, in get_current_mode
heat_schedule_point = int(self.get_schedule_heat_sp())
File "C:\Users\cjkro\onedrive\documents\github\ThermostatSupervisor\mmm.py", line 415, in get_schedule_heat_sp
result = self.get_schedule_setpoint(self.device_id.program_heat)
File "C:\Users\cjkro\AppData\Local\Programs\Python\Python39\lib\site-packages\radiotherm\fields.py", line 46, in get
envelope = json.loads(response.read().decode('utf-8'))
File "C:\Users\cjkro\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 465, in read
return self._readall_chunked()
File "C:\Users\cjkro\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 572, in _readall_chunked
chunk_left = self._get_chunk_left()
File "C:\Users\cjkro\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 555, in _get_chunk_left
chunk_left = self._read_next_chunk_size()
File "C:\Users\cjkro\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 515, in _read_next_chunk_size
line = self.fp.readline(_MAXLINE + 1)
File "C:\Users\cjkro\AppData\Local\Programs\Python\Python39\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

@cjkrolak
Copy link
Owner Author

original 10 second timeout deviation was based on data at this link: mhrivnak/radiotherm#47 (comment)
mean = 2.25, stdev = 1.25

added code to measure local network performance, both zones are currently performing within the 10 second limit with a 30 sample test, so failure must have been due to network congestion.
zone 0: mean=6.8, stdev=0.3, 6sigma=8.6
zone 1: mean=6.6, stdev=0.4, 6sigma=9.0

@cjkrolak
Copy link
Owner Author

updated testing with N=100:
zone 0: mean=6.9, stdev=0.5, max=9.9, 6sigma=9.9
zone 1: mean=6.9, stdev=1.7, max=20.4, 6sigma=17.1

based on this data I will use a 30 second timeout to avoid all possible timeouts due to network congestion.

cjkrolak added a commit that referenced this issue Nov 12, 2021
resolves #197, extending timeout delay and adding class method to mea…
@cjkrolak cjkrolak added the bug Something isn't working label Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant