Hi, Thanks for the help.
I have re burned a new SD card with the latest Raspberry Pi OS with desktop Debian version: 11 (bullseye). And enabled SPI etc.
The board is plugged into socket 1 and the green led is lit.
I then used your installer (as3935_installer.sh 0) v4.1 all installed OK. I then ran as3935_pigpio_test.py and Test starting
Good version of pigpio found - Version 79
Register 0x00 is 0x00
Register 0x01 is 0x00
Register 0x02 is 0x00
Register 0x03 is 0x00
Register 0x04 is 0x00
Register 0x05 is 0x00
Register 0x06 is 0x00
Register 0x07 is 0x00
Register 0x08 is 0x00
Test complete
I then tried calibrate_pig.py
with the following results
sudo python3 calibrate_pig.py
Starting calibration run - Please wait approximately 16 seconds
calibration_run - At 0 pF 4032.0 IRQs/sec with variance from ideal of 125.8 ( 3.22 %)
calibration_run - At 8 pF 3949.0 IRQs/sec with variance from ideal of 42.8 ( 1.09 %)
calibration_run - At 16 pF 3392.0 IRQs/sec with variance from ideal of -514.2 ( -13.16 %)
calibration_run - At 24 pF 3551.0 IRQs/sec with variance from ideal of -355.2 ( -9.09 %)
calibration_run - At 32 pF 3304.0 IRQs/sec with variance from ideal of -602.2 ( -15.42 %)
calibration_run - At 40 pF 3927.0 IRQs/sec with variance from ideal of 20.8 ( 0.53 %)
calibration_run - At 48 pF 3960.0 IRQs/sec with variance from ideal of 53.8 ( 1.38 %)
calibration_run - At 56 pF 3951.0 IRQs/sec with variance from ideal of 44.8 ( 1.15 %)
calibration_run - At 64 pF 3960.0 IRQs/sec with variance from ideal of 53.8 ( 1.38 %)
calibration_run - At 72 pF 4036.0 IRQs/sec with variance from ideal of 129.8 ( 3.32 %)
calibration_run - At 80 pF 3961.0 IRQs/sec with variance from ideal of 54.8 ( 1.40 %)
calibration_run - At 88 pF 3961.0 IRQs/sec with variance from ideal of 54.8 ( 1.40 %)
calibration_run - At 96 pF 3998.0 IRQs/sec with variance from ideal of 91.8 ( 2.35 %)
calibration_run - At 104 pF 3960.0 IRQs/sec with variance from ideal of 53.8 ( 1.38 %)
calibration_run - At 112 pF 3949.0 IRQs/sec with variance from ideal of 42.8 ( 1.09 %)
calibration_run - At 120 pF 3962.0 IRQs/sec with variance from ideal of 55.8 ( 1.43 %)
Success!
Tuning Capacitor setting - 0x05 - 40 pF
Percent variance = 0.53 %
Does this indicate its working ?
If i run sudo systemctl status as3935_monitor.service, it shows these errors
● as3935_monitor.service - AS3935 Monitor service
Loaded: loaded (/lib/systemd/system/as3935_monitor.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-05-18 23:00:35 BST; 2min 5s ago
Main PID: 616 (python3)
Tasks: 5 (limit: 1598)
CPU: 1min 56.576s
CGroup: /system.slice/as3935_monitor.service
├─616 /usr/bin/python3 /home/pi/Sensors/as3935_monitor.py
├─625 /usr/bin/python3 /home/pi/Sensors/as3935_monitor.py
└─705 /usr/bin/python3 /home/pi/Sensors/as3935_monitor.py
May 18 23:00:39 RASPI-AS3935 python3[705]: rc = self._packet_read()
May 18 23:00:39 RASPI-AS3935 python3[705]: File “/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py”, line 2439, in _packet_read
May 18 23:00:39 RASPI-AS3935 python3[705]: rc = self._packet_handle()
May 18 23:00:39 RASPI-AS3935 python3[705]: File “/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py”, line 3039, in _packet_handle
May 18 23:00:39 RASPI-AS3935 python3[705]: return self._handle_connack()
May 18 23:00:39 RASPI-AS3935 python3[705]: File “/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py”, line 3138, in _handle_connack
May 18 23:00:39 RASPI-AS3935 python3[705]: on_connect(
May 18 23:00:39 RASPI-AS3935 python3[705]: File “/home/pi/Sensors/as3935_monitor.py”, line 357, in on_connect
May 18 23:00:39 RASPI-AS3935 python3[705]: logger.debug("MQTT broker connection failed with result: "+connack_string(rc))
May 18 23:00:39 RASPI-AS3935 python3[705]: NameError: name ‘connack_string’ is not defined
I guess some things have changed, also the webpage cannot be accessed using
http://192.168.0.xxx/as3935
I have know idea if its working or not. Here in S.E UK we are expecting some storms tonight.
As another thought could Adafruit’s CircuitPython be used run the setup?
Hopefully we can get it to work
Michael