Solved Relay not working after last update of EXT-Screen and EXT-Pir
-
Hi and as always thank you for these great projects!
I’m using ext-pir with a pir sensor to turn on and off a relay that controls backlight on my mirror. Ext-screen is configured in “mode: 6 - use a relay switch command controled by GPIO”. My MM is installed on a rpi 3B(+).
It worked great until the last round of updates, with the new version of ext-screen (or maybe ext-pir) it stopped working: screen goes blank but relay is not switched anymore.In log I see “relay is on” but not “relay is off” (can’t remember the past behaviour actually), but also noticed two things:
- logs reported “[SCREEN] Mode 6: Python script (Relay on/off)”, but in wiki I read “python” in mode 7;
- in ext-pir 1.5.0 changelog you said “delete: onoff dependency” and in 1.6.0 you added different modes referring to onoff library and rpi 3b.
Is this causing my issues?
Here’s the log:
MMM-GoogleAssistant v6.2.2 (240308.it) [10.03.2024 10:45.15.343] [LOG] [GA] [HyperWatch] Logger is now enabled [10.03.2024 10:45.16.743] [LOG] [GA] [LIB] All website libraries loaded! [10.03.2024 10:45.16.749] [LOG] [GA] Loading Website... [10.03.2024 10:45.16.760] [LOG] [GA] [WEBSITE] [TRANSLATION] [HOME] Use: default.home [10.03.2024 10:45.16.907] [LOG] [GA] [WEBSITE] Detected: EXT-Alert [10.03.2024 10:45.17.036] [INFO] Checking git for module: MMM-GoogleAssistant [10.03.2024 10:45.17.168] [LOG] [ALERT] EXT-Alert Version: 1.4.2 rev: 240303 [10.03.2024 10:45.17.175] [LOG] [DETECTOR] EXT-Detector Version: 2.5.2 rev: 240303 [10.03.2024 10:45.17.229] [LOG] [PIR] EXT-Pir Version: 1.5.0 rev: 240303 [10.03.2024 10:45.17.352] [LOG] [PIR] [LIBRARY] Loaded: ./components/pirLib.js --> this.lib.Pir [10.03.2024 10:45.17.355] [LOG] [PIR] [LIBRARY] All libraries loaded! [10.03.2024 10:45.17.361] [LOG] [SCREEN] EXT-Screen Version: 2.5.0 rev: 240307 [10.03.2024 10:45.17.453] [LOG] [SCREEN] Mode 6: Python script (Relay on/off) [10.03.2024 10:45.17.455] [LOG] [SCREEN] Availability started [10.03.2024 10:45.17.458] [LOG] [SCREEN] [CRON] Reading ON/OFF cron configuration... [10.03.2024 10:45.17.459] [LOG] [SCREEN] [CRON] [ON] no cron defined [10.03.2024 10:45.17.461] [LOG] [SCREEN] [CRON] [OFF] no cron defined [10.03.2024 10:45.17.471] [LOG] [SCREEN] [LIB] Start. [10.03.2024 10:45.17.474] [LOG] [SCREEN] Callback Governor: GOVERNOR_WORKING [10.03.2024 10:45.17.545] [LOG] [UPDATES] EXT-Updates Version: 1.3.0 rev: 240308 [10.03.2024 10:45.17.562] [LOG] [UPDATES] MagicMirror is running on pid: 1893 [10.03.2024 10:45.17.568] [LOG] [TELBOT] EXT-TelegramBot Version: 2.5.0 rev: 240303 [10.03.2024 10:45.21.093] [LOG] [TELBOT] [LIBRARY] All libraries loaded! [10.03.2024 10:45.21.097] [LOG] [GOVERNOR] EXT-Governor Version: 1.3.1 rev: 240303 [10.03.2024 10:45.21.101] [LOG] [GOVERNOR] Governor library initialized... [10.03.2024 10:45.21.164] [LOG] [GOVERNOR] Start [10.03.2024 10:45.21.779] [LOG] [DETECTOR] [LIBRARY] All libraries loaded! [10.03.2024 10:45.21.819] [LOG] [TELBOT] [DATA] Ready! [10.03.2024 10:45.21.840] [LOG] [DETECTOR] [DATA] Snowboy is initialized with 1 Models: jarvis [10.03.2024 10:45.21.842] [LOG] [DETECTOR] [DATA] Initialized [10.03.2024 10:45.21.969] [INFO] Checking git for module: EXT-Detector [10.03.2024 10:45.22.069] [LOG] [SCREEN] [LIB] [POWER] Display from false ---> true [10.03.2024 10:45.22.121] [LOG] [GA] [WEBSITE] Detected: EXT-Screen [10.03.2024 10:45.22.143] [LOG] [GA] [WEBSITE] Detected: EXT-Governor [10.03.2024 10:45.22.153] [LOG] [GA] [WEBSITE] Detected: EXT-Pir [10.03.2024 10:45.22.164] [LOG] [PIR] [CORE] Start [10.03.2024 10:45.22.227] [LOG] [GA] [WEBSITE] Detected: EXT-TelegramBot [10.03.2024 10:45.22.249] [LOG] [GA] [WEBSITE] Detected: EXT-Detector [10.03.2024 10:45.22.286] [LOG] [GA] [WEBSITE] [PM2] checking PM2 using... [10.03.2024 10:45.22.724] [INFO] Checking git for module: MMM-GoogleCalendar [10.03.2024 10:45.22.788] [LOG] [GOVERNOR] Actual: ondemand [10.03.2024 10:45.22.792] [LOG] [GOVERNOR] Already set [10.03.2024 10:45.22.804] [LOG] [GOVERNOR] Callback: { actived: true, wanted: 'ondemand', actual: 'ondemand', error: null } [10.03.2024 10:45.22.817] [LOG] [SCREEN] [LIB] Response PY -- Check State: 0 [10.03.2024 10:45.22.821] [LOG] [SCREEN] [LIB] Display: Force On Start [10.03.2024 10:45.22.825] [LOG] [SCREEN] [LIB] Display ON. [10.03.2024 10:45.22.884] [INFO] updatenotification: You are using pm2 with MagicMirror [10.03.2024 10:45.23.668] [LOG] [DETECTOR] [RULES] Start listening. 1 Models [10.03.2024 10:45.23.672] [LOG] [GA] [WEBSITE] Detected: EXT-Updates [10.03.2024 10:45.24.483] [INFO] Checking git for module: MMM-homeassistant-sensors [10.03.2024 10:45.24.965] [LOG] [SCREEN] [LIB] Relay is ON [10.03.2024 10:45.25.053] [INFO] Newsfeed-Fetcher: Broadcasting 30 items. [10.03.2024 10:45.25.235] [INFO] Checking git for module: EXT-Pir [10.03.2024 10:45.25.362] [LOG] [GA] [WEBSITE] [PM2] You don't use PM2 [10.03.2024 10:45.25.561] [INFO] Checking git for module: EXT-Screen [10.03.2024 10:45.30.684] [INFO] Checking git for module: EXT-Updates [10.03.2024 10:45.31.435] [INFO] Checking git for module: EXT-TelegramBot [10.03.2024 10:45.31.682] [INFO] Checking git for module: EXT-Governor [10.03.2024 10:45.32.207] [INFO] Checking git for module: MMM-RTSPtoWeb [10.03.2024 10:45.32.526] [INFO] Checking git for module: MagicMirror [10.03.2024 10:45.33.234] [INFO] MMM-GoogleCalendar: 10 events loaded for familyxxxxxxxxxxxxxxxxxxxxxx@group.calendar.google.com [10.03.2024 10:45.50.013] [LOG] [GA] [SYSTEMINFO] Read Uptimed [10.03.2024 10:45.50.015] [LOG] [GA] [SYSTEMINFO] Initialized [10.03.2024 10:45.50.033] [WARN] [GA] WARN: You are using default username or default password [10.03.2024 10:45.50.035] [WARN] [GA] WARN: Don't forget to change it! [10.03.2024 10:45.50.117] [LOG] [GA] Website Ready! [10.03.2024 10:45.50.165] [LOG] [GA] Loading Server... [10.03.2024 10:45.51.369] [LOG] [GA] [WEBSITE] [SERVER] Start listening on port 8081 [10.03.2024 10:45.51.370] [LOG] [GA] [WEBSITE] [SERVER] Available locally at http://192.168.0.14:8081 [10.03.2024 10:45.51.371] [LOG] [GA] Server Ready! [10.03.2024 10:46.28.536] [LOG] [SCREEN] Callback Governor: GOVERNOR_SLEEPING [10.03.2024 10:46.28.541] [LOG] [SCREEN] [LIB] Stops by counter. [10.03.2024 10:46.29.006] [LOG] [SCREEN] [LIB] Response PY -- Check State: 1 [10.03.2024 10:46.29.011] [LOG] [SCREEN] [LIB] Display -- Actual: false - Wanted: false [10.03.2024 10:46.29.088] [LOG] [GOVERNOR] Actual: ondemand [10.03.2024 10:46.29.166] [LOG] [GOVERNOR] Set: powersave [10.03.2024 10:46.29.170] [LOG] [GOVERNOR] Callback: { actived: true, wanted: 'powersave', actual: 'ondemand', error: null } [10.03.2024 10:46.29.448] [LOG] [SCREEN] [LIB] [POWER] Display from true ---> false [10.03.2024 10:47.15.880] [LOG] [SCREEN] [LIB] Restart. [10.03.2024 10:47.15.883] [LOG] [SCREEN] Callback Governor: GOVERNOR_WORKING [10.03.2024 10:47.15.980] [LOG] [SCREEN] [LIB] [Force ON] Turn ON Display [10.03.2024 10:47.16.162] [LOG] [GOVERNOR] Actual: powersave [10.03.2024 10:47.16.280] [LOG] [GOVERNOR] Set: ondemand [10.03.2024 10:47.16.285] [LOG] [GOVERNOR] Callback: { actived: true, wanted: 'ondemand', actual: 'powersave', error: null } [10.03.2024 10:47.16.499] [LOG] [SCREEN] [LIB] Response PY -- Check State: 1 [10.03.2024 10:47.16.501] [LOG] [SCREEN] [LIB] Display -- Actual: false - Wanted: true [10.03.2024 10:47.16.503] [LOG] [SCREEN] [LIB] Display ON. [10.03.2024 10:47.16.576] [LOG] [SCREEN] [LIB] [POWER] Display from false ---> true [10.03.2024 10:47.16.917] [LOG] [SCREEN] [LIB] Relay is ON [10.03.2024 10:47.17.340] [LOG] Offer requested for module_18_MMM-RTSPtoWeb [10.03.2024 10:47.37.563] [LOG] [GA] [WEBSITE] [192.168.0.30] Welcome admin, happy to serve you! [10.03.2024 10:48.17.325] [LOG] [SCREEN] Callback Governor: GOVERNOR_SLEEPING [10.03.2024 10:48.17.330] [LOG] [SCREEN] [LIB] Stops by counter. [10.03.2024 10:48.17.588] [LOG] [GOVERNOR] Actual: ondemand [10.03.2024 10:48.17.673] [LOG] [GOVERNOR] Set: powersave [10.03.2024 10:48.17.719] [LOG] [GOVERNOR] Callback: { actived: true, wanted: 'powersave', actual: 'ondemand', error: null } [10.03.2024 10:48.17.764] [LOG] [SCREEN] [LIB] [POWER] Display from true ---> false [10.03.2024 10:48.17.946] [LOG] [SCREEN] [LIB] Response PY -- Check State: 1 [10.03.2024 10:48.17.949] [LOG] [SCREEN] [LIB] Display -- Actual: false - Wanted: false [10.03.2024 10:49.27.280] [LOG] [PIR] [CORE] Detected presence [10.03.2024 10:49.27.297] [LOG] [SCREEN] [LIB] Restart. [10.03.2024 10:49.27.305] [LOG] [SCREEN] Callback Governor: GOVERNOR_WORKING [10.03.2024 10:49.27.541] [LOG] [GOVERNOR] Actual: powersave [10.03.2024 10:49.27.648] [LOG] [GOVERNOR] Set: ondemand [10.03.2024 10:49.27.651] [LOG] [GOVERNOR] Callback: { actived: true, wanted: 'ondemand', actual: 'powersave', error: null } [10.03.2024 10:49.27.858] [LOG] [SCREEN] [LIB] [POWER] Display from false ---> true [10.03.2024 10:49.27.893] [LOG] [SCREEN] [LIB] Response PY -- Check State: 1 [10.03.2024 10:49.27.894] [LOG] [SCREEN] [LIB] Display -- Actual: false - Wanted: true [10.03.2024 10:49.27.909] [LOG] [SCREEN] [LIB] Display ON. [10.03.2024 10:49.28.267] [LOG] [SCREEN] [LIB] Relay is ON [10.03.2024 10:49.28.715] [LOG] Offer requested for module_18_MMM-RTSPtoWeb [10.03.2024 10:50.25.969] [INFO] Newsfeed-Fetcher: Broadcasting 30 items. [10.03.2024 10:50.28.907] [LOG] [SCREEN] Callback Governor: GOVERNOR_SLEEPING [10.03.2024 10:50.28.911] [LOG] [SCREEN] [LIB] Stops by counter. [10.03.2024 10:50.28.984] [LOG] [SCREEN] [LIB] [POWER] Display from true ---> false [10.03.2024 10:50.29.190] [LOG] [GOVERNOR] Actual: ondemand [10.03.2024 10:50.29.278] [LOG] [GOVERNOR] Set: powersave [10.03.2024 10:50.29.281] [LOG] [GOVERNOR] Callback: { actived: true, wanted: 'powersave', actual: 'ondemand', error: null } [10.03.2024 10:50.29.420] [LOG] [SCREEN] [LIB] Response PY -- Check State: 1 [10.03.2024 10:50.29.423] [LOG] [SCREEN] [LIB] Display -- Actual: false - Wanted: false
Thank you!
-
Hi, Thanks for this report
I will inspectEXT-Screen
EXT-Pir
is only related with pir-Sensor
I see[PIR] [CORE] Detected presence
so it’s works
EXT-Pir
v1.6.0 is under developement (not released --> Tagged asunsolved
)
You have[PIR] EXT-Pir Version: 1.5.0 rev: 240303
-
tried the last update released today (ga\pir\detector) but no changes
-
Hi Cedric, any news?
-
I don’t modify relay script since one year, so I don’t know at the moment
see thereI have to do some test with my testing pi4. I haven’t had time yet, sorry
-
No problem… my only question is if you see something abnormal in log (like no “OFF” messages), or if you think that log is normal and maybe the relay could be broken. In that case I could open my mirror and check it.
Thanks! -
I don’t think, it’s that.
I think it’s related to python versionBut I have to do some test with rpi 3b+ and rpi 4
-
Hi bugs, did you find time to search for a fix? I have my magic mirror powered off for a month now because I can’t use it that way…
I tried to find a workaround but don’t know how to use something else to activaqte the relay to turn off backlight. -
Yes I found but I forget to commit it ;/
So, just update it (v2.5.2)
-
It works! Thank you so much Cedric!
-