- Posts: 13
- Thank you received: 0
Welcome to the Allonis forum! Tell us and our members who you are, what you like and why you became a member of this site. We welcome all new members and hope to see you around a lot!
myServer6 Macro Programming
- mshumanmd@gmail.com
- Topic Author
- Offline
- User
-
Less
More
3 months 3 hours ago - 3 months 55 minutes ago #4920
by mshumanmd@gmail.com
myServer6 Macro Programming was created by mshumanmd@gmail.com
I am very new to this system. I eventually want this system to control all of the smart devices in my house. I am currently running Homeseer for just about everything other than my AV equipment. My first task for the Smartremote is to get it to run my AV system. I have a Samsung TV, Denon AVR, DirecTV receiver, Roku, and Panasonic BluRay player. All are controlled via IP, except the Panasonic BluRay player, which is IR. All of the drivers and all of them work - I can control everything through myServer6 Driver Command testing. My first project is to get the Smartremote working DirecTV, Roku, and Panasonic BluRay player through the Samsung TV. I have configured 2 rooms with these devices, Living Room and Home Theater. They are exactly the same, except in the Living Room, the volume and mute will be through the TV and in the Home Theater, the volume and mute will be through the AVR. DirecTV and Roku are routed through the AVR, the Panasonic BluRay has a direct connection to the TV and AVR. The remote was not turning anything on when a device was selected. I am currently working on DirecTV. I've added the following commands to the activate-source.directv-dtv1 macro (delaytime~0.5 is set earlier in the macro):
// Turn On DirecTV!
AV|1~Power~On!
Pause|{{delay_time}}!
// Turn On AVR!
AV|5~Power~On!
Pause|{{delay_time}}!
//Turn On TV!
AV|15~Power~On!
Pause|{{delay_time}}!
AV|5~Source~SAT/CBL!
AV|15~Source~HDMI3!
This turns on everything and the remote is working correctly in Home Theater. In order to use this in the "Living Room," I need to turn off the AVR. In order to do so, I've added the line:
if|isEQ##{{activeroom_name_{clientname}}}##Living Room##AV|5~Power~Off!
It does not work. Please help with this code.
Thank you,
Mark
// Turn On DirecTV!
AV|1~Power~On!
Pause|{{delay_time}}!
// Turn On AVR!
AV|5~Power~On!
Pause|{{delay_time}}!
//Turn On TV!
AV|15~Power~On!
Pause|{{delay_time}}!
AV|5~Source~SAT/CBL!
AV|15~Source~HDMI3!
This turns on everything and the remote is working correctly in Home Theater. In order to use this in the "Living Room," I need to turn off the AVR. In order to do so, I've added the line:
if|isEQ##{{activeroom_name_{clientname}}}##Living Room##AV|5~Power~Off!
It does not work. Please help with this code.
Thank you,
Mark
Last edit: 3 months 55 minutes ago by mshumanmd@gmail.com.
Please Log in to join the conversation.
- aa6vh
- Offline
- User
-
Less
More
- Posts: 108
- Thank you received: 7
2 months 4 weeks ago - 2 months 4 weeks ago #4922
by aa6vh
Replied by aa6vh on topic myServer6 Macro Programming
I personally find that Homeseer is better suited for home automation, and that Allonis is far superior for handling A/V devices.
Are you aware there are very simple ways to send commands between Homeseer and Allonis?.
We are going to want to see your entire macro (or macros) though if you want someone to debug it. For example, where are you setting the active room and client name?
Are you aware there are very simple ways to send commands between Homeseer and Allonis?.
We are going to want to see your entire macro (or macros) though if you want someone to debug it. For example, where are you setting the active room and client name?
Last edit: 2 months 4 weeks ago by aa6vh.
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 months 4 weeks ago #4923
by davep
Replied by davep on topic myServer6 Macro Programming
You are missing some {{ }} in the command.
if|isEQ##{{activeroom_name_{clientname}}}##Living Room##AV|5~Power~Off!
should be
if|isEQ##{{activeroom_name_{{clientname}}}}##Living Room##AV|5~Power~Off!
Every reference to a server variable must be enclosed in a {{ }} pair.
if|isEQ##{{activeroom_name_{clientname}}}##Living Room##AV|5~Power~Off!
should be
if|isEQ##{{activeroom_name_{{clientname}}}}##Living Room##AV|5~Power~Off!
Every reference to a server variable must be enclosed in a {{ }} pair.
Please Log in to join the conversation.
- mshumanmd@gmail.com
- Topic Author
- Offline
- User
-
Less
More
- Posts: 13
- Thank you received: 0
2 months 4 weeks ago #4924
by mshumanmd@gmail.com
Replied by mshumanmd@gmail.com on topic myServer6 Macro Programming
I am not aware that there are any ways for Allonis and Homeseer to communicate. If you can send me some links to that information, I would greatly appreciate it.
Thank you!
Mark
Thank you!
Mark
Please Log in to join the conversation.
- mshumanmd@gmail.com
- Topic Author
- Offline
- User
-
Less
More
- Posts: 13
- Thank you received: 0
2 months 4 weeks ago - 2 months 4 weeks ago #4925
by mshumanmd@gmail.com
Replied by mshumanmd@gmail.com on topic myServer6 Macro Programming
Adding the additional {{}} to the command:
if|isEQ##{{activeroom_name_{{clientname}}}}##Living Room##AV|5~Power~Off!
Does not work. For testing purposes, I tried to use the actual variable name in the statement:
if|isEQ##{{activeroom_name_smartremote1}}##Living Room##AV|5~Power~Off!
It does not work either. I can see that the server variable activeroom_name_smartremote1 in myServer6 is "Living Room"
In order to troubleshoot, I added this code:
SetVariable|TestClient~{clientname}!
The result was TestClient = {clientname}
Then I changed it to:
SetVariable|TestClient~{{clientname}}!
The result is TestClient = dashboard-fx-iv6z
There is a lot of code that I did not create using variables with {clientname} and they don't work either and I suspect it's because the wrong data is passed to clientname. Where is clientname defined? When I look at the server variables and change the room, the variable activeroom_name_smartremote1 changes appropriately.
Any suggestions?
Thank you,
Mark
if|isEQ##{{activeroom_name_{{clientname}}}}##Living Room##AV|5~Power~Off!
Does not work. For testing purposes, I tried to use the actual variable name in the statement:
if|isEQ##{{activeroom_name_smartremote1}}##Living Room##AV|5~Power~Off!
It does not work either. I can see that the server variable activeroom_name_smartremote1 in myServer6 is "Living Room"
In order to troubleshoot, I added this code:
SetVariable|TestClient~{clientname}!
The result was TestClient = {clientname}
Then I changed it to:
SetVariable|TestClient~{{clientname}}!
The result is TestClient = dashboard-fx-iv6z
There is a lot of code that I did not create using variables with {clientname} and they don't work either and I suspect it's because the wrong data is passed to clientname. Where is clientname defined? When I look at the server variables and change the room, the variable activeroom_name_smartremote1 changes appropriately.
Any suggestions?
Thank you,
Mark
Last edit: 2 months 4 weeks ago by mshumanmd@gmail.com. Reason: Additional testing
Please Log in to join the conversation.
- aa6vh
- Offline
- User
-
Less
More
- Posts: 108
- Thank you received: 7
2 months 4 weeks ago #4926
by aa6vh
Replied by aa6vh on topic myServer6 Macro Programming
There is a lot to unpack when using Allonis Nested replacement server variables. There is a double substitution going on here. You can learn alot by going to the Allonis Dashboard, selecting "Management", then "Server Variables". The server variable names that actually exist will be listed, along with their values.
For the beginner, I would recommend substituting the actual and complete variable name, without using any Allonis nested "replacement" variables. After you get the hang of it, you can go back and put back in the "replacement" variables (I have chosen not to, because I do not need the complexity. Allonis uses those variables for larger environments that have multiple remote controls, and mutiple rooms with equipment.
This is the macro (I call "hs_run_event") I use to run a Homeseer event:
GetUrl|http://192.168.0.80/JSON?request=runevent&groupname=&name=
<p1> and <p2> are macro parameters. I then run this statement, in a button for example, to invoke the FamilyRoomLeft event in group Lights:
Macro|hs-run-event|Lights~FamilyRoomLeft!
Homeseer has a lot more JSON input command options you can also use.
To send a command to Allonis, the URL you would use would be
http://192.168.0.65/api/docommand?command=
This assumes of course that both Homeseer and Allonis are on the same LAN.
For the beginner, I would recommend substituting the actual and complete variable name, without using any Allonis nested "replacement" variables. After you get the hang of it, you can go back and put back in the "replacement" variables (I have chosen not to, because I do not need the complexity. Allonis uses those variables for larger environments that have multiple remote controls, and mutiple rooms with equipment.
This is the macro (I call "hs_run_event") I use to run a Homeseer event:
GetUrl|http://192.168.0.80/JSON?request=runevent&groupname=
<p1> and <p2> are macro parameters. I then run this statement, in a button for example, to invoke the FamilyRoomLeft event in group Lights:
Macro|hs-run-event|Lights~FamilyRoomLeft!
Homeseer has a lot more JSON input command options you can also use.
To send a command to Allonis, the URL you would use would be
http://192.168.0.65/api/docommand?command=
This assumes of course that both Homeseer and Allonis are on the same LAN.
Please Log in to join the conversation.
Time to create page: 0.191 seconds