Hello, I would like to use node red instead of a python script which is started at system start. Unfortunately, I am not getting the functionality to run. Here is my python script:
#Einstellungen
klingel_gpio = 4 #GPIO, der mit der Schaltung verbunden ist
while True:
time.sleep(1)
if gpio.event_detected(klingel_gpio):
actions.handleAction("Someone is in front of the door")
time.sleep(5)
gpio.event_detected(klingel_gpio)
I tested the node node gpio_in (set it to gpio 4 and Pull up) but it does not work. Does anyone has an idea what I am doing wrong.
If you are running node-red, what does your node-red flow look like?
Do you have node-red running at startup?
What platform are you using? Pi, Windows?
Also check that gpio 4 in the node-red node is the same pin as is meant by 4 in the python script. There is often confusion over pin number vs gpio number.