Closed lightmaster closed 3 years ago
A review of code shows nothing notable. I'm going to have to recreate this to determine if there is a problem. More soonish....
FYI-
Count should be one unless more than one detection occurred in the last 3 seconds... it only reports once every 3 seconds.
Distance will always be 1 when the detection is 0-5km away. This value is read directly from REG0x07[5:0]
@lightmaster I'm guessing that our latest finding is the explanation for this lack of reporting? I'll bet when you proved the AS3935 is communicating this will be better!
Is this fixed too then?
I need some lightning to know that, lol. Where's Thor when you need him?
I'll leave this open so you can post status when you finally hear some... ;-)
Nope, MQTT is still showing 1 count on the Home Assistant MQTT Integrations card.
I'm not seeing anything wrong here. [count, distance, energy, and last] report the latest detection.
The count should be the count of detections in the last 3 seconds (it only reports every three seconds so we don't storm the MQTT broker.) If detections are 3 seconds apart, or more, this will be 1. If the count is > 1 then distance and energy are the latest detected values.
re: my alternative to your pull request (Thank you for it and for noting that I should fix this stuff, as always!) Changes committed to /master and appear in v2.2.7 and later.
See: Release Notes v2.2.7.
Saw your "works great" on my commit. Good to hear. Closing this issue then.
I was in the middle of typing up something about it on here and gonna close the issue when I got called away at work.
No worries, you can always enter more after closing. But I re-opened it for you.
Checklist:
Release with the issue: v2.0.3 Last working release (if known):
Hardware, Operating System, Python version: RPi 3B, Raspberry Pi OS, Python 3.7.3
Description of problem: MQTT messages to
detect
forcount
anddistance
always equal 1, even though the messages sent tocrings
andprings
count properly and show reasonable distances.Python errors shown in the logs (if applicable):
Additional information: