Input errors when querying sensors

Hi Kyle,

i got the same issue as Mihail. I upgrade to master and restarted the backend. But every measurement except of these that are directly from the pi are all 0.

Thank you for your awesome work!

Edit: (attached the log)
2022-11-18 13:08:04,435 - INFO - mycodo.controllers.controller_input_cf0d80bd - Deactivated in 27.9 ms
2022-11-18 13:08:05,545 - INFO - mycodo.controllers.controller_input_391d44fe - Deactivated in 80.0 ms
2022-11-18 13:08:08,284 - INFO - mycodo.controllers.controller_input_cf0d80bd - Activated in 180.0 ms
2022-11-18 13:08:10,069 - INFO - mycodo.devices.atlas_scientific_i2c_1_100 - Atlas Scientific Board: EC, Rev: 2, Firmware: 2.15
2022-11-18 13:08:11,231 - ERROR - mycodo.inputs.ccs811_391d44fe - Error initializing, trying again in 5 seconds: [Errno 121] Remote I/O error
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/abstract_base_controller.py”, line 57, in try_initialize
self.initialize()
File “/home/pi/Mycodo/mycodo/inputs/ccs811.py”, line 74, in initialize
self.sensor = Adafruit_CCS811(
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_CCS811/Adafruit_CCS811.py”, line 83, in init
if(self._device.readU8(CCS811_HW_ID) != CCS811_HW_ID_CODE):
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_GPIO/I2C.py”, line 148, in readU8
result = self._bus.read_byte_data(self._address, register) & 0xFF
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.py”, line 199, in read_byte_data
ioctl(self._device.fileno(), I2C_RDWR, request)
OSError: [Errno 121] Remote I/O error
2022-11-18 13:08:14,148 - INFO - mycodo.controllers.controller_input_5fd5778a - Activated in 4773.2 ms
2022-11-18 13:08:16,238 - ERROR - mycodo.inputs.ccs811_391d44fe - Error initializing, trying again in 5 seconds: [Errno 121] Remote I/O error
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/abstract_base_controller.py”, line 57, in try_initialize
self.initialize()
File “/home/pi/Mycodo/mycodo/inputs/ccs811.py”, line 74, in initialize
self.sensor = Adafruit_CCS811(
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_CCS811/Adafruit_CCS811.py”, line 83, in init
if(self._device.readU8(CCS811_HW_ID) != CCS811_HW_ID_CODE):
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_GPIO/I2C.py”, line 148, in readU8
result = self._bus.read_byte_data(self._address, register) & 0xFF
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.py”, line 199, in read_byte_data
ioctl(self._device.fileno(), I2C_RDWR, request)
OSError: [Errno 121] Remote I/O error
2022-11-18 13:08:21,246 - ERROR - mycodo.inputs.ccs811_391d44fe - Initialization errored 3 times; giving up. Maybe the following traceback can help diagnose the issue.
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/abstract_base_controller.py”, line 57, in try_initialize
self.initialize()
File “/home/pi/Mycodo/mycodo/inputs/ccs811.py”, line 74, in initialize
self.sensor = Adafruit_CCS811(
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_CCS811/Adafruit_CCS811.py”, line 83, in init
if(self._device.readU8(CCS811_HW_ID) != CCS811_HW_ID_CODE):
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_GPIO/I2C.py”, line 148, in readU8
result = self._bus.read_byte_data(self._address, register) & 0xFF
File “/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.py”, line 199, in read_byte_data
ioctl(self._device.fileno(), I2C_RDWR, request)
OSError: [Errno 121] Remote I/O error
2022-11-18 13:08:21,248 - INFO - mycodo.controllers.controller_input_391d44fe - Activated in 10194.0 ms
2022-11-18 13:08:21,248 - ERROR - mycodo.inputs.ccs811_391d44fe - Error 101: Device not set up. See Error Codes - Mycodo for more info.
2022-11-18 13:08:26,262 - ERROR - mycodo.inputs.ccs811_391d44fe - Error 101: Device not set up. See Error Codes - Mycodo for more info.

1 Like

Do you have I2C enabled? This can be done via the command prompt with raspi-config or Mycodo UI Configure → Raspberry Pi → Enable I2C, than reboot.

I2C is/was enabled.
I set everything up like in your documentation.

I’m not sure what you’re referring to, I’ve never documented the CCS811 (I don’t even own this device).

Sorry for the imprecise formulation.
I set the raspberry and mycodo step by step as in your documentation for the smart hydroponic system described.
But by the every sensor, that isn’t included in the raspberry pi, no data is shown.
I tested this with the CCS881 and the Atlas Scientific EC Probe.

Try reflashing the OS and install Mycodo using influxdb 1.x.

Hi Kyle,

thank you for your help.
Unfortunately I couldn’t try this one out yet as I’m currently not home.
I will inform you if it works as soon as tried it. *

Hi Kyle,
now it’s working! Thank you.

1 Like