It can be anywhere so long as it’s executable from the logged in user.ĭISPLAY=:0 xdotool search –name home windowactivate –sync key F5 > ~/tmp.log 2>&1 In this case, it’s F5 to refresh.Ĭreate a file called refresh_kiosk.sh. The tool will find the window and send a keyboard command. This is where a tool called xdotool comes in. A script is needed to refresh the browser. ![]() Kiosk mode doesn’t automatically refresh and if it’s like Home Assistant, there is heavy caching optimising in the browser. Otherwise when the session times out or automatic refresh is turned on, you’ll encounter the log in page again. Once kiosk Chromium is running, log in using a keyboard (and mouse if necessary) and ensure you set it to remember your login. –check-for-update-interval=31536000 Login Sed -i ‘s/”exited_cleanly”:false/”exited_cleanly”:true/ s/”exit_type”:”\+”/”exit_type”:”Normal”/’ ~/.config/chromium/Default/PreferencesĬhromium-browser –noerrdialogs –disable-infobars –kiosk $KIOSK_URL Sed -i ‘s/”exited_cleanly”:false/”exited_cleanly”:true/’ ~/.config/chromium/’Local State’ # Remove exit errors from the config files that could trigger a warning Xset s noblank # turn off screen blanking Xset -dpms # turn off display power management system Sudo apt-get install -no-install-recommends chromium-browser SetupĮdit openbox to run chromium by editing /etc/xdg/openbox/autostart and add the following to the end of the file: Sudo apt install -no-install-recommends xserver-xorg x11-xserver-utils xinit openbox Install the GUI packages to allow chromium to run: The select: System Options > Boot/Autologin and select Console Autologin Configure Raspbian OSĮnsure auto login is setup to allow the device to start up and boot Chromium. It’s best to set the user to not be an admin user and set the dashboard to show for non admin users aswell.Ī working cron or equivalent scheduler. It will need to be connected physically to a monitor/display and a keyboard to enter your log in details.Ĭreate a user in Home Assistant for this user to log in. It assumes you have an internet connect Raspberry Pi 4 running Raspian OS lite (command line only version). The main driver for this is to replace the MagicMirror to show a dashboard from Home Assistant.įrom a security stand point, this is not the best solution so proceed with caution. Many thanks for all people who contributed to building this mirror interface.I wanted to create a display of a web page on a Raspberry Pi with no desktop or browser looking controls. For the full demo see: Smart Mirror Demo - YouTube And now I can easily interact with it.īelow I included to pictures. This device functions literally as the brain of my Smart Home. A lot of custom made components like Lovelace cards and Integrations build by the Home Assistant community are used to deliver this need view. Kiosk view shows the Home Assistant dashboard and OpenCV is used for Face Recognition. Home assistant is installed in a docker container on the raspberry pi. ![]() Therefore the only wire leaving the mirror is the power cord which in this case I was able to hide behind the mirror. Furthermore it obviously supports Zigbee and communicates over Wifi. Upon face recognitions the LED shortly turns green or red when no face is recognized. ![]() The LED is a nice touch combined with power on/off and face recognition: It lights up when the screen is turned on over CEC and fades out when it turns off (base don whether somebody is in the room or not, to safe power). In front of the glass there is an infrared frame delivering the touchscreen functionality. An old 40 inch Samsung TV functions as the screen which is al put away nicely behind a two way mirror. It uses a raspberry pi 4B with pi camera to power the magic mirror. I also included a Chromecast so I have a platform to view my holiday after movies right from the mirror. It addition to the main dashboard I also have a dedicated dashboard for energy data, shows and movies and an almost empty one for mirror view. In addition in supports face recognition to show personalized data from the person standing in front of the mirror and hide personal data from “unknown” viewers. Also displaying information like weather, newly downloaded or ready to view shows and movies, news and calendar. Just finished my 40 inch Magic Mirror based on Home Assistant Frontend to control all devices like lights and vacuum with touchscreen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |