{"id":20417076,"url":"https://github.com/0x77dev/smart-mirror","last_synced_at":"2025-04-12T17:14:43.655Z","repository":{"id":232480893,"uuid":"784446111","full_name":"0x77dev/smart-mirror","owner":"0x77dev","description":"Simple smart mirror project using a Raspberry Pi 4 and BalenaCloud to display a Home Assistant dashboard.","archived":false,"fork":false,"pushed_at":"2024-04-11T05:23:58.000Z","size":19,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T17:14:37.105Z","etag":null,"topics":["balena","home-assistant","magicmirror","raspberry-pi","smart-mirror"],"latest_commit_sha":null,"homepage":"https://community.home-assistant.io/t/smart-mirror-with-lovelace-dashboard/715299","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0x77dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-09T21:45:01.000Z","updated_at":"2024-08-27T01:00:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"1792d0c0-8ce6-4621-9cad-2ae8b9c638a7","html_url":"https://github.com/0x77dev/smart-mirror","commit_stats":null,"previous_names":["0x77dev/smart-mirror"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x77dev%2Fsmart-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x77dev%2Fsmart-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x77dev%2Fsmart-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x77dev%2Fsmart-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x77dev","download_url":"https://codeload.github.com/0x77dev/smart-mirror/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602313,"owners_count":21131616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["balena","home-assistant","magicmirror","raspberry-pi","smart-mirror"],"created_at":"2024-11-15T06:24:24.117Z","updated_at":"2025-04-12T17:14:43.650Z","avatar_url":"https://github.com/0x77dev.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HA Smart mirror\n\nSimple smart mirror project using a Raspberry Pi 4 and BalenaCloud to display a Home Assistant dashboard.\n\n[Home Assistant Community Topic](https://community.home-assistant.io/t/smart-mirror-with-lovelace-dashboard/715299)\n\n![My setup looks like this](https://repository-images.githubusercontent.com/784446111/b1ce65e2-ea77-44a3-9cfc-61575e1e017b)\n\n## Hardware\n\n- Raspberry Pi 4\n- SD Card (4GB+)\n- [I bought this pre-built smart mirror on Amazon](https://amzn.to/4cIKq5o), but you can build one or use any monitor.\n\n## Easy way\n\n1. [![balena deploy button](https://www.balena.io/deploy.svg)](https://dashboard.balena-cloud.com/deploy?repoUrl=https://github.com/0x77dev/smart-mirror)\n\n\n2. Flash your RPI4 with the balenaOS image and boot it up.\n\n3. Set static IP for your RPI4 in your router DHCP server settings.\n\n4. Patch your home assistant configuration to bypass auth for the smart mirror\n\n```yaml\nhomeassistant:\n  auth_providers:\n    # Important to keep this top on the list to bypass login page\n    - type: trusted_networks\n      trusted_networks:\n        - 192.168.0.0/24\n      trusted_users:\n        # Set your smart mirror ip address and kiosk user id\n        # Tip: to enhance security and avoid ip changes modify your router DHCP server to assign a static ip to your smart mirror\n        {{ smart mirror ip address }}: {{ user uuid }}\n        # Disable bypass for the rest of the network\n        192.168.0.0/24:\n      allow_bypass_login: true\n    - type: homeassistant\n```\n\n5. Optional: Install [Kiosk mode](https://github.com/NemesisRE/kiosk-mode), [Blackened Theme](https://github.com/home-assistant-community-themes/blackened), and [Browser mod](https://github.com/thomasloven/hass-browser_mod) for better automation and UI experience.\n\nI use a separate dashboard for the smart mirror with a custom theme and kiosk mode to hide the header and sidebar.\n\nHere is an example of the dashboard configuration:\n```yaml\nkiosk_mode:\n  kiosk: true\n  hide_refresh: true\n  block_overflow: true\nviews:\n  - type: sections\n    title: Home\n    icon: mdi:home\n    sections: []\n    cards: []\n    max_columns: 10\n    theme: blackened\n```\nAnd then to edit the dashboard use `/dashboard-mirror/?disable_km\u0026edit=1` and see [Setting custom URL](#setting-custom-url) to set the custom URL (omit the query parameters) for your separate dashboard.\n\n## Manual way\n\n1. Clone this repo\n\n```bash\ngit clone https://github.com/0x77dev/smart-mirror\n```\n\n2. [Install balena-cli](https://docs.balena.io/reference/balena-cli/)\n\n3. Create a new application in BalenaCloud and push the code to your application\n\n```bash\nbalena login\nbalena push \u003capp-name\u003e\n```\n\n4. Flash your RPI4 with the balenaOS image and boot it up.\n\n5. Set static IP for your RPI4 in your router DHCP server settings.\n\n6. Patch your home assistant configuration to bypass auth for the smart mirror as mentioned in the [easy way](#easy-way).\n\n## Setting custom URL\n\n1. Open the balena dashboard and navigate to your device.\n2. Open Device Variables\n3. Add a new variable with the key `LAUNCH_URL` and value with your Home Assistant or any other URL.\n\n## Additional docs\n\n- [Browser/ REST API and Configuration variables](https://github.com/balena-io-experimental/browser?tab=readme-ov-file#api)\n- [Home Assistant/ Auth providers](https://www.home-assistant.io/docs/authentication/providers)\n- [Getting started with Balena](https://docs.balena.io/learn/getting-started/raspberrypi5/nodejs/)\n\n## Useful commands\n\n### Refresh the page\n\n```bash\ncurl -X POST {{ SMART MIRROR IP ADDRESS }}:5011/refresh\n```\n\n### Screenshot\n\n```url\n{{ SMART MIRROR IP ADDRESS }}:5011/screenshot\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x77dev%2Fsmart-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x77dev%2Fsmart-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x77dev%2Fsmart-mirror/lists"}