Atlas scientific pump not working: Error, No such file or directory: ‘/dev/i2c-’

Hi everyone,
I have just rewired my setup because of some issues with a faulty breadboard and after a fresh reinstall of Mycodo v. 8.13.7 (on Raspberry pi 400, 64bit OS) my atlas scientific pumps do not dispense any liquid.

I have checked the wiring and they are connected properly, they are in I2C mode (blue light is on) and they are detected via i2cdetect and their adresses are correct.
However, when I try to “send volume” the pump does not turn in any way. The error log shows this:

2022-04-14 21:13:14,404 - DEBUG - mycodo.devices.atlas_scientific_i2c_53_ - AtlasScientificI2C raised an exception when taking a reading: 'AtlasScientificI2C' object has no attribute 'file_write'

and also this was shown after the restart of backend and frontend :

2022-04-14 20:57:27,114 - ERROR - mycodo.devices.atlas_scientific_i2c_53_ - AtlasScientificI2C raised an exception when initializing: [Errno 2] No such file or directory: '/dev/i2c-'
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/devices/atlas_scientific_i2c.py", line 42, in __init__
    self.file_read = io.open("/dev/i2c-" + str(i2c_bus), "rb", buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-'
2022-04-14 20:57:27,116 - INFO - mycodo.outputs.pump_atlas_ezo_pmp_93fa12d6 - Initialized in 317.8 ms

So I suspect there are some issues with the software and not the hardware itself, but please let me know what do you think.

Thank you for your help!

This error indicates there are no I2C devices present. Do you have I2C enabled?

Yes I2C is enabled. I have 10 active I2C devices
Input: Atlas EC,Humidity,CO2,2x temperature
Output: 4x Atlas Ezo pump and DS3502 digital potentiometer for fan speed control

All these devices are working correctly (apart from the issue with CO2 sensor) and they are detected via i2cdetect and their adresses are correct.

I have tried to disable the I2C interface and the error log looked like this:

2022-04-16 10:28:49,059 - ERROR - mycodo.inputs.atlas_pt1000_4d60b0f4 - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:50,082 - DEBUG - mycodo.devices.atlas_scientific_i2c_100_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 110] Connection timed out
2022-04-16 10:28:50,082 - ERROR - mycodo.inputs.atlas_ec_c3f642cf - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:50,083 - ERROR - mycodo.controllers.controller_input_c3f642cf - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2022-04-16 10:28:50,222 - ERROR - mycodo.inputs.atlas_ec_c3f642cf - Calibration measurement not found within the past 10 seconds
2022-04-16 10:28:51,106 - DEBUG - mycodo.devices.atlas_scientific_i2c_103_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 110] Connection timed out
2022-04-16 10:28:51,106 - ERROR - mycodo.inputs.atlas_pt1000_a5aa9ec7 - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:52,134 - DEBUG - mycodo.devices.atlas_scientific_i2c_111_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 110] Connection timed out
2022-04-16 10:28:52,134 - ERROR - mycodo.inputs.atlas_humidity_2efd2bf2 - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:53,154 - DEBUG - mycodo.devices.atlas_scientific_i2c_102_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 110] Connection timed out
2022-04-16 10:28:53,154 - ERROR - mycodo.inputs.atlas_pt1000_4d60b0f4 - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:54,178 - DEBUG - mycodo.devices.atlas_scientific_i2c_100_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 110] Connection timed out
2022-04-16 10:28:54,178 - ERROR - mycodo.inputs.atlas_ec_c3f642cf - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:54,323 - ERROR - mycodo.inputs.atlas_ec_c3f642cf - Calibration measurement not found within the past 10 seconds
2022-04-16 10:28:55,202 - DEBUG - mycodo.devices.atlas_scientific_i2c_103_1 - AtlasScientificI2C raised an exception when taking a reading: [Errno 110] Connection timed out
2022-04-16 10:28:55,203 - ERROR - mycodo.inputs.atlas_pt1000_a5aa9ec7 - Sensor read unsuccessful: [Errno 110] Connection timed out
2022-04-16 10:28:55,203 - ERROR - mycodo.controllers.controller_input_a5aa9ec7 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.

After enabling the interface and a reboot of raspberry pi, the error log looked like this:

2022-04-16 10:31:22,567 - INFO - mycodo.daemon - Mycodo daemon v8.13.7 starting
2022-04-16 10:31:23,535 - ERROR - mycodo.devices.atlas_scientific_i2c_53_ - AtlasScientificI2C raised an exception when initializing: [Errno 2] No such file or directory: '/dev/i2c-'
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/devices/atlas_scientific_i2c.py", line 42, in __init__
    self.file_read = io.open("/dev/i2c-" + str(i2c_bus), "rb", buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-'
2022-04-16 10:31:23,541 - INFO - mycodo.outputs.pump_atlas_ezo_pmp_93fa12d6 - Initialized in 250.9 ms

All of the I2C devices are working, but the pumps aren’t but they are detected.
I have checked the relevant directory /dev/i2c and there is indeed no folder like this. Is this folder created during an install of mycodo?

If you do not have a /dev directory, you have severe issues with your system.

Also, if you look at what string is being generated from your configuration, you will see that you are not providing a bus number at all.

I’m sorry, the /dev directory is there. When I looked in there now I saw a “character device” file i2c-1 . But i don’t understand why is it that the bus number is not provided in Mycodo, when all of the other I2C sensors are working right now? Have I misconfigured something? Could I change the atlas_scientific_i2c.py file line 42 “/dev/i2c-” to “/dev/i2c-1” ?

No, you should not do this. The “i2c_bus” in io.open(“/dev/i2c-” + str(i2c_bus), “rb”, buffering=0) is configured in the Input settings. It is suggesting you have not set an I2C bus to be used.

1 Like

Oh I see! What s stupid mistake I made, of course I didn’t select the bus. I was setting up the system quite quickly and since this was pre-filled on the other devices I didn’t check that.

Well that’s solved, thank you very much!

1 Like

You’re welcome. I like simple solutions. I’m glad you got it working.