Please help me set this up...

Tips and Techniques for using MLServer's Automation Rules
TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Postby TheCodeMan » Fri Jun 13, 2008 11:16 pm

It looks like it has updated correctly now. I will do some more testing and update with the results.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Fri Jun 13, 2008 11:17 pm

Are you getting Weather data and Horoscope data being returned to MLServer from MLWorker?

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Postby TheCodeMan » Fri Jun 13, 2008 11:43 pm

Ok, I'm getting close. MLTimer is working correctly. MLPing is working correctly. The automation rule is now my issue. I currently have the rule set to:

Whenever server_209.85.173.103_internetstate equals 0
Then MLServeCmd.Macro|Lighting.0002|SwitchPower_Off!MLPause|5!MLighting.0002|SwitchPower_On

I suspect the syntax is incorrect on this. The Power Off command is working correctly. After 5-10 seconds, there is no power on, however. Any ideas?

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Fri Jun 13, 2008 11:56 pm

do you see the three commands in the Macro being executed in MLServer's event log? Can you run this macro by hand? Does it work?

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Postby TheCodeMan » Sat Jun 14, 2008 12:12 am

Here is what I am seeing.
You do not have the required permissions to view the files attached to this post.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Sat Jun 14, 2008 12:35 am

The MLInsteonPLM plugin is throwing errors. It does not like the Power commands your are issuing. If you just issue the power off and power on commands by hand do they work?

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Postby TheCodeMan » Sat Jun 14, 2008 12:43 am

They seem to work fine by using the InsteonPLM GUI. I can turn off 0002 and turn it back on (my broadband router) and it works every time manually.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Sat Jun 14, 2008 12:54 am

The problem is in the MLInsteonPLM plugin or the commands you are using. Do those commands work when you issue them to MLServer?

Lighting.0002|SwitchPower_Off

and

MLighting.0002|SwitchPower_On

User avatar
DavidL
Simply Incredible
Simply Incredible
Posts: 11071
Joined: Sat Feb 08, 2003 9:39 am
Location: Metamora, Michigan
Contact:

Postby DavidL » Sat Jun 14, 2008 8:21 am

There is a typo. It's not MLighting. it's Lighting.

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Postby TheCodeMan » Sun Jun 15, 2008 10:24 pm

A simple typo, I overlooked it. That fixed the problem and it works perfectly now. Thanks for all the quick responses.

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Postby TheCodeMan » Tue Sep 02, 2008 8:46 pm

The end result for anyone interested in this thread. Below is a brief description of the plugins used to accomplish this task along with the respective commands.

Internet
This process pings the Internet every two minutes for a response. If no response is received, a command is issued to power the Internet router off and back on after a brief pause.

MLStartup Plugin – MLTimer|Enable~Internet is executed in the System.Startup script.
MLTimer Plugin – Timer 1 – Internet is set to run at an interval of 120 seconds. The Alias is Internet, and the MLServeCmd is MLPing|209.85.173.103. This is a repeating task. The results of this ping test update the Server Variable server_209.85.173.103_internetstate to 1 (pingable) or 0 (not pingable)
MLInsteonPLM Plugin - ID 0002 – Alias Internet Router is controlled via…
Automation Rule (1)
Whenever server_209.85.173.103_internetstate equals 0
Then MLServeCmd.Macro|Lighting.0002|SwitchPower_Off!MLPause|5!Lighting.0002|SwitchPower_On

Let me know if you need any further explanation.

User avatar
DavidL
Simply Incredible
Simply Incredible
Posts: 11071
Joined: Sat Feb 08, 2003 9:39 am
Location: Metamora, Michigan
Contact:

Postby DavidL » Tue Sep 02, 2008 9:10 pm

Nice.. thanx for sharing.

Not sure what the CQC fan boys are saying that MainLobby user's aren't into Home Automation ;)


Return to “Automation Rules”

Who is online

Users browsing this forum: No registered users and 1 guest