Skip to content

Docker image for Raspberry Pi with a REST api for HDMI CEC

Notifications You must be signed in to change notification settings

blakeblackshear/rpi-hdmi-cec-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

blakeblackshear/rpi-hdmi-cec-rest blakeblackshear/rpi-hdmi-cec-rest

Docker image running hdmi-cec-rest for Raspberry Pi

A REST api for your HDMI CEC devices on port 5000. Runs this go application.

Running

You will need to share /dev/vchiq with the container:

docker run -d --name="hdmi-cec-rest" -v /etc/localtime:/etc/localtime:ro --net=host --device=/dev/vchiq blakeblackshear/rpi-hdmi-cec-rest:latest

Home Assistant

I built this to allow Home Assistant to more easily talk to devices over HDMI CEC. The native component does not provide a way to check the status of a device. An example config looks like this, but may vary depending on your TV.

switch:
  - platform: rest
    name: TV
    resource: http://localhost:5000/device/0/power
    body_on: '{"state":"on"}'
    body_off: '{"state":"off"}'
    is_on_template: '{{ value_json.state == "starting" or value_json.state == "on" }}'

About

Docker image for Raspberry Pi with a REST api for HDMI CEC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published