sermayoral / ha-samsungtv-encrypted

Samsung TV Encrypted Models (H & J Series) custom component for Home Assistant
Apache License 2.0
39 stars 24 forks source link

How to power on TV? (UE32H6400, addon ver. v3.0) #51

Closed awe007 closed 3 years ago

awe007 commented 3 years ago

Please help me, what i must write in config, for turn on my tv?

I can't find service from example: turn_on_action:

This is my config section from configuration.yaml

media_player:
  - platform: samsungtv_encrypted 
    host: 192.168.1.176
    token: 5ed890fec2c282exxxxxxxxx
    sessionid: 1
    port: 8080
    turn_on_action:
      - service: kodi.call_method
        data:
          entity_id: media_player.samsung_led32_ue32h6400
          method: Addons.ExecuteAddon
          addonid: script.json-cec
          params:
            command: turn_on 0 

Also i trying this command

     turn_on_action:
       service: wake_on_lan.send_magic_packet
       data:
         mac: "24:4B:03:43:C8:19"

And this:

    turn_on_action:
      - service: switch.turn_on
        data:
          entity_id: media_player.samsung_led32_ue32h6400
          method: Addons.ExecuteAddon
          addonid: script.json-cec
          params:
            command: turn_on 0

And all it's not working for me :(

How to write a correct config for turn on/off this TV from Home Assistant?

cjs28 commented 3 years ago

Most Samsung TVs turn off and disconnect from the WIFI when they are turned off. Due to this, you need some sort of third party that can turn on the TV.

In the example given in the read me, they using a KODI box which is plugged directly into TV and using a HDMI-CEC command to turn on the TV through KODI:

      - service: kodi.call_method
        data:
          entity_id: media_player.samsung_led32_ue32h6400
          method: Addons.ExecuteAddon
          addonid: script.json-cec
          params:
            command: turn_on 0

I was able to do something similar using a Harmony Remote:

turn_on_action:
      -  service: remote.send_command
         data:
           entity_id: remote.harmony_hub
           command:
             - PowerOn
           device: deviceID_from_Harmony_App

I hope this gives you some ideas on how to turn on the TV.