Broadlink IR Media Player (For old, dump TVs)

Hi, you are using the latest code which is compatible only with the upcoming version 0.84.X. Please use this code instead, but remember to update again when you install 0.84

I bet that’s it! I have the latest code from Github

hello I cloned your git in home / homeassistant / .homeassistant

media_player:

  • platform: broadlink
    name: Sony
    host: 192.160.1.7
    mac: '78: 0F: 77: 32: 12: A6 ’
    ircodes_ini: ‘broadlink_media_codes / sony.ini’
    ping_host: 192.168.1.4

but the error configuration:
Component not found: broadlink
Platform not found: media_player.broadlink

why?
what should I do?

SO, by going back to the previous version of broadlink.py solved the original problem but now I get an error that the hassio: component failed to load. Also, the media player now shows up in the UI but nothing works.

The file should be in
.homeassistant/custom_components/media_player/broadlink.py

Hi!
Since you’ve been able to fix this, maybe you could hint as to how you did it? We also experience this same issue in the custom component variable, see: Custom component to declare/set variables,

which has been working flawlessly over the last 13 months, and hasn’t changed…

1 Like

Now it tells me only Platform media player not found…
I have done the same with Climate and it’s all right
With media player not found instead

Hi, it seems to be fixed 12 hours ago.

replying to my self, for reference:

this is solved: Custom component to declare/set variables

yes thanks, installed and running in .84.1

up?

Anyone use power_consumption_threshold?

Yes, it’s not workin in 0.84.1

hi

upgraded to 86.1 now this custom component doesnt work, anybody have any ideas? worked ok in previous version.

thanks

Reboot whole hardware

done that, couple of times.

i get this error in log file if that helps?

 File "/config/custom_components/media_player/broadlink.py", line 20, in <module> from homeassistant.helpers.restore_state import async_get_last_state 
ImportError: cannot import name 'async_get_last_state' 2019-01-24 20:55:31 ERROR (MainThread) 

[homeassistant.loader] Unable to find platform broadlink 2019-01-24 20:55:31 ERROR (MainThread) 

[homeassistant.loader] Error loading custom_components.media_player.broadlink. Make sure all dependencies are installed Traceback (most recent call last):

cheers

You need to update the broadlink.py

Stopped working in 0.88.0b0

2019-02-14 09:29:57 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.media_player.broadlink. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/srv/ha/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/homeassi/.homeassistant/custom_components/media_player/broadlink.py", line 13, in <module>
    from homeassistant.components.media_player import (
ImportError: cannot import name 'SUPPORT_TURN_ON'
2019-02-14 09:29:57 ERROR (MainThread) [homeassistant.loader] Unable to find platform broadlink

Trial and error fix :slightly_smiling_face:

from homeassistant.components.media_player import (
    MediaPlayerDevice, PLATFORM_SCHEMA)
from homeassistant.components.media_player.const import (
    SUPPORT_TURN_ON, SUPPORT_TURN_OFF, SUPPORT_VOLUME_MUTE, 
    SUPPORT_VOLUME_STEP, SUPPORT_SELECT_SOURCE, SUPPORT_PREVIOUS_TRACK,
    SUPPORT_NEXT_TRACK)
from homeassistant.const import (
    CONF_HOST, CONF_MAC, CONF_TIMEOUT, STATE_OFF, STATE_ON,
    STATE_PLAYING, STATE_PAUSED, STATE_UNKNOWN, CONF_NAME, CONF_FILENAME)

Hello,
Thanks for the hint. The component updated on GitHub.

There is a problem with the new version:
15 2019 10:55:55 GMT+0100 (CET)

Error loading custom_components.media_player.broadlink. Make sure all dependencies are installed

Traceback (most recent call last): File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/loader.py”, line 117, in _load_file module = importlib.import_module(path) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/init.py”, line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 978, in _gcd_import File “<frozen importlib._bootstrap>”, line 961, in _find_and_load File “<frozen importlib._bootstrap>”, line 950, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 655, in _load_unlocked File “<frozen importlib._bootstrap_external>”, line 678, in exec_module File “<frozen importlib._bootstrap>”, line 205, in _call_with_frames_removed File “…custom_components/media_player/broadlink.py”, line 15, in <module> from homeassistant.components.media_player.const import ( ModuleNotFoundError: No module named ‘homeassistant.components.media_player.const’