- Posts: 248
- Thank you received: 33
how does this work?
- bowlingbeeg
- Offline
- User
-
Less
More
2 years 4 months ago #1879
by bowlingbeeg
Replied by bowlingbeeg on topic how does this work?
Yes, you can pass parameters to macros and as far as I know it can be as many as you want. Here is an example of a macro that I was using before the JVC driver was working correctly I had a jvc.cmd.theater macro defined like this:
Macro|
GetURL|http://localhost:5000?devname=JVC%20RS2100&cmd=¶m=!
I would call it with jvc.cmd.theater|PW~1 and it would run the following command
GetURL|http://localhost:5000?devname=JVC%20RS2100&cmd=PW¶m=1!
Macro|
GetURL|http://localhost:5000?devname=JVC%20RS2100&cmd=
I would call it with jvc.cmd.theater|PW~1 and it would run the following command
GetURL|http://localhost:5000?devname=JVC%20RS2100&cmd=PW¶m=1!
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 4 months ago #1881
by davep
Replied by davep on topic how does this work?
yes exactly! The server will parse the command and then make the <p1>... <pn> substitutions.
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 4 months ago #1882
by davep
Replied by davep on topic how does this work?
so if I mapped this command to a button on remote
LaunchApp.{{activeroom_{{clientname}}}}|Netflix
and created a macro named livingroom.LaunchApp
with this code
AV|{{livingroom_shieldtv_id}}~Launch~<p1>!
in it
Would it Work?
YES!
Please Log in to join the conversation.
- cjisble
- Offline
- User
-
Less
More
- Posts: 189
- Thank you received: 12
2 years 4 months ago #1883
by cjisble
What is the best way to get back in sync? Should I create the new macros manually, using the instructions in this thread to pass in the variables?
Replied by cjisble on topic how does this work?
I've got the reverse problem. My smart remote template has the hard button calling power.familyroom | on, but my macros are still the old ones: poweron.familyroom.We want to try to reduce the number of macros being created but wasn't expecting someone to reflash a new server so soon. Instead of VolumeUp, VolumeDown, PowerOn, PowerOff it's better to have just one Volume and Power macro and pass in the options as needed.
Volume.room|up or Volume.room|up~3 (up 3 steps) Volume.room|down or Volume.room|down~3 (down 3 steps)
VolumeMute.room|on or VolumeMute.room|off or VolumeMute.room|toggle
Power.room|on or Power.room|off or Power.room|toggle
The updated smartremote, moonlight tablet and phone templates will be calling these macros.
This should not break anything for existing installs using the old macro naming conventions as the server will compensate. Since you are a little ahead of the curve modify your project hard button commands to use the new macro naming conventions.
What is the best way to get back in sync? Should I create the new macros manually, using the instructions in this thread to pass in the variables?
Please Log in to join the conversation.
- Sat32
- Topic Author
- Offline
- User
-
Less
More
- Posts: 133
- Thank you received: 5
2 years 4 months ago #1888
by Sat32
Replied by Sat32 on topic how does this work?
Did some testing
Works!!
But ran into different issue can't edit or save changes to hard buttons on smartremote.
I have read/write access to the myserver folder from my desktop and I can edit gui aspects with mydesigner
so not sure whats going on. Could be a server bug?
Code:
Macro|
// The macro is responsible for controlling volume in a room!
AV|{{livingroom_avamp_id}}~Volume~<p1>~3!
if|IsEQ##<p1>##up##Lighting|8~On!
if|IsEQ##<p1>##down##Lighting|8~Off!
But ran into different issue can't edit or save changes to hard buttons on smartremote.
I have read/write access to the myserver folder from my desktop and I can edit gui aspects with mydesigner
so not sure whats going on. Could be a server bug?
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 4 months ago #1889
by davep
Replied by davep on topic how does this work?
The server update I will release today will get you back in sync automatically. You won't have to do anything. It will automatically call the old macro if the new one does not exist.
The server update is delayed because I'm fixing a MQTT subscribe issue.
The server update is delayed because I'm fixing a MQTT subscribe issue.
Please Log in to join the conversation.
Time to create page: 0.185 seconds