So nun wollte ich mal eine Erweiterung in Betrieb nehmen. Da mein Pi dicht am Briefkasten sitzt also an denen zwei Reed Kontakte dran für die Klappe und wenn man öffnet. Also zur Erkennung ob Post oder Zeitung drin und ob man sie raus geholt hat.
Also die Kontakte tun ihren Dienst. Hab ich per GPIO Test geprüft. DoorPi config auch vorgenommen. Hier wollte ich mit Up und Down ein externes Script starten, welches mir den Status an die Haussteuerung schickt. Die Scripte geprüft und tun ihren Dienst.
Über DoorPi funktioniert es sehr volatil. Mal kommen alle Events durch. Mal nur einer, dann mal keiner...alles sehr merkwürdig.
Generell nichts besonderes, eigentlich wir beim Klingeltaster. BounceTime mal reduziert, hatte ich von 2000 auf 500 reduziert weil Posteinwerfen etwas schneller geht.
Das Log sieht irgendwie nicht ungewöhnlich aus.
Eigentlich sind die Events doch eigene Threads oder? Oder kann es sein das die Ausführung zum Up/Down sich über das OS behindern?
Noch ne Idee zur Analyse?
Log:
2021-05-16 13:33:52,868 [TRACE] [doorpi.action.handler] fire Event OnKeyDown from doorpi.keyboard.from_gpio asyncron
2021-05-16 13:33:52,870 [TRACE] [doorpi.action.handler] fire Event OnKeyDown_35 from doorpi.keyboard.from_gpio asyncron
2021-05-16 13:33:52,871 [DEBUG] [doorpi.action.handler] no actions for event OnKeyDown - skip fire_event OnKeyDown from doorpi.keyboard.from_gpio
2021-05-16 13:33:52,872 [TRACE] [doorpi.action.handler] fire Event OnKeyDown_onboardpins.35 from doorpi.keyboard.from_gpio asyncron
2021-05-16 13:33:52,874 [DEBUG] [doorpi.action.handler] no actions for event OnKeyDown_35 - skip fire_event OnKeyDown_35 from doorpi.keyboard.from_gpio
2021-05-16 13:33:52,875 [DEBUG] [doorpi.action.handler] [IHLDN9] fire for event OnKeyDown_onboardpins.35 this actions [<doorpi.action.SingleActions.os_execute.OsExecuteAction instance at 0x72120968>, <doorpi.action.SingleActions.sleep.SleepAction instance at 0x72120828>]
2021-05-16 13:33:52,876 [TRACE] [doorpi.action.handler] fire Event OnKeyPressed from doorpi.keyboard.from_gpio asyncron
2021-05-16 13:33:52,876 [TRACE] [doorpi.action.handler] [IHLDN9] try to fire action OsExecuteAction with args () and kwargs {'command': '/usr/local/etc/DoorPi/keyboard/outputs/briefklappe_false.sh'}
2021-05-16 13:33:52,878 [TRACE] [doorpi.action.base] run OsExecuteAction with args () and kwargs {'command': '/usr/local/etc/DoorPi/keyboard/outputs/briefklappe_false.sh'}
2021-05-16 13:33:52,886 [TRACE] [doorpi.action.handler] fire Event OnKeyPressed_35 from doorpi.keyboard.from_gpio asyncron
2021-05-16 13:33:52,888 [TRACE] [doorpi.action.handler] fire Event OnKeyPressed_onboardpins.35 from doorpi.keyboard.from_gpio asyncron
2021-05-16 13:33:52,902 [DEBUG] [doorpi.action.handler] no actions for event OnKeyPressed - skip fire_event OnKeyPressed from doorpi.keyboard.from_gpio
2021-05-16 13:33:52,905 [DEBUG] [doorpi.action.handler] no actions for event OnKeyPressed_35 - skip fire_event OnKeyPressed_35 from doorpi.keyboard.from_gpio
2021-05-16 13:33:52,907 [DEBUG] [doorpi.action.handler] [FCHS9J] fire for event OnKeyPressed_onboardpins.35 this actions [<doorpi.action.SingleActions.sleep.SleepAction instance at 0x72120cd8>]
2021-05-16 13:33:52,909 [TRACE] [doorpi.action.handler] [FCHS9J] try to fire action SleepAction with args (1.0,) and kwargs {}
2021-05-16 13:33:52,910 [TRACE] [doorpi.action.base] run SleepAction with args (1.0,) and kwargs {}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 117 100 40 100 77 16148 31085 --:--:-- --:--:-- --:--:-- 38500
2021-05-16 13:33:52,963 [TRACE] [doorpi.action.handler] [IHLDN9] try to fire action SleepAction with args (1.0,) and kwargs {}
2021-05-16 13:33:52,963 [TRACE] [doorpi.action.base] run SleepAction with args (1.0,) and kwargs {}
2021-05-16 13:33:53,913 [TRACE] [doorpi.action.handler] [FCHS9J] finished fire_event for event_name OnKeyPressed_onboardpins.35
2021-05-16 13:33:53,965 [TRACE] [doorpi.action.handler] [IHLDN9] finished fire_event for event_name OnKeyDown_onboardpins.35
Alles anzeigen
Config:
[EVENT_OnKeyUp_onboardpins.35]
10 = os_execute:/usr/local/etc/DoorPi/keyboard/outputs/briefklappe.sh
20 = sleep:1
[EVENT_OnKeyDown_onboardpins.35]
10 = os_execute:/usr/local/etc/DoorPi/keyboard/outputs/briefklappe_false.sh
20 = sleep:1
[onboardpins_keyboard]
bouncetime = 500
mode = BOARD
polarity = 0
pressed_on_keydown = True
pull_up_down = PUD_OFF
Alles anzeigen