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
gpio.setmode(gpio.BCM)
gpio.setup(klingel_gpio, gpio.IN, pull_up_down=gpio.PUD_UP)
gpio.add_event_detect(klingel_gpio, gpio.FALLING)
gpio.event_detected(klingel_gpio)
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.
