Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not running on a RPi! #25

Open
3 tasks done
WirthmU opened this issue Jun 24, 2024 · 0 comments
Open
3 tasks done

Not running on a RPi! #25

WirthmU opened this issue Jun 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@WirthmU
Copy link

WirthmU commented Jun 24, 2024

Checklist:

  • I updated to the latest version available
  • I double-checked my hardware connections
  • I checked that my MQTT broker is otherwise working

Release with the issue:

Last working release (if known):

Hardware, Operating System, Python version:
I am running the code on a Raspberry PI 4B with 8GB

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Description of problem:
When I start the daemon it works fine initially but then the code runs into an error:

pi@lightning:/opt/ISP-lightning-mqtt-daemon $ python3 /opt/ISP-lightning-mqtt-daemon/ISP-lightning-mqtt-daemon.py
[2024-06-24 16:24:15] - * init mqtt_client_connected=[False]
[2024-06-24 16:24:15] * Sensor on I2C bus
[2024-06-24 16:24:15] - log: Sending CONNECT (u1, p1, wr1, wq0, wf1, c1, k60) client_id=b''
[2024-06-24 16:24:15] - log: Sending PUBLISH (d0, q0, r0, m1), 'b'home/as3935/sensor/lightningdetector/status'', ... (6 bytes)
[2024-06-24 16:24:15] - * Wait on mqtt_client_connected=[False]
[2024-06-24 16:24:15] - log: Received CONNACK (0, 0)
[2024-06-24 16:24:15] MQTT connection established
[2024-06-24 16:24:15] 
[2024-06-24 16:24:15] - on_connect() mqtt_client_connected=[True]
[2024-06-24 16:24:16] - - stopped MQTT timer
[2024-06-24 16:24:16] - - started MQTT timer - every 60 seconds
[2024-06-24 16:24:16] - - ip=[192.168.1.83], mac[dc:a6:32:ae:98:62], interface=[eth0], uniq-id=[AS3935-dca632ae9862]
[2024-06-24 16:24:16] Announcing Lightning Detection device to MQTT broker for auto-discovery ...
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m2), 'b'homeassistant/sensor/lightningdetector/last/config'', ... (537 bytes)
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m3), 'b'homeassistant/sensor/lightningdetector/energy/config'', ... (302 bytes)
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m4), 'b'homeassistant/sensor/lightningdetector/distance/config'', ... (337 bytes)
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m5), 'b'homeassistant/sensor/lightningdetector/count/config'', ... (299 bytes)
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m6), 'b'homeassistant/sensor/lightningdetector/settings/config'', ... (419 bytes)
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m7), 'b'homeassistant/sensor/lightningdetector/crings/config'', ... (407 bytes)
[2024-06-24 16:24:16] - log: Sending PUBLISH (d0, q1, r1, m8), 'b'homeassistant/sensor/lightningdetector/prings/config'', ... (404 bytes)

Python errors shown in the logs (if applicable):

Traceback (most recent call last):
  File "/opt/ISP-lightning-mqtt-daemon/ISP-lightning-mqtt-daemon.py", line 950, in <module>
    GPIO.setup(interrupt_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
RuntimeError: Not running on a RPi!

And also:

pi@lightning:/opt/ISP-lightning-mqtt-daemon $ python3 /opt/ISP-lightning-mqtt-daemon/ISP-lightning-mqtt-daemon.py --calc_tuning_cap
[2024-06-24 16:45:32] * Mode: Calculate Tuning Cap value and exit
[2024-06-24 16:45:32] - * init mqtt_client_connected=[False]
[2024-06-24 16:45:32] * Sensor on I2C bus
[2024-06-24 16:45:32] - - ip=[192.168.1.83], mac[dc:a6:32:ae:98:62], interface=[eth0], uniq-id=[AS3935-dca632ae9862]
Traceback (most recent call last):
  File "/opt/ISP-lightning-mqtt-daemon/ISP-lightning-mqtt-daemon.py", line 950, in <module>
    GPIO.setup(interrupt_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
RuntimeError: Not running on a RPi!

Additional information:

@WirthmU WirthmU added the bug Something isn't working label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant