Giter Club home page Giter Club logo

home-assistant-remote-cec's Introduction

License GitHub CodeQL Workflow Status GitHub last commit

With this Integration you can control a cec device (like a tv), that is not directly connected to your server with a raspberry, that acts as a cec "proxy"

Supported Server Devices:

  • Raspberry Pi 2 (not tested)
  • Raspberry Pi 3
  • Raspberry Pi 4 (not tested)
  • Raspberry Pi Zero
  • probably many more

Supported Server Operating Systems:

  • Raspberry Pi OS
  • every Debian based Distribution (not tested)

Server Installation:

  1. Connect via SSH or open a Terminal
  2. Run:
$ cd /
$ sudo git clone https://github.com/JonathanTreffler/Home-Assistant-remote-cec.git
$ cd Home-Assistant-remote-cec
$ sudo chmod +x ./install.sh
$ sudo ./install.sh
  1. Connect the Raspberry Pi to your cec compatible device via HDMI
  2. Assign a static local IP Adress to your Raspberry (in most cases via the web interface of your router)
  3. Run:
sudo service HomeAssistantRemoteCEC start

The server will get started automatically after a reboot

You can test if the server is started by running:

sudo netstat -tulpn | grep 8080

You can see the logs by running:

sudo systemctl status HomeAssistantRemoteCEC

Home Assistant Configuration

Add the following to your HomeAssistant configuration.yaml and customize it to fit your setup:

rest_command:
  device_on:
    url: 'http://IP:8080/poweron'
  device_off:
    url: 'http://IP:8080/shutdown'

Troubleshooting

  • If nothing happens if you try to send a command:
    • Make sure the server is running
    • Make sure the server uses the right cecDeviceId (can be changed in the app.js file)(the cecDeviceId is in most cases 0)
    • Try a different HDMI Cable, not all cables or adapters (needed for the Pi Zero) are compatible with CEC
  • The server doesn't start because something else is running on port 8080:
    • You can change the port of the web server in the app.js file (remember to also update the home assistant configuration)

Compatible Devices:

Many brands call CEC differently, but they should all be compatible:

  • T-Link (ITT)
  • EasyLink (Philips)
  • EZ-Sync (JVC)
  • Simplink (LG)
  • Digital Link HD (Loewe)
  • NetCommand for HDMI (Mitsubishi)
  • RIHD (Remote Interactivity over HDMI) (Onkyo)
  • Viera Link (Panasonic)
  • Kuro Link (Pioneer)
  • Anynet+ (Samsung)
  • Aquos Link (Sharp)
  • BRAVIA Sync (Sony)
  • Regza-Link (Toshiba)
  • TechniLink (Technisat)
  • CSTLink (Coolstream)
  • FUN-Link (Funai Electric)
  • Digi-Link (Grundig)

How does CEC work ?

The raspberry communicates with a cec compatible device like a TV or DVD Player over HDMI.

All Devices in this CEC "network" can communicate even if they are not directly connected via HDMI (e.g Raspberry sends a signal to the TV via HDMI, wich forwards it to the DVD Player).

For more information just read the wikipedia article :)

home-assistant-remote-cec's People

Contributors

jonathantreffler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.