{"id":34705782,"url":"https://github.com/ipatalas/dashboard-switcher","last_synced_at":"2026-04-22T15:38:52.093Z","repository":{"id":149469901,"uuid":"235652829","full_name":"ipatalas/dashboard-switcher","owner":"ipatalas","description":"A dashboard switcher for my RPi","archived":false,"fork":false,"pushed_at":"2026-02-19T15:36:28.000Z","size":1773,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-19T19:17:44.974Z","etag":null,"topics":["dashboard","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipatalas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-22T19:46:04.000Z","updated_at":"2026-02-19T15:36:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae0a0e68-8507-4f35-86e4-5b3ce0bff489","html_url":"https://github.com/ipatalas/dashboard-switcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ipatalas/dashboard-switcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipatalas%2Fdashboard-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipatalas%2Fdashboard-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipatalas%2Fdashboard-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipatalas%2Fdashboard-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipatalas","download_url":"https://codeload.github.com/ipatalas/dashboard-switcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipatalas%2Fdashboard-switcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32143668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dashboard","raspberry-pi"],"created_at":"2025-12-24T23:20:11.499Z","updated_at":"2026-04-22T15:38:52.086Z","avatar_url":"https://github.com/ipatalas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dashboard switcher\n\nDashboard switcher is a simple web app to be used to display multiple dashboards and switch between them in specific intervals.\nI'm using it on my Raspberry Pi with original 7\" display in living room to show some different stuff including a clock.\n\n## Why?\n\nI'm using [FullPageOS](https://github.com/guysoft/FullPageOS/) for that so natural choice was to use [FullPageDashboard](https://github.com/amitdar/FullPageDashboard) which does the job. Why write it from scratch?  \nWell... I have been using **FullPageDashboard** at the beginning and in terms of features I was pretty happy.\nHowever I've been having some performance issues while the dashboards were switched. The switch was taking sometimes even 4-5s to fully load.\n\nMost of my dashboards come from **Home Assistant** and it takes some time to load on a Raspberry Pi. That was driving me nuts. I took some steps to see if that can be improved but failed with that so decided to try something different on my own.\n\nThis project is the outcome of few evenings playing with that. The approach I took to overcome the problem I had was quite simple. Let's have two iframes and preload next dashboard before the change happens and then just switch iframes visibility using simple CSS. This works instantaneous:\n\n![Demo](dashboard-switcher.gif)\n\nThe result is even better than I expected. Even on my power desktop each **Home Assistant** dashboard takes at least half a second to properly lay out. With preload it's really really fast even on **Raspberry Pi**. I tried to do this as much lightweight as possible to save resources. There's only one external library to connect to MQTT, everything else is plain old JS.\n\nThere are not many features though (yet). There is no panel to configure the dashboards. That may change in future but for now suits me needs so it's not a priority.\n\n# Installation\n\nThat's a simple static web page so you don't need any specific server-side solution. Anything able to host static pages will do. For inspiration please visit those pages:\n\n- https://www.ostechnix.com/how-to-quickly-serve-files-and-folders-over-http-in-linux/\n- https://gist.github.com/willurd/5720255\n\nAs you can see there's more than one way to skin a cat. Pick whichever you find the easiest for you. It can be even hosted somewhere in the cloud but I prefer to have it hosted at home for many reasons. It's your call though.\n\nFor example if you'd like to use http-server please do the following:\n\n```cmd\n$ npm install -g http-server\n$ git clone https://github.com/ipatalas/dashboard-switcher.git\n$ cd dashboard-switcher\n$ http-server -p 8000\n```\n\nThat will start HTTP server listening on port 8000.\nPersonally I'm using a Docker based **nginx** server but anything will really do. In future I plan to create a docker image from this so that it's self contained.\n\n# Configuration\n\nAs I said before there's no configuration panel. To configure panels you should provide a link to JSON file which will serve as configuration.  \nThe URL to be opened should be http://*[host or ip]*:*port*/dashboard.html?config=***[config URL]***  \nIn my case it's http://home:3002/dashboard.html?config=http://home:3002/config.json because I'm hosting the config file along with the application but it can even be a **GitHub Gist** for instance. That way it's enough to have a single instance of the application even if you want to show different dashboards on different screens in each room. Just the configuration link will differ.\n\nThe configuration itself must be a JSON in the following structure:\n```JSON\n{\n    \"mqtt_button\": {\n        \"server\": \"ws://mqtt_server:9001\",\n        \"topic\": \"zigbee2mqtt/button\"\n    },\n    \"dashboards\": [\n        {\n            \"url\": \"http://home:8123/lovelace/commute_view?kiosk\",\n            \"duration\": \"2m\",\n            \"active_hours\": \"06:00-09:00\"\n        },\n        {\n            \"url\": \"http://home:8123/lovelace/dashboard_view?kiosk\",\n            \"duration\": \"5m\",\n            \"active_hours\": \"05:00-23:00\"\n        },\n        {\n            \"url\": \"http://home:8123/lovelace/clock_view?kiosk\",\n            \"duration\": \"2m\",\n            \"active_hours\": \"22:00-06:00\"\n        }\n    ]\n}\n```\n\n`mqtt_button` is optional. I do have a **Xiaomi WXKG11LM** button in the living room and pressing that once will switch to next dashboard automatically. Currently only this one is supported but I might want to make it more abstract so that arbitrary MQTT command can be used.\n\n`dashboards` section is required as it serves all the dashboards that you want to cycle between. It's an array of objects with the following properties:\n- `url` - the URL to load\n- `duration` - time to show the dashboard in minutes or seconds (`5m`, `30s`, etc.)\n- `active_hours` - that's the time window in which specific dashboard is active. Outside of this window that dashboard won't be shown. This is optional, when empty it will be shown **24/7**. Currently only *24h* format is supported.\n\n# Known issues\n\nSince this is using IFRAME under the hood not all pages from the internet can be displayed. Those with [X-Frame-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) header or another type of frame buster won't work.  \nThat should not be a problem when using self hosted dashboards like **Home Assistant** for instance.\n\n# Disclaimer\n\nThis is still a very naive solution which I'd consider alpha/beta. If something doesn't work please raise an issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipatalas%2Fdashboard-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipatalas%2Fdashboard-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipatalas%2Fdashboard-switcher/lists"}