diff --git a/README.md b/README.md
index 3930b2e..18a20d7 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# ambience
-ambience shows your favorite pictures from [Immich](https://immich.app/) in a slideshow on your TV.
-Portrait pictures are arranged side-by-side, and date and location (if available) will be shown.
+ambience shows selected pictures from [Immich](https://immich.app/) in a slideshow on your TV.
+Portrait pictures are arranged side-by-side, and date and location (if available) of the pictures will be displayed.
[![Screenshot](deploy/example.png)](deploy/example.png)
@@ -21,23 +21,24 @@ Portrait pictures are arranged side-by-side, and date and location (if available
| Left arrow | Show previous slide and pause slideshow |
| Right arrow | Show next slide and pause slideshow |
| Space
Play/Pause Media Key | Play / Pause |
-| S
Stop Media Key | Pause |
| P | Play |
+| S
Stop Media Key | Pause |
## Deployment
ambience is a Node.js web application, packaged in a container.
-You can point a browser on your TV directly to ambience, or attach a Raspberry PI or Mini PC to your TV and open ambience in fullscreen (e.g. Chrome Kiosk mode).
+You can point the browser on your TV directly to ambience, or attach a Raspberry PI or Mini PC to your TV and open ambience in fullscreen (e.g. Chrome Kiosk mode).
The [deploy](deploy/) folder contains examples using a Raspberry PI, incl. support for HDMI-CEC to control the slideshow with a TV remote.
## Development
-Start development server:
+To start the development server, use the following commands:
```
export IMMICH_HOST=https://immich.local
export IMMICH_API_KEY=...
export IMMICH_ALBUMS=...
+npm install
npm run dev -- --open
```
diff --git a/deploy/cec.service b/deploy/cec.service
new file mode 100644
index 0000000..19f9b82
--- /dev/null
+++ b/deploy/cec.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Kiosk CEC
+Requires=dev-cec0.device
+After=dev-cec0.device
+
+[Service]
+User=pi
+Group=pi
+ExecStart=/home/pi/cec.sh
+
+[Install]
+WantedBy=default.target
diff --git a/deploy/cec.sh b/deploy/cec.sh
new file mode 100755
index 0000000..860a8be
--- /dev/null
+++ b/deploy/cec.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+export DISPLAY=:0
+
+echo as | cec-client | while IFS= read -r line
+do
+ case "$line" in
+ *"key pressed: left"*"current"*)
+ echo Left
+ xdotool key Left
+ ;;
+
+ *"key pressed: right"*"current"*)
+ echo Right
+ xdotool key Right
+ ;;
+
+ *"key pressed: select"*"current"*)
+ echo Select
+ xdotool key space
+ ;;
+
+ *"key pressed: play"*"current"*)
+ echo Play
+ xdotool key P
+ ;;
+
+ *"key pressed: pause"*"current"*)
+ echo Pause
+ xdotool key S
+ ;;
+ esac
+done
diff --git a/deploy/kiosk.service b/deploy/kiosk.service
new file mode 100644
index 0000000..4e2a53f
--- /dev/null
+++ b/deploy/kiosk.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Chromium Kiosk
+Requires=network-online.target
+After=network-online.target
+After=systemd-user-sessions.service plymouth-quit-wait.service
+
+[Service]
+ExecStart=/usr/bin/xinit /home/pi/kiosk.sh
+
+[Install]
+WantedBy=default.target
diff --git a/deploy/kiosk.sh b/deploy/kiosk.sh
new file mode 100755
index 0000000..a3d55e4
--- /dev/null
+++ b/deploy/kiosk.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# disable DPMS and prevent screen from blanking
+/usr/bin/xset s off -dpms
+
+# hide cursor after 1s
+/usr/bin/unclutter -idle 1 -root &
+
+# start chromium as 'pi' user
+/usr/bin/sudo -H -u pi -- /usr/bin/chromium-browser \
+ --kiosk \
+ --start-fullscreen \
+ --start-maximized \
+ --window-size=1920,1080 \
+ htts://ambience.local