How to use the trigger options in the Portal

Related to the Portal
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: How to use the trigger options in the Portal

Post by alexwbush »

you're the man!
wtitb
Posts: 32
Joined: Sun Nov 17, 2013 3:32 pm

Re: How to use the trigger options in the Portal

Post by wtitb »

Hi,

there is also a trigger simply called "Alarm". Can this be used to get notified whenever any alarm occures? If so, what are its values?

cheers,
Christian
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

No, that tag is for a new input port that is reserved for a future product.
Roberto.
Ferdi
Posts: 31
Joined: Thu Jan 02, 2014 1:02 pm

Re: How to use the trigger options in the Portal

Post by Ferdi »

Hi Guys,

Read the hole thread and uhm ya, i have no knowledge of programing or coding.

Played around with the portal settings and can't seem to get my trigger saved. What i want to do is for RA to inform me when my pump stops working. Port 8 = return pump. ROFF8 <= "what needs to be put in here"

Hope you understand whatim trying to explaine.

Thanks in advance
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to use the trigger options in the Portal

Post by lnevo »

You can't do that unfortunately. What we need is bitwise operators in the portal settings. Maybe their there I haven't looked in a bit.

ROFF8 represents an 8 bit byte that represents the OFF overrides on the 8th Relay expansion.

The easier way to do what you want is add code like this into your custom section in the loop() function

ReefAngel.CustomVar[0]=ReefAngel.Relay.Status(Port8);
ReefAngel.CustomVar[7]=255;

What this will do is the following C0 in the portal will then match the status of the port. I believe 0 is off and 1 is on, but it could be reversed, I forget. C7 being 255 will make sure you always have the Custom Variables activated. It's really just a dummy variable to make sure the portal has this feature turned on.

Now that you have the status of your pump in one of the CustomVariables, you can set your trigger for C0 and you can alarm if it's 0 or 1 or whatever it is when it's not on :)

I know this sounds confusing and I'm not sure why the relay status variables are even in the portal alert options without having bitwise operators to act on them, they are kind of pointless. Even more so, sometimes to find the true status you need to combine them with each other. It would be great to have that functionality... but it would also be very confusing because now people will need to learn how to do bitwise operations. Obviously this piece of the alerting needs some help .. *cough* *cough* :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

I have changed the Portal today to allow for individual ports to be used.
Let me know how it works out for you.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to use the trigger options in the Portal

Post by lnevo »

Awesome!!!! Will def try that out!!
Post Reply