Skip to content

Latest commit

 

History

History
139 lines (104 loc) · 6.66 KB

README.md

File metadata and controls

139 lines (104 loc) · 6.66 KB

logo

Homeassistant MagentaTV Integration

GitHub Release GitHub Activity Dynamic JSON Badge License hacs Project Maintenance BuyMeCoffee

Integration to integrate with media receivers for Telekom MagentaTV.

Disclaimer

This project is at a very early stage. Please reports bugs and request features to improve it over time. Feel free to contribute!

Currently Supported Devices

  • Telekom Media Receiver 401
  • Telekom Media Receiver 201

Features

Current

  • Autodiscovery of media receivers within the local network
  • See current (TV) playing status
  • Manual setup of a media receiver via host/ip and port
  • Send button Presses to the receiver (remote control via Homeassistant service) Check out the service magentatv.send_key
  • Configurable listen/advertised address and port used for receiving events (for runing in Docker or NAT situations)
  • MediaPlayer controls like play/pause/mute/volume/on/off
  • Show the current running channel and program

Planned

  • Support more device models
  • Detect if App (Youtube/Prime/Netflix) is currently active on the receiver
  • (Unknwon if possible) Start apps like Youtube/Netflix from Homeassistant

Installation

HACS (Recommended)

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

or

  1. Install HACS
  2. Add https://github.com/Xyaren/homeassistant-magentatv as a custom repository
  3. Restart Home Assistant

Manual

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called homeassistant-magentatv.
  4. Download all the files from the custom_components/homeassistant-magentatv/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant

Docker considerations

In order to receive events from the mediareceivers, the integration needs to create a server listening on port 11223. Make sure this port is reachable from the receivers. In case of homeassistant running in docker ( except running in host mode), this requires mapping port 11223 to the outside.

Check out the Configuration section below for configuration related to setting a the correct advertisement address and port in docker scenarios

Adding a Receiver

  1. Get your Telekom user id This id is required for paring the integration with your receiver. It therefore has to belong to the same account, the receiver is running on.
  2. Configure a receiver
  3. Provide your user id from step 1.
  4. Wait for the paring to finish (No confirmation on the tv neccecary)
  5. Confirm adding the device and optionally assign it an area within homeassistant

Configuration

You can control the used port and address used by the integration to receive events from the receivers using the yaml config. In most cases these are not required.

magentatv:
  ## Telekom user id used as default for configuration flows. Optional.
  ## Default: None
  # user_id: 120049010000000017944901

  ## Address to listen for UPNP subscription callbacks, must be reachable from the media receivers.
  ## Default: 0.0.0.0
  # listen_address: "0.0.0.0"

  ## Port for UPNP subscription callbacks, must be reachable from the media receivers.
  ## For Homeassistant running in docker, this needs to be mapped.
  ## Default: 11223
  # listen_port: 11223

  ## Address to advertise to receiver for callback. This is auto detected by default and only needs to be overwritten in case of nat/docker setups.
  ## This can NOT be a dns name
  ## Default: None
  # advertise_address: "10.1.2.3"

  ## Port to advertise to receiver for callback.
  ## By default the listen_port is used. This only needs to be overwritten in a port-forwarding/docker situation
  ## Default: None
  # advertise_port: 32211

Special Thanks

Thanks for @humbertogontijo from homeassistant-roborock for providing the inspiration to create an integration on my own. Also serving as a reference repository on how to do things.

Also many thanks to @ludeeus for integration_blueprint

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines