Page 1 of 1
Is there a way to get a more detailed view of relay activity
Posted: Sat Feb 09, 2013 12:49 pm
by dazza1304
Hi,
I have made some changes to my controller, and things are not behaving quite as I would expect.
I have checked the individual functions and triggers and all work as they should.
What would really help me, is to be able to drill down into the relay activity to see when relays were activated.
For example, when I look at the portal, I can see relay activity, but only if the relay has activated for a fair period of time.
If for example, my relay is only activated for a matter of seconds, is it possible to somehow view the detailed activity of when the relay was switched on and off.
Hope this makes sense!!
Re: Is there a way to get a more detailed view of relay acti
Posted: Sat Feb 09, 2013 6:26 pm
by rimai
You can use serial monitor to dump your relay activity
Re: Is there a way to get a more detailed view of relay acti
Posted: Sun Feb 10, 2013 3:06 am
by dazza1304
rimai wrote:You can use serial monitor to dump your relay activity
Thanks Roberto, so maybe a silly question, how do I do that? Lets say I want to get a "dump" of relay 1 and relay box 1- relay 1? Also is it possible to drill down to a particular period I am interested in?
Thanks
Re: Is there a way to get a more detailed view of relay acti
Posted: Sun Feb 10, 2013 12:06 pm
by rimai
Code: Select all
Serial.println(ReefAngel.Relay.Status(Box1_Port1));
[code]
You may need to want to check if the relay status has changed to print anything or it will flood the status on your serial monitor.
You will know what I mean if you use just this line.
Re: Is there a way to get a more detailed view of relay acti
Posted: Sun Feb 10, 2013 12:54 pm
by dazza1304
rimai wrote:Code: Select all
Serial.println(ReefAngel.Relay.Status(Box1_Port1));
[code]
You may need to want to check if the relay status has changed to print anything or it will flood the status on your serial monitor.
You will know what I mean if you use just this line.[/quote]
Do I need to connect the head unit via the usb cable for this?
Also, what baud setting etc do I need for the serial monitor?
Lastly, do I enter the text just as you put with the [code] at beginning and end?
Sorry to ask so many probably stupid questions!!
Re: Is there a way to get a more detailed view of relay acti
Posted: Sun Feb 10, 2013 1:06 pm
by dazza1304
rimai wrote:
You may need to want to check if the relay status has changed to print anything
You will know what I mean if you use just this line.
Also, how do I just check for a relay status change?
thanks!!
Re: Is there a way to get a more detailed view of relay acti
Posted: Sun Feb 10, 2013 7:22 pm
by rimai
Yes, you need the usb-ttl cable connected at 57600 baud.
You need to put it in your loop.
I'd do something like this:
Code: Select all
byte lastdata=0;
void setup()
{
...
...
}
void loop()
{
...
if (lastdata!=ReefAngel.Relay.RelayData)
{
lastdata=ReefAngel.Relay.RelayData;
Serial.println(ReefAngel.Relay.Status(Box1_Port1));
}
}
Re: Is there a way to get a more detailed view of relay acti
Posted: Mon Feb 11, 2013 10:11 am
by dazza1304
Thanks!