@cubesmi that is amazing to hear, glad I could help. And thanks for checking the option with the wires. :)
edit: yes vgencmd does the trick
Read the statement by Michael Teeuw here.
Posts
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@flo thanks, I am very happy with it. The tiles on my wall don’t look too nice so I made the mirror as big as possible to cover that. But this design can be adapted to any size. I am guessing it weighs around 10kg. I strengthened the MDF basckplate with epoxy and used these:

to mount it to the wall. Plaster shouldn’t be a problem if you use the correct dowels and instead of two hooks you can use three if needed. Also a smaller size reduces the weight even more.
I need one more person to dismount the mirror. As I don’t want to grab on the glass plate.
I mentioned it before, but this is the frame I used (Nielsen 222):


The 25mm part is attached to doubled sided tape and holds the glas. The small inset is used for 4x4mm Rivets on each corner to screw the MFD backpate on the aluminum frame. Also strengthened with epoxy and a metal plate to distribute the total force.
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
That’d be the final result. The wire on the first picture I was just too lazy to hide. Just needs to be pushed down.
Second picture shows the news podcast as an ovelay. No unnecessary buttons, PIR sensors or anything else that’d destroy the design.
Side note: I added an automatic Wifi Setup Feature which plays a video when it isn’t connected to a WiFi network and creates a hotspot for initial setup.
@MichMich thanks for the amazing project you created. I have had some people at my home being absolutely amazed by the mirror. I always refer them to the spirit of open source and this great community.







-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@flo no, the “big” Benq logo is disabled via the developer menu of the monitor. You would only see a small “HDMI1” in the lower right. Yeah, I will post a a few pics in an hour when it is a bit darker outside. Hold on :D.
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@flo actually I have not, I power the monitor via my relay and my presence dedection makes me never see the logo so so far there was no need to do that
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@secdude I chose 4mm glas because it is already heavy enough to mount the mirror like that.
-
RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song
@nobita just install raspotify https://github.com/dtcooper/raspotify
the easy way (but I recommend reading the docs):
curl -sL https://dtcooper.github.io/raspotify/install.sh | sh -
RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song
@sharpy400 thanks, I will try immediately. I honestly tried finding a module like that, but that must one I must have overseen.
edit: nope, won’t work, seems spotify has changed the way they give out API keys none of the instructions will work. Spotify Connect Web seems to rely on libspotify which is obsolete.
-
RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song
@raywo Your module is amazing. I am using raspotify on my mirror, which is account independent and I was just wondering if there is a chance of implementing spotify connect meta data (e.g. from using raspotify). Instead of using your account as input for the track info using the output from
systemctl raspotify statusas the track id. And then use spotifys web api to get the song info?
https://developer.spotify.com/console/get-track/?id=1yVhDVRJt9o8DQDU3J6R4X&market=like this?
-
RE: ?Volume control?
That is how I do it, I use a HUE Dimmer Switch and FHEM to control it.
elif self.path=='/down': status='Volume down' subprocess.Popen(["amixer", "set", "Master", "8%-"], preexec_fn=os.setsid) elif self.path=='/up': status='Volume up' subprocess.Popen(["amixer", "set", "Master", "8%+"], preexec_fn=os.setsid) -
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@bachoo786 apparently it also depends on the quality of the sensor, I ordered a batch on ebay and got lucky with one where I have to get really close to the glass to trigger it. at first I thought I would change it, but now I am satisfied because it fits the purpose of just activating in case the mirror is off and the other power-on / off logic didn’t work (guests at home). But if I had to redesign I would not use a sensor at all as my other ways of powering the mirror seem far more integrated, e.g. I do not want to see the mirror turn on and / off as this disturbs the design.
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
Hi @bachoo786
thank you so much. As @MadScientist pointed out the three pins are connected directly to the Raspberry. For evaluating the state I use a small http server (see below). The important parts are where the you can find anything with
monitorStatusIf you want I can reduce the code to what is important for you. This is the complete server which allows control of
- ARD Livestream
- ARD Tagesschau
- Lowering / Increasing volume
- Radar Sensor (just the last couple lines of code (search for: GPIO.add_event_detect)
- Powerin On / Off Monitor by http Request (used if no one is at home / and at night)
For me the radar sensor is just a backup. I use the power control mainly like this:
- If someone is at home and it is between sunrise / sunset, turn on the monitor(1)
- If someone is at home but it is night and all lights are off, turn off the monitor(1)
- If someone is in front of the monitor turn it on by radar
(1) is done via FHEM (a home automation running on another raspberry, it calls my mirror like this: 10.0.1.49/on (monitor on) 10.0.1.49/off (monitor off) 10.0.1.49/up or /down (for volume) and so on.
#!/usr/bin/python3 -u host_name = '10.0.1.49' # Change this to your Raspberry Pi IP address host_port = 8000 proc = '' monitorstatus = 'unknown' import RPi.GPIO as GPIO from pathlib import Path import os import subprocess import signal from subprocess import call from time import sleep from http.server import BaseHTTPRequestHandler, HTTPServer SENSOR_PIN = 24 GPIO.setmode(GPIO.BCM) GPIO.setup(SENSOR_PIN, GPIO.IN) class MyServer(BaseHTTPRequestHandler): def monitor_on(channel): #define initial status of Monitor if monitorstatus!="on": status='Monitor on by Radar Sensor' #monitorstatus='on' subprocess.Popen(["/usr/bin/vcgencmd", "display_power", "1"], preexec_fn=os.setsid) def do_HEAD(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() def do_GET(self): global proc global monitorstatus html = ''' <html> <body style="width:960px; margin: 20px auto;"> <h1>Magic Mirror Control</h1> <p>Current GPU temperature is {}</p> <p>Podcast: <a href="/play">Play</a> <a href="/stop">Stop</a></p> <p>ARD Livestream: <a href="/ard">Play</a> <a href="/stop">Stop</a></p> <p>Volume: <a href="/down">down</a> <a href="/up">up</a></p> <p>System: <a href="/shutdown">Shutdown</a> <a href="/restart">Restart</a></p> <p>Monitor: <a href="/on">On</a> <a href="/off">Off</a></p> <div id="podcast-status"></div> <script> document.getElementById("podcast-status").innerHTML="{}"; </script> </body> </html> ''' temp = os.popen("/opt/vc/bin/vcgencmd measure_temp").read() self.do_HEAD() status = '' if self.path=='/': #GPIO.setmode(GPIO.BCM) #GPIO.setwarnings(False) #GPIO.setup(17, GPIO.IN) status='nothing' elif self.path=='/play': if proc=='': my_file = Path("/home/pi/MagicMirror/video.mp4") if my_file.is_file(): statinfo = os.stat('/home/pi/MagicMirror/video.mp4') if statinfo.st_size > 0: proc = subprocess.Popen(["omxplayer", "-o", "alsa:hw:ALSA", "--no-osd", "/home/pi/MagicMirror/video.mp4"], preexec_fn=os.setsid) status='Playing Podcast' else: proc = subprocess.Popen(["omxplayer", "-o", "alsa:hw:ALSA", "--no-osd", "/home/pi/MagicMirror/Loading.mp4"], preexec_fn=os.setsid) status='Not yet available' else: proc = subprocess.Popen(["omxplayer", "-o", "alsa:hw:ALSA", "--no-osd", "/home/pi/MagicMirror/Loading.mp4"], preexec_fn=os.setsid) status='Not yet available' else: status='Stopping Podcast' os.killpg(os.getpgid(proc.pid), signal.SIGTERM) proc='' elif self.path=='/ard': if proc=='': proc = subprocess.Popen(["livestreamer", "hlsvariant://daserste_live-lh.akamaihd.net/i/daserste_de@91204/master.m3u8", "best", "-vnp", "omxplayer -o alsa:hw:ALSA --no-osd --timeout 20"], preexec_fn=os.setsid) status='Playing ARD Livestream' else: status='Stopping Stream' os.killpg(os.getpgid(proc.pid), signal.SIGTERM) proc='' elif self.path=='/stop': if proc!='': status='Stopping Podcast' os.killpg(os.getpgid(proc.pid), signal.SIGTERM) proc='' else: status='Nothing to stop' elif self.path=='/shutdown': status='Shutdown' subprocess.Popen(["sudo", "shutdown", "-h", "now"], preexec_fn=os.setsid) elif self.path=='/restart': status='Restart' subprocess.Popen(["sudo", "reboot"], preexec_fn=os.setsid) elif self.path=='/down': status='Volume down' subprocess.Popen(["amixer", "set", "Master", "8%-"], preexec_fn=os.setsid) elif self.path=='/up': status='Volume up' subprocess.Popen(["amixer", "set", "Master", "8%+"], preexec_fn=os.setsid) elif self.path=='/on': if monitorstatus!="on": #switch on Monitor if status was off (by httpRequest NOT Radar) status='Monitor on' monitorstatus='on' subprocess.Popen(["/usr/bin/vcgencmd", "display_power", "1"], preexec_fn=os.setsid) elif self.path=='/off': if monitorstatus!="off": #switch off Monitor if status was on (by httpRequest NOT Radar) status='Monitor off' monitorstatus='off' subprocess.Popen(["/usr/bin/vcgencmd", "display_power", "0"], preexec_fn=os.setsid) self.wfile.write(html.format(temp[5:], status).encode("utf-8")) if __name__ == '__main__': http_server = HTTPServer((host_name, host_port), MyServer) print("Server Starts - %s:%s" % (host_name, host_port)) try: GPIO.add_event_detect(SENSOR_PIN , GPIO.RISING, callback=MyServer.monitor_on) #detect radar sensor and enable Monitor http_server.serve_forever() except KeyboardInterrupt: http_server.server_close() GPIO.cleanup() -
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@daniel3490 hi Daniel, it is bit hard to take down the mirror by myself, i have to wait until I have a friend over to help me. I don’t really see the edges of my monitor unless it is really really dark.
-
RE: Anyone else experiencing issues after updating Raspbian (black screen and wifi dropping)
@mwel1977 let me know if it worked :). Was it “600 and yes” before the change?
-
RE: Anyone else experiencing issues after updating Raspbian (black screen and wifi dropping)
For Wifi Problems I added:
iwconfig wlan0 power offto
sudo nano /etc/rc.localnow checking the output with
iwconfig wlan0gives me:
Power Management:offlet’s see if it is solved.
-
RE: Anyone else experiencing issues after updating Raspbian (black screen and wifi dropping)
Solution for screensaver blanking:
add:
@xset s noblank @xset s off @xset -dpmsto:
/home/pi/.config/lxsession/LXDE-pi/autostartNote: setting it in
/etc/xdg/lxsession/LXDE-pi/autostart or /etc/xdg/lxsession/LXDE/autostartdid not work anymore, the user files take precedence.
I don’t know why it changed with the latest Raspbian Update or what I did wrong, but if I don’t add the xset commands as above and check with
DISPLAY=:0 xset -qthe screensaver stays enabled. If you guys need to verify it is disabled, just run the above command and check if the following lines appear like that:
Screen Saver: prefer blanking: no allow exposures: yes timeout: 0 cycle: 600DPMS (Energy Star): Standby: 600 Suspend: 600 Off: 600 DPMS is DisabledIf blanking and timeout are yes and not 0 the screensaver is active (DPMS should also show disabled)
-
RE: Anyone else experiencing issues after updating Raspbian (black screen and wifi dropping)
Update: it seems all the xset options I set are now being ignored, manually disabling the screensaver brings the mirror back.
Update2: It seems also the wifi connections now gets reset every couple of minutes which may cause the resolve error I saw earlier in the logs
-
Anyone else experiencing issues after updating Raspbian (black screen and wifi dropping)
Hi guys,
I have updated Raspbian yesterday and ever since my mirror runs for a few minutes and then the screen goes blank. Nothing is in the logs and electron is still running. When I restart it -occassionally- I get resolve errors for github and stuff like that. But pin g / curl and everything works fine via shell.
edit: Webinterface is running. Could it be that the screensaver is active? I have always had it disabled in the LXDE and LXDE-pi config.
Any ideas?
KR,
Stephan
-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@madscientist okay, so after a couple of days I am absolutely satisfied. I turn on my monitor with a small httpserver python script whenever someone is at home and -if it is night- any HUE light is on. I am now thinking of changing this to different energy saving modes in my magicmirror:
- Always On
- On when someone is home
- On when someone is home and any light is on (turns off at night)
- Only on when activated by PIR / Radar Sensor

-
RE: Strip Down Guide for BenQ 28" VA Monitor GC2870H
@adrien Okay, so it is about 3 seconds boot time I am estimating. No logo anymore. Just the annoying “HDMI1” screen on the lower right. Let’s see if that satisfies me or I will cut the wires as well. Have you tried yet?