Read the statement by Michael Teeuw here.
-
Hello,
my module is not working, I have the pir sensor connected to Pin 7 and when you start the screen stays white and nothing happens when I take the pir of the config it goes again. -
@samydp Maybe you can find the answer here :After rebooting, run MM with pm2 and shows “White Screen”, I checked the pm2 error log shows something like “Expected 49, got 48” as before,
Run “npm rebuild --runtime=electron --target=1.3.4 --disturl=https://atom.io/download/atom-shell --abi=49” in the MMM-PIR-Sensor folder,
Run “pm2 restart mm” and it works.” -
it is not’ve tried as it stands anyway thanks for your help
-
@IngmarSwart Thats a really nice solution. Did you use the virtual environment from the tutorials? If you did so, how did you wrap them together? Is it even possible? Thanks
-
Since IngmarSwart didn’t connect since few months, maybe someone can just explain me the reason why a PIR sensor is still needed in his config? i don’t get the role of the PIR since there is already a cam to detect the move…? if anyone… thx guys!
-
@Defibrillat0r: Thanks. Yes, I use the virtual environment. That being said, I don’t think it is stricktly necessary. In our configuration, the RPi is dedicated to running the MM, so the likelyhood that you need different versions of packages is very small. If you do use the virtual environment, you just have to make sure all the packages listed at the top of the python file are installed for the virtual environment you are working on. Other than that, no special tricks are needed.
@bibi: In my solution a PIR sensor is not needed. You only use @paviro’s module to interface the python code with the MM.
-
@IngmarSwart ohh ok now it’s clear! thx alot for your reply.
your hack is working perfectly so far? -
@bibi: I’ve only tested my solution for a couple of days, so I can’t say much about the long term stability. The reason for this is simply that I was in the process of designing a (nearly) frameless mirror the last couple of months. The components have been ordered and I hope to assemble everything in the coming month. It might take a bit longer, as I have quite a few business trips lined up for November.
-
@IngmarSwart I see i am still getting everything but in meantime i am working on the software side. You solution is nice and i will try to implement it i think… with my noob skills :)))
-
Hi,
i had big problems by switching off my screen with the PIR or another module with camera. The problem was not the module itself it is a firmware problem of the PI. I could see the same problem outside of MagicMirror as well by trying different things.
Reported also here:
https://github.com/raspberrypi/linux/issues/487The symptom is that after a while of switching on and off the screen it remains off.
Dmesg reports the problem:
Nov 1 08:22:00 MagicMirror kernel: [86411.138649] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.138665] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.138670] detected fb_set_par error, error code: -22 Nov 1 08:22:00 MagicMirror kernel: [86411.139138] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.139148] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.139152] detected fb_set_par error, error code: -22 Nov 1 08:22:00 MagicMirror kernel: [86411.140642] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.140654] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.140659] detected fb_set_par error, error code: -22 Nov 1 08:22:00 MagicMirror kernel: [86411.140777] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.140785] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.140789] detected fb_set_par error, error code: -22 Nov 1 08:22:00 MagicMirror kernel: [86411.140856] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.140863] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.140868] bcm2708_fb_pan_display(0,0) returns=-22 Nov 1 08:22:00 MagicMirror systemd[1]: Started Getty on tty6. Nov 1 08:22:00 MagicMirror kernel: [86411.256398] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.256413] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.256418] detected fb_set_par error, error code: -22 Nov 1 08:22:00 MagicMirror kernel: [86411.256758] raspberrypi-firmware soc:firmware: Request 0x00048003 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.256770] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22) Nov 1 08:22:00 MagicMirror kernel: [86411.256775] bcm2708_fb_pan_display(0,0) returns=-22 Nov 1 08:22:00 MagicMirror kernel: [86411.296428] raspberrypi-firmware soc:firmware: Request 0x00040002 returned status 0x80000001 Nov 1 08:22:00 MagicMirror kernel: [86411.296455] bcm2708_fb soc:fb: bcm2708_fb_blank(0) failed: -22
Switching off the screen with
/opt/vc/bin/tvservice -o
and on with
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chat 7
does not work reliable! The git issue tells you more about.
The workaround is a not yet described solution inside the config.txt
https://github.com/raspberrypi/documentation/pull/245/files
the option “hdmi_blanking=1” is your friend in this case! :D
Now i’m switching off the screen with
vcgencmd display_power 0
and on with
vcgencmd display_power 1
And it is working now like a charm! Did started to use it one day before this report and it is still working without any issue :)
Honestly speaking i don’t use any MM module for switching off anymore. But maybe my discovered solution will help any other and might be a way to change the module as well.
If you have trouble with on/off as well please check the output of dmesg. If you have the frambuffer problem you can fix it.
My personal solution is to have the PIR state at FHEM and from FHEM i’m using a script to switch the screen. But that’s a special case and for the most people here the usage of a MM Module will be the better way.
regards
Dirk