diff --git a/.templates/cec-mqtt-bridge/service.yml b/.templates/cec-mqtt-bridge/service.yml new file mode 100644 index 00000000..dc2642c6 --- /dev/null +++ b/.templates/cec-mqtt-bridge/service.yml @@ -0,0 +1,19 @@ + cec-mqtt-bridge: + image: jonaseck/rpi-cec-mqtt-bridge + container_name: cec-mqtt-bridge + restart: unless-stopped + devices: + - '/dev/mem:/dev/mem' + - /dev/vcsm + - /dev/vchiq + environment: + - MQTT_BROKER=localhost + - MQTT_PORT=1883 + - MQTT_PREFIX=media + - MQTT_USER=username + - MQTT_PASSWORD=password + - CEC_ENABLED=1 + - CEC_ID=1 + - CEC_PORT=RPI + - 'CEC_DEVICES=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15' + - IR_ENABLED=0 diff --git a/docs/cec-mqtt-bridge.md b/docs/cec-mqtt-bridge.md new file mode 100644 index 00000000..694910a7 --- /dev/null +++ b/docs/cec-mqtt-bridge.md @@ -0,0 +1,12 @@ +# HDMI-CEC-MQTT-bridge +## References +- [Docker](https://hub.docker.com/r/jonaseck/rpi-cec-mqtt-bridge) +- [Upstream documentation](https://github.com/michaelarnauts/cec-mqtt-bridge/blob/master/README.md) +- [cec-o-matic](http://www.cec-o-matic.com/) + +## Configuration +Amend the MQTT settings in the docker-compose.yml file after building the stack, but before running `docker-compose up -d`. + +(You don't need to change or delete the MQTT_USER and MQTT_PASSWORD if you are not using a username and password with your mqtt broker. Please note that the MQTT_BROKER cannot be "localhost"). + +If you have already run `docker-compose up -d`, simply run `sudo nano ~/IOTstack/docker-compose.yml`, change the mqtt settings and run `docker-compose up -d` again to recreate the cec-mqtt-bridge. diff --git a/menu.sh b/menu.sh index a0a08b60..b2c885bf 100755 --- a/menu.sh +++ b/menu.sh @@ -46,6 +46,7 @@ declare -A cont_array=( [python]="Python 3" [gitea]="Gitea" [dozzle]="Dozzle" + [cec-mqtt-bridge]="HDMI-CEC-MQTT-bridge" ) declare -a armhf_keys=( @@ -62,7 +63,7 @@ declare -a armhf_keys=( "adminer" "openhab" "zigbee2mqtt" - "deconz" + "deconz" "pihole" "plex" "tasmoadmin" @@ -77,6 +78,7 @@ declare -a armhf_keys=( "python" "gitea" "dozzle" + "cec-mqtt-bridge" # add yours here ) sys_arch=$(uname -m)