Not able to connect to I2C sensors [Errno 121] Remote I/O error

Hi
I do have problem to connect to the I2C sensors PH, EC, EZO (temp), it has been working before.
They are I2C converted and I’ve tried both 3 & 5V.
I’ve set up the pumps and they are working, as below:

pi@raspberrypi:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- 33 34 35 36 -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --   

It should be like 60…?
Log says:

2021-05-23 22:51:04,725 - DEBUG - mycodo.devices.atlas_scientific_i2c_100_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 121] Remote I/O error
2021-05-23 22:51:04,725 - ERROR - mycodo.inputs.atlas_ec_e9cfd0b9 - Sensor read unsuccessful: [Errno 121] Remote I/O error
2021-05-23 22:51:04,726 - ERROR - mycodo.inputs.atlas_ec_e9cfd0b9 - Cannot set a value of None. Must be a float or string representing a float. Check the sensor and Input module is working correctly.
2021-05-23 22:51:05,549 - DEBUG - mycodo.devices.atlas_scientific_i2c_99_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 121] Remote I/O error
2021-05-23 22:51:05,549 - ERROR - mycodo.inputs.atlas_ph_3c8c0f71 - Sensor read unsuccessful: [Errno 121] Remote I/O error
2021-05-23 22:51:05,549 - ERROR - mycodo.inputs.atlas_ph_3c8c0f71 - Cannot set a value of None. Must be a float or string representing a float. Check the sensor and Input module is working correctly.
2021-05-23 22:51:05,935 - ERROR - mycodo.controllers.controller_input_147f1f6d - Mycodo is attempting to acquire measurement(s) from an Input that has already critically errored. Review the log lines following Input Activation to investigate why this happened.
2021-05-23 22:51:11,646 - ERROR - mycodo.controllers.controller_input_522bfc2d - Mycodo is attempting to acquire measurement(s) from an Input that has already critically errored. Review the log lines following Input Activation to investigate why this happened.

There was some merge for a couple of days what I can see in the forum but I have the latest releast 8.10.1

So neither your pH, EC, nor temperature sensors appear in the i2c-detect device tree when each is the only one connected at a time (no pumps connected either)?

I’ve now tried with only PH connected and it appears in:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- 34 -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

The disconnected pumps seems to have the same number?
The log still says:

2021-05-24 08:07:00,947 - DEBUG - mycodo.devices.atlas_scientific_i2c_99_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 121] Remote I/O error
2021-05-24 08:07:00,948 - ERROR - mycodo.inputs.atlas_ph_3c8c0f71 - Sensor read unsuccessful: [Errno 121] Remote I/O error

Strange that pumps and air temperature works with I2C but not the sensors, could it be some configuration I missed with carrier board? (they have I2C blue light)

Do you have the correct I2C address set in the Input settings?

I just converted 0x34 to integer, which is 52, so it appears you don’t have the correct I2C address set in your Input settings. I can tell because this log line shows you have the integer address of 99 set (which is 0x63):

Did you change the address on all your Atlas devices? It seems strange they wouldn’t be on the default addresses. They are wired to the same bus right?

the sensor didn’t had the default adress, I’ll guess it was connected when I addressed the pump. I added the default adress on them now again from Atlas instruction. now everythig seems to work properly

1 Like

HI There,

sorry for jumping in since this problem has already been solved but i believe i’m experiencing something quite similar although with another sensor,
Here’s my output log:

2021-05-29 08:57:08,837 - ERROR - mycodo.controllers.controller_input_6081d680 - initialize_variables() Exception: [Errno 121] Remote I/O error
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/controllers/base_controller.py”, line 74, in run
self.initialize_variables()
File “/var/mycodo-root/mycodo/controllers/controller_input.py”, line 316, in initialize_variables
self.measure_input = input_loaded.InputModule(self.input_dev)
File “/home/pi/Mycodo/mycodo/inputs/bme280_rpi_bme280.py”, line 89, in init
self.initialize_input()
File “/home/pi/Mycodo/mycodo/inputs/bme280_rpi_bme280.py”, line 98, in initialize_input
self.calibration_params = bme280.load_calibration_params(self.bus, self.i2c_address)
File “/usr/local/lib/python3.7/dist-packages/bme280/init.py”, line 153, in load_calibration_params
compensation_params.dig_T1 = read.unsigned_short(0x88)
File “/usr/local/lib/python3.7/dist-packages/bme280/reader.py”, line 40, in unsigned_short
return self._bus.read_word_data(self._address, register) & 0xffff
File “/var/mycodo-root/env/lib/python3.7/site-packages/smbus2/smbus2.py”, line 474, in read_word_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error
2021-05-29 08:57:08,839 - INFO - mycodo.controllers.controller_input_6081d680 - Activated in 358.9 ms
2021-05-29 08:57:08,840 - ERROR - mycodo.controllers.controller_input_6081d680 - Mycodo is attempting to acquire measurement(s) from an Input that has already critically errored. Review the log lines following In…

The sensor is recognized at the address 0x76 and is the second one i’m buying since the last one was only reading humidity and temperature and no pressure and VPD.

Any help would be highly appreciated
Thanks

Could you take a couple of screenshots of your settings for the input and the functions?

This is the sensor input, and just for your ref this is the link to the sensor i’m using.
I got the 5V version.

I haven’t got any functions written as all i’m getting when i try to add a widget on the dashboard is “No data, max age exceeded”.
I wanted to put another screenshot but the forum wouldn’t let me as i’m a new user.

and this is the same for all the other channels.

Thanks for looking into this.

image

thought i’d share this to show that the bus can actually see the sensor.

The Pi i2c bus is 3.3 default. Maybe your sensor doesnt work properly being powered from 3.3v.

Edit: or you are powering it from 5v, which could mean you are frying your pi pins. I think it depends on wether your sensor pulls to 5v

i am powering from 5V.
What do you mean i’m frying my pins? KyleGabriel in his tutorial also powers up from 5V.
How do i know if my sensor is pulling to 5V?

Fair enough. As long its not pulling the signal or clock to 5v with a build in pull up resistor. I see the 3.3v version does that, but it doesnt say anything about the 5v version, so maybe its all good:) Just be carefull with 5v devices on the 3.3v bus as he writes in the guide

image

i’ve connected to 3.3V on the Pi as it says it can be powered anywhere between 1.8 and 5V.
This is what i’m getting, which is totally out of scale. Other values are still not available.
I believe at this point a logic converter is my next step. Any other suggestion?

There are 3 different BME280 Inputs. Have you tried them all?

i have, and i think that humidity and temp [compared to other devices i have lying around] are quite ok.
Pressure still seems to be an issue.
image
this is pretty much standard value with all the 3 different libraries.

Okay. I misunderstood your issue. Your sensor looks like it’s being read just fine and the pressure looks typical. Why do you think it isn’t? Also, this really should have been a new topic, as it’s not related to the original.

I’ve just relocated in a place about 300 mtrs higher over the sea level than where i use to leave before, and didn’t realize that this obviously means that the pressure is lower :unamused:

About the post, it did start with the same error that’s why I thought about writing it here, but you’re right, the way it evolves it should have had its own thread.

Thanks for your help and most importantly thanks for MyCodo, is really awesome and easy to use, I’m a fan. Keep up the good work.

2 Likes