-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
non responsive screen after install and reinstall several time.
2025-12-22 23:43:34,549 - ERROR - Failed to connect to display: No baud rate suited
2025-12-22 23:43:34,550 - ERROR - Failed to connect to display: No baud rate suited
2025-12-22 23:43:34,550 - ERROR - Error in listen(): No baud rate suited
2025-12-22 23:43:34,554 - ERROR - Traceback (most recent call last):
File "/home/mks/display_connector/display.py", line 1143, in listen
await self.display.connect()
File "/home/mks/display_connector/src/communicator.py", line 40, in connect
await self.display.connect()
File "/home/mks/display_connector/src/tjc.py", line 183, in connect
await self._try_connect_on_different_baudrates()
File "/home/mks/display_connector/venv/lib/python3.13/site-packages/nextion/client.py", line 205, in _try_connect_on_different_baudrates
raise ConnectionFailed("No baud rate suited")
nextion.exceptions.ConnectionFailed: No baud rate suited
I changed the BUADRATE to [115200] in constant.py and then get new error :
2025-12-22 23:43:50,566 - ERROR - Error in subscription or stream processing: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
2025-12-22 23:43:50,567 - ERROR - Error in listen(): int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
2025-12-22 23:43:50,579 - ERROR - Traceback (most recent call last):
File "/home/mks/display_connector/display.py", line 1195, in listen
await self.handle_status_update(data)
File "/home/mks/display_connector/display.py", line 1901, in handle_status_update
self._update_misc_states(new_data, data_mapping)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mks/display_connector/display.py", line 1932, in _update_misc_states
self.filament_sensor_state = int(sensor_data.get("enabled", 0)) == 1
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
I then changed the block out in display.py line around 1931ish to :
if f"filament_switch_sensor {self.filament_sensor_name}" in new_data:
sensor_data = new_data[f"filament_switch_sensor {self.filament_sensor_name}"]
enabled = sensor_data.get("enabled")
self.filament_sensor_state = int(float(enabled)) == 1 if enabled is not None else False
And the display now works perfect for me!