SmartIR - Control your Climate, TV and Fan devices via IR/RF controllers

I did that all instructions the climate work perfect, but when i use
media_player:

  • platform: smartir
    name: Living room TV
    device_code: 1040
    controller_send_service: switch.broadlink_send_packet_192_168_1_7

its gives me “Platform not found: media_player.smartir”

Is the media_player.py file in the smartir folder?

my directory is:
custom_components/smartir/codes+init.py+climate.py+media_player.py

inside:
codes/media_player/ .jsons

Strange. Please open an issue on GitHub

ok, i will do that now,

thanks again

About configuration of the component
on Hassio the right path for the custom_components/smartir… directory is inside the /config folder, the same folder of the configuration.yaml is this correct?

Yes, this is correct.

1 Like

Can someone please help me to convert my INI files that basically is the samsung one for media_player.
https://www.dropbox.com/s/jw7se4q0zjffwm6/samsung.ini?dl=1

Thanks

Will do it. Could you send me the model of the TV device?

Mine is samsung UE40F6500

Is it possible to add a ping host option as the old component? The old component only sent ping’s when required. So that the state updates were quite fast. Whereas the new one requires a power sensor. If I create a ping sensor to feed the power_sensor: option I need to put a small scan_interval which creates unnecessary traffic.

Please add 1060 to device_code parameter. The component will download your file.

2 Likes

This is not true.The ping command was executed every 30 seconds.

I’ve checked your code and each command has the self.schedule_update_ha_state() statement and def update(self) includes the ping command. And from that information I supposed ping was called with every command and not on a scheduled base. I supposed wrong then, opps :slight_smile:
So from another perspective, is it possible to add such functionality to the smartir code?

If should_poll is true then the component calls update on a scheduled base (according to scan_inteval). I’m not planning to add the ping function to smartir. A ping binary sensor will do the job.

Too bad to hear that. Yes I am using a ping binary_sensor, but even with a scan_interval of 30s it has worse performance than the old component. I was not using the “should_poll” with the old component.

Should_poll was true in code. It was mentioned to complete your findings.
For faster updates add scan_interval: to media_player configuration and adjust to your needs.

Actually I don’t have should_poll in code, but thank you. Will look into changing scan intervals to a lesser amount to get the desired effect. Thank you.

When I try to convert my ini files the process is always failed:

image

I use these at the old broadlink mediaplayer:
https://github.com/vpnmaster/homeassistant-custom-components/blob/master/broadlink_media_codes/samsung.ini

What is wrong whit this?

1 Like

This tool converts only climate INI files. There is already a file compatible with your tv. Please add 1060 to device_code parameter. The component will download your file.