Light Sensor BH1750 to work using accessory example - solved #2105
Replies: 3 comments
-
I am also trying to integrate the BH1750 Lux Sensor. The above code has given me
|
Beta Was this translation helpful? Give feedback.
-
Solved - the issue rested in the declaration of the I2C bus "dt": [0, 35]. {
} |
Beta Was this translation helpful? Give feedback.
-
Excellent, I will try that. What tool do you use to capture "Network monitoring for testing ("o": 6)" ? |
Beta Was this translation helpful? Give feedback.
-
I'm having no luck getting any readings in HomeKit - always shows a single number.
I followed the example instructions to build the Light Sensor script, so I am not sure where I have gone wrong.
For SDA, SCL I'm using GPIO 22 and 21 on an ESP32
The clock speed is 400khz as per manufacturers data sheet.
The "dt:[0, 3592] is correct as per the manufacturers data sheet. (address 0x30).
I have tested the BH1750 via espeasy and it reads as expected.
Perhaps HomeKit is not initialising the I2C interface
Script compiles, and I can add in homekit, however both HomeKit and the terminal log always shows a constant number (like 15146.7). My script is below.
Any assistance is greatly appreciated
{
"c": {
"ic": [
[22, 21, 400, 1, 1]
],
"io": [
[
[0], 6
]
],
"l": 13,
"i": 1,
"o": 6,
"f": 1
},
"a": [{
"t": 50,
"n": 2,
"dt": [0, 3592]
}]
Beta Was this translation helpful? Give feedback.
All reactions