Harmony Hub and long press button

Hello,

I have harmony hub and tv panasonic this tv requires long press power button to power on there is way to make to this in script?

Thank you.

If you look in the available commands you should find there is one for discreet power on and power off, use the power on rather than just power toggle and it’ll take care of the ‘long press’ for you.

Yes I know I about this but for me power on button sometimes work and sometimes don’t work :confused:
This is why I try find better solution.

Do you have the same issue when just using the harmony remote or just with HA via Harmony?

Yes with harmony hub, power on button sometimes work and sometimes don’t work BUT problem is only if I press manual.
“Activities” working without any problems.

Interesting, so it actually sounds like your physical power button on your remote is “bad” Requring you to hold it down longer or give it a hard push? If it always works with the activity, then I think you have nothing to worry about with HA. It will send the required IR signal for power on/off. Have to already tired and it has issues? Or were you just checking before starting?

No no I dont have harmony remote I have harmony hub and android app :slight_smile:

Ahh got it. Still does not make much sense to me, but I’d try this.
I assume you probably have power off, power on, and power toggle “buttons” in your app. Those will have codes in the harmony config file

For example here is my power off for a sony tv. I use this in one of my automations

  - service: remote.send_command
    data:
      entity_id: remote.living_room_harmony_hub
      command:
         - PowerOff
# sony TV
      device: 48350995
      delay_secs: 0.6

I recommend you create three simple automations or scripts and use the various power on/off commands and find out which one works most consistently.

Since you said the activity always works, then it has to be using one of those power commands to turn on/off the tv. This would help you know for sure which one was working, then use that in any script or automation you need

ok again

activity working always
manual pressing power on in app sometimes working sometimes not
manula pressing power toggle in app working always

Tested again power on working always if I press long in app same as power toggle but little faster :slight_smile:

But I dont want use TV activity in HA you know why? because I do not always use HA to turn on the tv.

This I why I asking about long pressing button in HA :slight_smile:

Just to be clear “long pressing” is nothing more than another button option. You can assign different actions to a normal and a long press. Long pressing “power on” is nothing more than doing whatever you’ve assigned to a long press of that button. By default, I’d guess that the long and short press for power on/off are assigned to the same IR command. If a long press always works, then maybe your “tap/short press” is just not being registered by your android app.

My code above is not using an activity. its sending the power off command using the device code for my TV.

i have similar

      #panasonic_on
      - service: remote.send_command
        data:
          device: 55407043
          command: PowerOn
      - delay: '00:00:05'

This sometimes working but very rare

      #panasonic_on
      - service: remote.send_command
        data:
          device: 55407043
          command: PowerToggle
      - delay: '00:00:05'

this never working I found only repeat function in HA but i need long press :slight_smile:

Ok, well sorry there is not and trick for this. You need to figure out what IR is being sent when you “long press” the button on your app. Then have HA send that IR command. Again, “long press” does not send the command any differently than a short press. It’s just a way to map more controls to less buttons. I’ve never looked into how to see what the App buttons are mapped to so, I dont know how to see what commands are sent with the app via short and long press, but I’m sure its not hard to figure out.

I guess you could send two of the same command with a short delay if you were having intermittent issues.

Like power on, delay 2 seconds, power on. Cannot hurt anything sending the power on command twice in a row. Power toggle, of course would not be good to send twice in a row.

Edit: bottom line, it sounds like you have issues with your harmony much more than HA. Get that working right, and the HA stuff will work just fine

Ok I will try ask logitech about fix PowerOn button. Thx