After some research I figured out that the new AM2315C sensor is actually the AHT20 sensor on the inside. Ref: AM2315C - Encased I2C Temperature/Humidity Sensor (Adafru... | Little Bird
So I removed the AM2315 input and added the AHTx0 Input which is correct as the i2c address shows as 0x38
But Iβm still not able to get any data from it ![]()
Below are my logs:
2022-06-16 18:40:17,867 - ERROR - mycodo.controllers.controller_input_cb8c22c4 - initialize_variables() Exception: No I2C device at address: 0x38
Traceback (most recent call last):
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_bus_device/i2c_device.pyβ, line 174, in __probe_for_device
self.i2c.writeto(self.device_address, b"")
File β/var/mycodo-root/env/lib/python3.9/site-packages/busio.pyβ, line 169, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.pyβ, line 52, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File β/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.pyβ, line 314, in write_bytes
self._device.write(buf)
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_bus_device/i2c_device.pyβ, line 180, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File β/var/mycodo-root/env/lib/python3.9/site-packages/busio.pyβ, line 159, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.pyβ, line 59, in readfrom_into
readin = self._i2c_bus.read_bytes(address, end - start)
File β/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.pyβ, line 181, in read_bytes
return self._device.read(number)
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
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 317, in initialize_variables
self.measure_input = input_loaded.InputModule(self.input_dev)
File β/home/gg/Mycodo/mycodo/inputs/ahtx0_circuitpython.pyβ, line 56, in init
self.initialize_input()
File β/home/gg/Mycodo/mycodo/inputs/ahtx0_circuitpython.pyβ, line 62, in initialize_input
self.sensor = adafruit_ahtx0.AHTx0(
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_ahtx0.pyβ, line 49, in init
self.i2c_device = I2CDevice(i2c_bus, address)
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_bus_device/i2c_device.pyβ, line 61, in init
self.__probe_for_device()
File β/var/mycodo-root/env/lib/python3.9/site-packages/adafruit_bus_device/i2c_device.pyβ, line 183, in __probe_for_device
raise ValueError(βNo I2C device at address: 0x%xβ % self.device_address)
ValueError: No I2C device at address: 0x38
2022-06-16 18:40:17,897 - INFO - mycodo.controllers.controller_input_cb8c22c4 - Activated in 1803.4 ms
2022-06-16 18:40:17,899 - ERROR - mycodo.controllers.controller_input_cb8c22c4 - 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.
2022-06-16 18:40:32,473 - ERROR - mycodo.controllers.controller_input_cb8c22c4 - 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.
gg@raspberrypi:/dev i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
gg@raspberrypi:/dev i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: β β β β β β β β
10: β β β β β β β β β β β β β β β β
20: β β β β β β β β β β β β β β β β
30: β β β β β β β β β β β β β β β β
40: β β β β β β β β β β β β β β β β
50: β β β β β β β β β β β β β β β β
60: β β β β β β β β β β β β β β β β
70: β β β β β β β β
gg@raspberrypi:/dev $
Does this mean there is a wiring issue?
