Use selenium to capture a screenshot of a home assistant dashboard, and then upload it as an Art Mode image to a Samsung Frame TV.
Many thanks to @NickWateron for https://github.com/NickWaterton/samsung-tv-ws-api
You'll need go and docker to build
Run
make docker
to build the Go selenium app and two docker containers you need
Add a .env file in the root that looks like this:
FRAME_SCRAPER_URL=https://your.home.assistant.example
FRAME_SCRAPER_DASHBOARD_URL=lovelace/<my dashboard>?kiosk
FRAME_SCRAPER_USERNAME=<HA username>
FRAME_SCRAPER_PASSWORD=<HA password>
FRAME_IP=<The IP of you Frame TV>
TZ=America/Los_Angeles
Note that the ?kiosk
in the dashboard url enables kiosk-mode if you have it
installed. It's not required but it will make your dashboard render without the surrounding frame, which is probably
what you want.
The Selenium browser's timezone will be whatever you specify in TZ
, which may affect the rendering of some components.
Run
./scrape.sh