Automating Commands

Hi all, can anyone point me in the right direction to enable me to produce a button to call a macro. For instance, a button to watch netflix which would switch on the TV, turn to the correct channel, switch amplifier on etc etc. I thought I saw it in one of the videos but can no longer find it.

Thank You

I believe Scenes are what you are looking for. Or you could always just create your macro in the page itself. You can assign as many Actions as you’d like to a Button Click event.

Hi Bill, I have tried to absorb this but I just don’t get it. I think I could produce a custom page and write a macro to do things using java script but how do I do it using tiles. Could you please see my .hrp file and add a a tile that would switch on the receiver and blueray player then close the curtains and lower the screen. I’m sure once I see how you do it I’ll be on my way.
Thanksscenetest1.hrp (96.7 KB)

Click the “Actions” button for the scene then add all of those as commands you’ve listed. Screenshot below shows an action that will turn on the device “VirtualSwitch”.

ill give it another try. how to I add an interval between commands ?

You use a DelayAction to add a delay between commands.

Can anyone please alter my attached hrp to just open and close my curtains on the press of the Scene1 button in the cinema group. I’ve tried every command and still cant get it to work with a real device instead of a virtual one.Action1.hrp (1.6 MB)

You can’t use the generic @Device specifier in Scene actions. It’s not like XAML templates. You have to select a specific device, which in your case is “CurtainSystem.WindowShade”. Think of it this way, how does the Scene know which device you are using?

Hi Bill I still can’t get it to work but I’ll keep trying. I really don’t want to bother you with such basic questions. Is all this explained somewhere so I can avoid posting?

Scenes are explained in this post…

But this does not describe the command syntax which I seem to be lacking and want to understand

You also need to look at what you are doing. In that example you shared, you are opening & then pretty much closing it right away. DelayActions are in milliseconds. Your delay of 400 ms is less than 1 second. Your shade probably isn’t going to move at all. While you are learning, it may be a better idea to remove that 3rd Action because it’s just going to cancel your original.

This is what your command should look like.