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

Handle defective I2C devices #60

Open
alex-sever-h opened this issue Jan 29, 2023 · 0 comments
Open

Handle defective I2C devices #60

alex-sever-h opened this issue Jan 29, 2023 · 0 comments

Comments

@alex-sever-h
Copy link
Member

Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]: Traceback (most recent call last):
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/bin/homesensorhub", line 8, in <module>
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     sys.exit(main())
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/homesensorhub/homesensorhub.py", line 88, in main
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     homesensorhub = HomeSensorHub()
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/homesensorhub/homesensorhub.py", line 31, in __init__
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     self.__sensors = self.find_sensors(probe_functions)
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/homesensorhub/homesensorhub.py", line 78, in find_sensors
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     sensor_list = function(mqtt_sender.send_payload)  # TODO: Send a generic sender callback. # noqa
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/homesensorhub/sensors/probe.py", line 21, in probe
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     return cls.functional_probe(cls, send_payload_callback, lock)
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/homesensorhub/sensors/BoschBME/probe.py", line 31, in functional_probe
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     sensor.temperature
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bme280/basic.py", line 205, in temperature
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     self._read_temperature()
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bme280/basic.py", line 119, in _read_temperature
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:     while self._get_status() & 0x08:
Jan 29 20:19:56 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bme280/basic.py", line 152, in _get_status
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     return self._read_byte(_BME280_REGISTER_STATUS)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bme280/basic.py", line 303, in _read_byte
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     return self._read_register(register, 1)[0]
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bme280/basic.py", line 314, in _read_register
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     return self._bus_implementation.read_register(register, length)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bme280/protocol.py", line 25, in read_register
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     i2c.readinto(result)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_bus_device/i2c_device.py", line 67, in readinto
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     self.i2c.readfrom_into(self.device_address, buf, start=start, end=end)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/busio.py", line 106, in readfrom_into
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     return self._i2c.readfrom_into(address, buffer, stop=stop)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 56, in readfrom_into
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     readin = self._i2c_bus.read_bytes(address, end - start)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:   File "/usr/lib/python3.10/site-packages/Adafruit_PureIO/smbus.py", line 181, in read_bytes
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]:     return self._device.read(number)
Jan 29 20:19:57 sensors-livingroom-balcony homesensorhub[507]: OSError: [Errno 121] Remote I/O error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant