User avatar
WadeL
New Member
New Member
Posts: 45
Joined: Mon Nov 05, 2007 3:15 pm
Location: Las Vegas, NV
Contact: Send private message

MLMath with MLHAI

Sat Nov 24, 2007 5:48 pm

MLServeCmd.Macro|MLMath|Add~NewFamCoolSetPoint~1~{{mlhai_tstat_001_family therm_coolsetpoint}}!MLHAI|CTSP~1~NewFamCoolSetPoint~001




Can someone please tell me what's wrong with this. My goal is to increment the value of the coolsetpoint for my HAI system. It would really be nice if this was build into the plugin. ;) I'm not really sure is the syntax is correct. First half seems to work fine. I am able to see the current setpoint + 1 assigned to NewFamCoolSetPoint in the MLS variable listing. The second half is the part that is giving me a headache. I have tried it with {{}} and without as shown for NewFamCoolSetPoint variable.

Also, is there a "real" set of documentation, that's readable, for MLMath?


thanks for all the help!

Wade

ricks
Is there life beyond myServer?
Is there life beyond myServer?
Posts: 1133
Joined: Wed Oct 27, 2004 8:01 pm
Location: Latham, Massachusetts
Contact: Send private message

Sat Nov 24, 2007 7:59 pm

Hi Wade,

Try:

MLServeCmd.Macro|MLMath|Add~FamCoolSetPointUp~{{mlhai__001_family therm_coolsetpoint}}~1!MLHAI|CTSP~0~{{FamCoolSetPointUp}}~1

Then you will need one for CSP down as well:

MLServeCmd.Macro|MLMath|Subtract~FamCoolSetPointDown~{{mlhai__001_family therm_coolsetpoint}}~1!MLHAI|CTSP~0~{{FamCoolSetPointDown}}~1

Haven't looked at the docs for MLMath in years but if I remember correctly its goes as follows:

MLMath|function~resulting_variable~present_variable~value so
MLMath|counter~{{counter}}~1 will increment a counter by 1 whenever its run.

Yes, I agree that the functionality to increment/decrement HSP and CSP should be a function of the plugin. I believe they are including this in the plugin's rewrite.

Hope this helps.
Rick

User avatar
WadeL
New Member
New Member
Posts: 45
Joined: Mon Nov 05, 2007 3:15 pm
Location: Las Vegas, NV
Contact: Send private message

Sun Nov 25, 2007 6:44 pm

Rick,
I got this to work.
MLServeCmd.Macro|MLMath|Add~NewFamCoolSetPoint~{{mlhai_tstat_001_family therm_coolsetpoint}~1}!MLHAI|CTSP~1~{{NewFamCoolSetPoint}}~001

HOWEVER, It only worked for a day. I am really beginning to regret the money spent on this "product", my only use for it is to control my HAI in a RELIABLE manner. It is very erratic in it's behavior. Something that worked yesterday won't work
today. :(

Sorry for the venting.


I presume your correction of my variable name was purely one of convention. I use the same variable name and increment or decrement as needed. Is this an issue?

mcascio

Sun Nov 25, 2007 6:50 pm

Wade,

It looks like you have a misplaced curly bracket in your command above:
MLServeCmd.Macro|MLMath|Add~NewFamCoolSetPoint~{{mlhai_tstat_001_family therm_coolsetpoint}}~1!MLHAI|CTSP~1~{{NewFamCoolSetPoint}}~001

I'm pretty certain that this functionality will all be part of the rewrite that is going on now. Please be patient while the rewrite continues.

ricks
Is there life beyond myServer?
Is there life beyond myServer?
Posts: 1133
Joined: Wed Oct 27, 2004 8:01 pm
Location: Latham, Massachusetts
Contact: Send private message

Sun Nov 25, 2007 7:28 pm

Hi Wade,

Sorry, you are correct. Same variable. I put these in command maps and was looking at that. So much for my memory. :(

Fixing that }, if its not a typo, should fix the problem you're having. There are some problems with how the plugin logs into the panel as well so if you re-boot overnight the plugin may not gain access to the panel.

And yes, MLHAI is not yet ready for prime-time. The issues have been documented pretty well in the forum. Dave is spending every free minute polishing the new and improved MLHAI. For all of us HAI users/installers it will hopefully be wrapped in a bow by the holidays. :D

Rick

User avatar
WadeL
New Member
New Member
Posts: 45
Joined: Mon Nov 05, 2007 3:15 pm
Location: Las Vegas, NV
Contact: Send private message

Sun Nov 25, 2007 7:53 pm

Thanks guys,

The '}' was a posting typo not a coding typo. I stopped and restarted my computer and now it is working again. :? I really hate random behavior. I'll stick it out. I really do find this an enjoyable interface, just frustrated with the stability. As another example, I'm trying to toggle colors on a button. I set the label to {{mlhai_zone_001_smoke detectors_currentstatusval}}, as copied from MLS server variables page. I then set the OFF state value to 0, which is the secured value, set the OFF color to GREEN and the ON COLOR to RED. ( got to love RPN ;) ) But the button never changes color.


However, if I copy the button from another page that is working and replace the variable. it almost works. I can get it to set its OFF color but not its ON color. Weird, right???


Wade

mcascio

Sun Nov 25, 2007 8:36 pm

WadeL wrote:Thanks guys,

The '}' was a posting typo not a coding typo. I stopped and restarted my computer and now it is working again. :? I really hate random behavior. I'll stick it out. I really do find this an enjoyable interface, just frustrated with the stability. As another example, I'm trying to toggle colors on a button. I set the label to {{mlhai_zone_001_smoke detectors_currentstatusval}}, as copied from MLS server variables page. I then set the OFF state value to 0, which is the secured value, set the OFF color to GREEN and the ON COLOR to RED. ( got to love RPN ;) ) But the button never changes color.


However, if I copy the button from another page that is working and replace the variable. it almost works. I can get it to set its OFF color but not its ON color. Weird, right???


Wade
Hi Wade,

You'll notice on the Button States screen that by default, "Off, 0 or False" are already givens as an OFF state. So no need to put that as a local Off state.

Now once you set the Color tint, you need to slide the horizontal slider to the right to set the level of tinting. Just picking a color by itself does nothing since the default tint level is 0.

Give it a shot and let us know how it goes.

You'll definitely want to ride the wave out. As you can see from our forum, we have an active community that is willing to help out all hours and even late on Sunday nights. :) Hope you had a great weekend!

User avatar
WadeL
New Member
New Member
Posts: 45
Joined: Mon Nov 05, 2007 3:15 pm
Location: Las Vegas, NV
Contact: Send private message

Mon Nov 26, 2007 12:56 pm

Thanks Mario,
I will give that a try tonight. I have an OT question. I noticed from your website that the ability to write your own plugins exists. Where do I get the documentation to do this? I presume there is a standard API?


Thanks again!!!!!



Wade

Return to “MLHAI”

Who is online

Users browsing this forum: No registered users and 3 guests