Automation Rules Type Mismatch

Tips and Techniques for using MLServer's Automation Rules
skisteep
Senior Member
Senior Member
Posts: 192
Joined: Wed Aug 30, 2006 11:11 pm
Contact:

Automation Rules Type Mismatch

Postby skisteep » Thu Sep 07, 2006 7:38 pm

Not sure why this doesn't work,

If I use
Whenever currentdaysecs equals {{adjusted_sunrise}}, it works

If I use
Whenever currentdaysecs is greater than {{adjusted_sunrise}}, then I get Error #13, Type mismatch raised by RunRule

same if I use 'is greater than or equal'

Note: both currentdaysecs ( in new MLDateTime) and adjusted_sunrise (calculated) are in seconds

Any ideas or workarounds would be appreciated

Wayne

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

Postby CinemarDave » Sat Sep 09, 2006 12:01 pm

No workaround. This must be a bug. Can you post the snippet on the MLServer event log around this error?

skisteep
Senior Member
Senior Member
Posts: 192
Joined: Wed Aug 30, 2006 11:11 pm
Contact:

Postby skisteep » Sat Sep 09, 2006 3:35 pm

Thanks for the response, the only log entry I get is:

9/9/2006 2:22:27 PM Error RunRule Error# 13 - Type mismatch raised by RunRule

Rule that errors is:

Whenever currentdaysecs is greater that or equal {{adjusted_sunrise}}
And mllighhting_001_status is not equal OFF
Then Insteon.LivingRoomSouth.OFF


9/9/2006 2:22:42 PM Error RunRule Error# 13 - Type mismatch raised by RunRule

here is the code that creates adjusted_sunrise:

Whenever currenthmmil equals sunrise
then DateTime.Daytime.Adjusted

Macro DateTime.Daytime.Adjsuted is:

MLServeCmd.Macro|MLMath|Add~adjusted_sunrise~{{local_sunrise_seconds}}~1800!MLMath|Subtract~adjusted_sunset~{{local_sunset_seconds}}~3600

Hope this helps, I think I copied everything correctly, you should be able to reproduce this on any MainLobby Server, nothing special on mine.

Wayne

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

Postby CinemarDave » Sat Sep 09, 2006 3:39 pm

Thanks, found the problem and it has been fixed. It will be in the next release of the server.

skisteep
Senior Member
Senior Member
Posts: 192
Joined: Wed Aug 30, 2006 11:11 pm
Contact:

Postby skisteep » Sat Sep 09, 2006 4:31 pm

Glad it worked out, when do you expect the next release?????

Wayne

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

Postby CinemarDave » Sat Sep 09, 2006 6:12 pm

I'll release a new version this weekend. The next release has several bug fixes an several new features. I'm testing them all now.

skisteep
Senior Member
Senior Member
Posts: 192
Joined: Wed Aug 30, 2006 11:11 pm
Contact:

Postby skisteep » Sat Sep 09, 2006 6:25 pm

Thanks, looking forward to it.

Wayne


Return to “Automation Rules”

Who is online

Users browsing this forum: No registered users and 1 guest