Issue with HTU21D on alternative i2c connection


#1

I’m using HASS version 0.81.1
Not succeeding to have sensor working.

HTU21D sensor not detected in bus 0
2:22 AM components/sensor/htu21d.py (ERROR)

Bad reading: 5
2:22 AM /srv/homeassistant/lib/python3.5/site-packages/i2csense/init.py (ERROR)

I even created a complete new clean build.
(sudo) i2cdetect -y 0 shows sensor at x40 !
In fact i’m using pins 28/29 to connect my sensor, having a ZigBee board using my first range of pins.

I tried a lot of solutions, including different entries in config.txt…

  • platform: htu21d
    i2c_bus: 0
    i2c_address: 0x40
    in configuration.yaml

Any help/suggestions welcome


#2

Similar issue here, but not on an alternative bus. After upgrading Home Assistant on a Raspberry Pi 3 B+ from 0.75.3 to 0.83.3 my HTU21D sensor is no longer detected. Any help will be much appreciated. Thank you.

See below for details.

home-assistant.log
2018-12-11 13:56:58 ERROR (SyncWorker_9) [homeassistant.components.sensor.htu21d] Bad reading: 5
2018-12-11 13:56:58 ERROR (MainThread) [homeassistant.components.sensor.htu21d] HTU21D sensor not detected in bus 1

configuration.yaml
sensor:

GPIO attached HTU21D Temp/Humidity sensor

  • platform: htu21d
    name: temp_humidity

Generic Thermostat…

climate:

  • platform: generic_thermostat
    name: Apartment 1 Thermostat
    heater: switch.apartment_1_heat
    target_sensor: sensor.temp_humidity_temperature
    min_temp: 70
    max_temp: 75
    target_temp: 72
    cold_tolerance: 1
    hot_tolerance: 1
    min_cycle_duration:
    seconds: 3
    keep_alive:
    minutes: 3
    initial_operation_mode: “auto”

    Generic

    away_temp: 65

i2cdetect -y 1
40: 40

ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 1 Dec 11 01:17 /dev/i2c-1

dmesg | grep i2c
[ 5.336012] i2c /dev entries driver

./HTU21D_test
22.08C
22.61%rh