Open aver-ua opened 8 months ago
Same DFrobot i2c here and having the same issue. Tested it in arduino ide so i know the sensor works as expected.
I however can get something with testing with one of those long spark lighters. Identical config as above
[22:45:25][W][as3935_i2c:029]: Writing register failed!
[22:45:27][W][as3935_i2c:029]: Writing register failed!
[22:45:28][W][as3935_i2c:033]: Reading register failed!
[22:45:28][W][component:237]: Component as3935 took a long time for an operation (1009 ms).
[22:45:28][W][component:238]: Components should block for at most 30 ms.
Just a quick comment here.... the i2c scan: starts at address 8 to 128. So if you have any i2c device using addresses below 8, like the as3935... it won't show up in the scan. I found this out when I finally looked at the C code for i2c scan. A local copy modified to start scanning at address 1 worked! Even though the scan starts at 8 and your as3935 won't show, if it is present, then the component will still use the assigned address... so more a nuisance for debugging.
@illigtr , thanks for your finding
Same DFrobot i2c here and having the same issue. Tested it in arduino ide so i know the sensor works as expected.
I however can get something with testing with one of those long spark lighters. Identical config as above
[22:45:25][W][as3935_i2c:029]: Writing register failed! [22:45:27][W][as3935_i2c:029]: Writing register failed! [22:45:28][W][as3935_i2c:033]: Reading register failed! [22:45:28][W][component:237]: Component as3935 took a long time for an operation (1009 ms). [22:45:28][W][component:238]: Components should block for at most 30 ms.
Same here, with Wemos D1 mini, ESPhome 2024.7.2 and DFRobot: I get
[22:45:25][W][as3935_i2c:029]: Writing register failed!
Tasmota works fine :/
Hi,
Here also, same problem.
`[13:53:19][C][i2c.arduino:071]: I2C Bus: [13:53:19][C][i2c.arduino:072]: SDA Pin: GPIO21 [13:53:19][C][i2c.arduino:073]: SCL Pin: GPIO22 [13:53:19][C][i2c.arduino:074]: Frequency: 500000 Hz [13:53:19][C][i2c.arduino:086]: Recovery: bus successfully recovered [13:53:19][I][i2c.arduino:096]: Results from i2c bus scan: [13:53:19][I][i2c.arduino:098]: Found no i2c devices!
[13:53:19][C][as3935:036]: Interrupt Pin: GPIO2 [13:53:19][C][as3935:038]: Thunder alert 'Storm Alert'
[13:53:19][C][as3935:041]: State Class: '' [13:53:19][C][as3935:041]: Unit of Measurement: 'km' [13:53:19][C][as3935:041]: Accuracy Decimals: 1
[13:53:19][C][as3935:042]: Lightning energy 'Lightning Energy' [13:53:19][C][as3935:042]: State Class: '' [13:53:19][C][as3935:042]: Unit of Measurement: '' [13:53:19][C][as3935:042]: Accuracy Decimals: 1
[13:53:19][C][as3935_i2c:040]: Address: 0x03`
When I test it with a lighter I get:
[13:53:21][W][as3935_i2c:029]: Writing register failed! [13:53:22][W][as3935_i2c:029]: Writing register failed! [13:53:22][W][as3935_i2c:029]: Writing register failed!
So the question is, does it work? With Tasmota it work fine indeed.
The problem
Hi! DFRobot Lightning Distance Sensor AS3935 not found. But there is no problem with this board under Tasmota 13.4.0 (sensors)
Which version of ESPHome has the issue?
2024.2.2
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2024.3.0
What platform are you using?
ESP8266
Board
NodeMCU v3
Component causing the issue
I2C
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response