7/18/2023 0 Comments Logitech harmony hub amazon echoMight benefit those with a similar setup to me. So you can automatically have the TV turned off at a specific time or turned off at a specific time with an automation within HA or you can use Alexa routines to automate that.Thought I'd post this while I procrastinate from work. Some additional information - you can use scripts in Automations. If you practice changing between Edit with UI and Edit with Yaml you’ll see what goes where in each editing type. I hadn’t thought about that until now.You might also have the option to use templates within the script but I don’t know how to do that. I imagine that if you wanted you could have two service calls in the same script to turn on then change input or source or turn on then play. If your Roku is named Roku then it would be service: remote.turn_on So to change that to a power on script like you asked it would be service: remote.turn_on So for my Play script on my Roku which is a Roku Express and therefore the entity name is remote.express I have the following for the full script alias: Express Play The Roku remote will be named remote.name which is what is used in nd_command To find the Roku entity name go to Integrations under Configuration then click on the name of your Roku then 2 entities to see the name of the entities you can control with Scripts through a Call service. To turn on or off you would use remote.turn_on or remote.turn_off For changing the source you would use media_lect_source Then the rest depends on which command and which service you want to use and so forth.For nd_command you have to include entity_id and command. In sequence the Action type should be Call service. You choose whatever you want for name and entity id. There is only name, entity id, and sequence. If you use the UI to create a script there is no option or need to use trigger, switch or sensor. Do you have a full example of one, just a power on script, using something like below? Question about the scripts: do I use trigger or switch? Or sensor? I’ve seen variations of that. However, now that you mention it, I may actually add scripts to talk to the Roku directly for more control. I have separate scripts for Youtube, Netflix, Prime, and so on, so I can tell Alexa or Google to switch to what I want to watch. You can also use the media_lect_source in a script to jump to a specific app within Roku. I use the Harmony and Roku scripts as buttons for Mini Media-Player I copied the setup here and here These are the Roku commands that are available to be used in a script using nd_command back You don’t need Harmony Hub to control Roku since Roku has it’s own integration and can be controlled directly by HA. Then on your cellphone or tablet to the Amazon Alexa app then select Routines then click on the plus sign on top right then enter Routine name, when this happens, then Add Action then Smart Home then Control Scene then click on the desired script from HA that shows up in the list. If your script doesn’t show up there it won’t show up in the Amazon Alexa app. Then either Reload Scripts under Server Controls or restart HA then make sure the scripts are enabled in Alexa in Nabu Casa under Home Assistant Cloud in Configuration. If you want to test scripts before creating them you can do that in Services in Developer Tools. Once you have the scripts created you can test them by selecting Execute within the page of the specific script or going to the Script page in Configuration then clicking on the Play icon next to the Script that you want to test. In my case to change HDMI input I have the following in a script. I don’t know if that will change your HDMI input or not since I don’t have any Activities setup because my TV has to cycle through inputs inputs instead of jumping directly from one specific input to another. The Harmony page at has Service Call examples that you need to include in your scripts.There is also an automation example for activity: "Watch TV" which should be adjustable for a script as the following. Once you have identified the Activity and/or commands you want to use make a separate script for each of them. The commands are listed under each device in the conf folder. I don’t know if the Activities actually work but I do know the other commands work. It will have all of the commands that you can use for your scripts. In order to find the Harmony Hub commands you have to go to your config folder and look for the conf file that looks like harmony_nf then open it with a text editor. In order to use voice commands with Alexa to control Roku and/or Harmony Hub you have to make a separate script for each command you want and you have to have Nabu Casa or the Amazon Alexa manual setup and make your scripts visible to Amazon Alexa then you have to create a separate Routine in Alexa for each script. Which Roku do you have? If you have a Roku TV you might not need the Harmony Hub at all.
0 Comments
Leave a Reply. |