Hi all,
Fairly new to Home Assistant but slowly getting there - I think! First post so hope I get this correct.
I’m trying to use a couple of ESPhome to create a number of sensors for our borehole. Need to monitor temperature, salt and water levels. For the levels I have decided my best option is possibly to use VL53L0X for each level. For the temperature I had a AZDelivery GY-BME280, so I’m using that. The board that I’m using is AZDelivery D1 Mini NodeMCU.
It has been quite a learning curve, but eventually I have one of the VL53L0X on the default address of 0x29 & the GY-BME280 with no issues. The i2c bus was challenging, but I managed.
captive_portal:
# i2c bus
i2c:
sda: D2 #4
scl: D1 #3
scan: true
id: bus_a
# Temperature & humidity sensor
sensor:
- platform: bme280
temperature:
name: "BME280 Temperature"
oversampling: 16x
pressure:
name: "BME280 Pressure"
humidity:
name: "BME280 Humidity"
address: 0x76
update_interval: 10s
#sensor:
- platform: vl53l0x
name: "saltlevel"
update_interval: 10s
address: 0x29
unit_of_measurement: "Inches"
filters:
- multiply: 39.37 #convert to inches
I have read the documentation and tried to set specific addresses for the VL53L0X components, but whatever I try it will not work. The example code from the documentation I have been working with is
# Muliple VL53L0X sensors on same i2c bus
# Example configuration entry
sensor:
- platform: vl53l0x
name: "distance1"
id: distance1
address: 0x41
enable_pin: GPIO16
timeout: 200us
update_interval: 500ms
unit_of_measurement: "m"
- platform: vl53l0x
name: "distance2"
id: distance2
address: 0x42
enable_pin: GPIO17
timeout: 200us
update_interval: 500ms
unit_of_measurement: "m"
This is the code that I am using, but the address is still the default address.
captive_portal:
# i2c bus
i2c:
sda: D2 #4
scl: D1 #3
scan: true
id: bus_a
sensor:
- platform: vl53l0x
name: "saltlevel"
id: saltlevel
address: 0x42
enable_pin: GPIO16
timeout: 200us
update_interval: 500ms
unit_of_measurement: "inches"
filters:
- multiply: 39.37
# Temperature & humidity sensor
- platform: bme280
temperature:
name: "BME280 Temperature"
oversampling: 16x
pressure:
name: "BME280 Pressure"
humidity:
name: "BME280 Humidity"
address: 0x76
update_interval: 10s
Unfortunately I am getting nowhere with it. I believe that I am using the correct pins on the D1 Mini, but suspect that I am omitting some code related to XSHUT. I have Googled XSHUT, but none of the references have been helpful.
I really have tried to resolve this myself, but without success.