Read the statement by Michael Teeuw here.
Best setup for "client only"
-
Hi all,
I have until recently run MagicMirror on a Raspberry Pi, but now I’m transitioning into a docker setup. I want my raspberry pi to only be a “client”. I have some other functions I also want to include:
List of requirements:
- Raspberry Pi as “client” - i.e. only display MM interface (
- Possibility to turn on and off screen with external motion sensor (i.e. power saving). In my old setup I used the MMM-Remote-control module and had NodeRed to send a web request with “turn screen on/off” when a motion sensor was triggered.
What would be the best & easiest way to set this up?
-
@freland the first is easy, launch a browser to view mm. chrome has a command line that I use for devices that don’t have electron
the second causes problems, cause a browser by itself cannot access hardware or run commands to do the work. so it needs a native/server component.
there are python scripts u could run in the background that could do this… (read gpio)
https://raspberrypi.stackexchange.com/questions/87319/turn-screen-on-and-off-with-motion-sensorthe github motion project supports webcams and has a mechanism to call some pgm/script when motion happens. (I use this in my mmm-sleepwake module)
-
Thanks for the input!
Hmm, the problem is that the old setup used an external motion sensor (NodeRed docker on my NAS with a Hue motion sensor triggering NodeRed to sending the screen on/off command on the MM Raspberry Pi setup via MMM-Remote-control).
Sounds Like I have to scrap the NodeRed/Motion-sensor-setup and modify my MM-setup and include a motion sensor in it… :)
Or, how would things behave if I have MM installed on the Raspberry and run it in client mode? Would a “screen off” call turn off the screen on the client or would it make no sense to it?
-
@freland client mode is just the browser w no modules. so same problem
you need some code to read/react to a sensor somewhere, and then inform some code on the client machine to turn off the display.
a node-red server in the background could still do all that.
it’s just more than a dumb client