shred / kaminari

AS3935 and ESP8266 based Franklin Lightning Detector
GNU General Public License v3.0
41 stars 10 forks source link

Status sent to mqtt every 10 minutes? #8

Closed poblabs closed 1 year ago

poblabs commented 1 year ago

I'm looking for some help finding the setting which sends mqtt status updates every 10 minutes. Where is that setting stored?

Here's my sub showing the 10 minute timestamps:

2023-06-27T08:49:57-0400 : lightning/sensor {"energy":22038,"strike":1,"distance":14,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":2,"watchdogThreshold":2,"wifiSignalStrength":-70}
2023-06-27T08:59:57-0400 : lightning/sensor {"energy":22038,"strike":1,"distance":14,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":2,"watchdogThreshold":2,"wifiSignalStrength":-68}
2023-06-27T09:09:57-0400 : lightning/sensor {"energy":22038,"strike":1,"distance":14,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":2,"watchdogThreshold":2,"wifiSignalStrength":-68}
2023-06-27T09:19:57-0400 : lightning/sensor {"energy":22038,"strike":1,"distance":14,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":2,"watchdogThreshold":2,"wifiSignalStrength":-65}
2023-06-27T09:29:57-0400 : lightning/sensor {"energy":22038,"strike":1,"distance":14,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":2,"watchdogThreshold":2,"wifiSignalStrength":-67}

For more reference, I cleared the detections and it's still reporting.

2023-06-27T09:39:57-0400 : lightning/sensor {"energy":null,"distance":null,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":0,"watchdogThreshold":2,"wifiSignalStrength":-68}
2023-06-27T09:49:57-0400 : lightning/sensor {"energy":null,"distance":null,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":0,"watchdogThreshold":2,"wifiSignalStrength":-68}
2023-06-27T09:59:57-0400 : lightning/sensor {"energy":null,"distance":null,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":0,"watchdogThreshold":2,"wifiSignalStrength":-68}
2023-06-27T10:09:57-0400 : lightning/sensor {"energy":null,"distance":null,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":0,"watchdogThreshold":2,"wifiSignalStrength":-68}
2023-06-27T10:19:57-0400 : lightning/sensor {"energy":null,"distance":null,"tuning":499456,"noiseFloorLevel":28,"disturbersPerMinute":0,"watchdogThreshold":2,"wifiSignalStrength":-68}
shred commented 1 year ago

It's not really a setting. Kaminari is permanently auto-adjusting the noise floor level. If there is too much noise, the noise floor level is raised. If there was no interfering noise for 10 minutes, the noise floor level is lowered again. All changes to the noise floor levels are reported via MQTT.

The 10 minute setting is stored in AS3935.cpp line 25.

However there seems to be a bug. Your noise floor level has already reached the lowest possible value of 28 µVrms. It is pointless to send the notification if the noise floor level was unchanged.

If you want to remove the notifications after a noise floor level change altogether, you can remove AS3935.cpp lines 125 and 97 (both hasChanged = true;).

poblabs commented 1 year ago

I will give that a try, thanks!

shred commented 1 year ago

Changed the source so no MQTT event is sent if the noise floor level has already reached its minimum/maximum.