Hello I jumped on this project again, to get this thing running. The sensor is connected as described in the manual via SPI (recommended by SparkFun). The connection via MQTT to Homeassistant seems to work and the sensor shows up there.
Connection to raspy is as in the table in the manual: GPIO Pin 22 on Raps (Gpio 25)
But I don not get any detections while there is a thunderstorm outside.
[2021-06-20 00:31:51] - * init mqtt_client_connected=[False]
[2021-06-20 00:31:51] * Sensor on SPI bus
[2021-06-20 00:31:51] - log: Sending CONNECT (u1, p1, wr1, wq0, wf1, c1, k60) client_id=b''
[2021-06-20 00:31:51] - log: Sending PUBLISH (d0, q0, r0, m1), 'b'home/nodes/sensor/lightningdetector/status'', ... (6 bytes)
[2021-06-20 00:31:51] - * Wait on mqtt_client_connected=[False]
[2021-06-20 00:31:51] - log: Received CONNACK (0, 0)
[2021-06-20 00:31:51] MQTT connection established
[2021-06-20 00:31:51]
[2021-06-20 00:31:51] - on_connect() mqtt_client_connected=[True]
[2021-06-20 00:31:52] - - stopped MQTT timer
[2021-06-20 00:31:52] - - started MQTT timer - every 60 seconds
[2021-06-20 00:31:52] - - ip=[192.168.108.35], mac[b8:27:eb:67:5e:9c], interface=[wlan0], uniq-id=[AS3935-b827eb675e9c]
[2021-06-20 00:31:52] Announcing Lightning Detection device to MQTT broker for auto-discovery ...
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m2), 'b'homeassistant/sensor/lightningdetector/last/config'', ... (539 bytes)
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m3), 'b'homeassistant/sensor/lightningdetector/energy/config'', ... (301 bytes)
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m4), 'b'homeassistant/sensor/lightningdetector/distance/config'', ... (336 bytes)
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m5), 'b'homeassistant/sensor/lightningdetector/count/config'', ... (298 bytes)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 2)
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m6), 'b'homeassistant/sensor/lightningdetector/settings/config'', ... (418 bytes)
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m7), 'b'homeassistant/sensor/lightningdetector/crings/config'', ... (406 bytes)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 3)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 4)
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r1, m8), 'b'homeassistant/sensor/lightningdetector/prings/config'', ... (403 bytes)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 5)
[2021-06-20 00:31:52] - - Testing AS3935 Communications...
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 6)
[2021-06-20 00:31:52] - - TEST write=5, read-back=5
[2021-06-20 00:31:52] - - TEST write=2, read-back=2
[2021-06-20 00:31:52] Publishing to MQTT topic "home/nodes/sensor/lightningdetector/settings, Data:{"settings": {"timestamp": "2021-06-20T00:31:52+02:00", "hardware": {"min_strikes": 5, "afe_inside": true, "disp_lco": false, "noise_floor": 1}, "script": {"period_minutes": 5, "end_minutes": 30, "number_rings": 5, "distance_units": "km"}}}"
[2021-06-20 00:31:52] - log: Sending PUBLISH (d0, q1, r0, m9), 'b'home/nodes/sensor/lightningdetector/settings'', ... (240 bytes)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 7)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 8)
[2021-06-20 00:31:52] - log: Received PUBACK (Mid: 9)
[2021-06-20 00:32:02] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:32:12] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:32:22] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:32:32] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:32:42] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:32:52] - - MQTT TIMER INTERRUPT -
[2021-06-20 00:32:52] - - stopped MQTT timer
[2021-06-20 00:32:52] - - SEND: yes, still alive -
[2021-06-20 00:32:52] - log: Sending PUBLISH (d0, q0, r0, m10), 'b'home/nodes/sensor/lightningdetector/status'', ... (6 bytes)
[2021-06-20 00:32:52] - - started MQTT timer - every 60 seconds
[2021-06-20 00:32:52] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:32:53] - log: Sending PINGREQ
[2021-06-20 00:32:53] - log: Received PINGRESP
[2021-06-20 00:33:02] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:33:12] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:33:22] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:33:32] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:33:42] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:33:52] - - MQTT TIMER INTERRUPT -
[2021-06-20 00:33:52] - - stopped MQTT timer
[2021-06-20 00:33:52] - - SEND: yes, still alive -
[2021-06-20 00:33:52] - log: Sending PUBLISH (d0, q0, r0, m11), 'b'home/nodes/sensor/lightningdetector/status'', ... (6 bytes)
[2021-06-20 00:33:52] - - started MQTT timer - every 60 seconds
[2021-06-20 00:33:52] << INTR(22) >> Noise level too high - adjusting
[2021-06-20 00:33:54] - log: Sending PINGREQ
[2021-06-20 00:33:54] - log: Received PINGRESP
[2021-06-20 00:34:02] << INTR(22) >> Noise level too high - adjusting
[Sensor]
# decribe how your sensor is hooked up to your RPi
# use values 'I2C' or 'SPI' - default is 'I2C'
#sensor_attached = I2C
sensor_attached = SPI
# GPIO pin used for interrupts
intr_pin = 22
# The SPI bus and device numbers come from the device file being used.
# e.g., /dev/spidev0.0 would be bus=0, device=0
# The defaults are 0 and 0 (SPI0 which appears at the GPIO 40pin header)
spi_bus = 0
spi_device = 0
# Rev. 1 Raspberry Pis should leave bus set at 0, while rev. 2 Pis should set
# bus equal to 1. The address should be changed to match the address of the
# sensor.
#i2c_bus = 1
#i2c_address = 0x03
# Value to use for your board
# Internal Tuning Capacitors (from 0 to 120pF in steps of 8pf) - A value of [0-15]
# run the script with a --tune paramater to determine value for your board
# NOTE: this runs for 3 minutes so be patient! Then record your best value here.
tuning_capacitor = 0x0
# Indoors (True) = more sensitive (can miss very strong lightnings)
# Outdoors (False) = less sensitive (can miss far away lightnings)
#detector_afr_gain_indoor = True
#detector_noise_floor = 1
# Prevent single isolated strikes from being logged => interrupts begin after
# this number of strikes (def: 5, value 1,5,9,16), then are fired normally.
#detector_min_strikes = 5
#detector_min_strikes = 1
Can someone help me to get the sensor working?