Broadlink IR Media Player (For old, dump TVs)

what is this?

One of the code I am using is this
PRIMO = JgDwAJSUDxIQERAREBEQMRAyEBEPEg8RETEPEg8xEjEPEhARERAQlRAREw4PEg8SEDEREBQtEBIPMhAREBEQMRARETEOEw8tFRYLMRUtDxIQAAdBlpIREBARERAQERExEDEUDRAREBMOMRERDzIQMREQEBEREBCVDxIXChAREBEQMRARETEQEQ8yEBEQERQsERIPMhUMEDEQERAxETEQERAAB0GTlREQEBEQERAPEjINNBARERAQERAxEREPMhAxERAQERQOD5UUDRARDxIQERAxEBEQMhARDzIREBYLEDEQEg8yDxIPMhAREDEQMhAREAANBQAAAAAAAAAA

you shouldn’t need to use the app to get codes, unless that what you are wanting to do. I just use the dev-service in HA to learn code and then press the button I want to learn on my remote. The IR code comes up as a persistant message in the dev-state page.

Don’t forget to restart HA before learning with the Broadlink, seems to be a more reliable way to capture the codes. Also, throw a ‘==’ on the end to enforce the end of a message.

Ah yes, that too … problem is half of the time is not working

See my post above.

Strange, I have never had problems with mine not working and have never needed to reboot HA beforehand either

Hey @Vassilis, is it possible to hook up the power load sensor in the media player to the Fan component?

I’d really love to use the load detected from a Xiaomi zigbee power Plug to to override the true on state if the fan gets turned on with the remote etc

Thank you :slight_smile:

Lint

This is a very nice component for my old dump LG TV.
Thanks for this.

Maybe a bug? The service media_player.volume_mute doesn’t work.
2018-01-11 23:49:24 ERROR (MainThread) [homeassistant.core] Invalid service data for media_player.volume_mute: required key not provided @ data['is_volume_muted']. Got None

Mute works in the state card of the media player-

Also very keen for this. Would be sweet.

Also, would it be possible to have the readme updated to show an example of how the ‘power_consumption_entity’ is to be included?

would it be like this?

media_player:
  - platform: broadlink
    name: Master Bedroom TV
    host: 192.168.1.85
    mac: 'BB:BB:BB:BB:BB:BB'
    ircodes_ini: 'broadlink_media_codes/philips.ini'
    power_consumption_entity:
      entity_id: switch.some_power_outlet

or is it just:

media_player:
  - platform: broadlink
    name: Master Bedroom TV
    host: 192.168.1.85
    mac: 'BB:BB:BB:BB:BB:BB'
    ircodes_ini: 'broadlink_media_codes/philips.ini'
    power_consumption_entity: switch.some_power_outlet

cheers and thanks

Hi, I am trying to use media_player. But I am getting after configuration validation that:
Failed config media_player.broadlink:

So Hassio doesn’t know that kind of component. I added as custom component.

I tried to use climate and everything was ok.

Maybe anyone knows where could be a problem?

Please post your configuration and the error logs.

Hi Vassilis,

At this moment I was testing, so this is my configuration in configuration.yaml:

Media players

media_player:

Mopidy addon for hass.io

  • platform: mpd
    host: 192.168.0.254

Test of my samsung

  • platform: broadlink
    name: Bedroom Home Theater
    host: 192.168.0.252
    mac: ‘XX:XX:XX:XX:XX:XX’
    rcodes_ini: ‘broadlink_media_codes/samsung.ini’

And after adding broadlink media player I get in Configuration validation error:

2018-02-05 16:14:36 ERROR (MainThread) [homeassistant.config] Invalid config for [media_player.broadlink]: required key not provided @ data[‘ircodes_ini’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/media_player.broadlink/

Failed config
media_player.broadlink:
platform: broadlink
host: 192.168.0.252
mac: XXXXXXXXXXX
name: Bedroom Home Theater
rcodes_ini: broadlink_media_codes/samsung.ini

please add the missing ‘i’ in ircodes_ini: ‘broadlink_media_codes/samsung.ini’

1 Like

I’m using a Chromecast on my dumb TV. Pinging to it returns the TV state as on as Chromecast remains online all the time. Should I just stop pinging the Chromecast? What is the TV state logic like when no box is pinged?
@vassilis, thanks for your great work on this…

Does your tv have an usb port?

Unfortunately, this is the case with IR controlling. If you don’t provide a ‘hack’ for state determination then your component stays in on mode when you turn off your tv from the remote control.
If your TV is a real dump (without at least a usb port), then the only solution is a plug with power consumption meter.

Ooohhh, what a mistake. Thanks a lot :slight_smile:

Cheers for the explanation.

Is there no way to add some of the following commands:
-initial_state: off
-assumed_state: true
-optimistic: true

With this type of logic, the state would be guessed as ‘off’ when HA starts. An IF power command would turn its state to ‘on’. Another would turn it back to ‘off’.

If the Broadlink RM can detect and pass on to HA actual remote control presses, it could even post any change to HA initiated by the remote. This is what can be done with the Milight ESPMH Gateway for instance. May not be possible with non-flash, off the shelf electronics…

These are the type of commands that can be used with MQTT Lights. I use these with RF controlled lights (same principle as IR) and it works a treat.

If you were asking me, yes, the TV has a USB port! How does that help?

1 Like

I second to that question. My Sharp legacy TV has an USB port for media playing.
Also besides Sonoff Pow, @masterkenobi mentioned, does anyone recommends other alternatives (cheap/reliable)?