I created a google sheet to download and log the RA status. I did his because I wanted to have a longer log than 7 days (I am collecting the data only every hour now), and have my own dashboard with charts to see how things are going.
This is working well. However, I have some questions on what each of the metrics in /status mean. Is there a place where it goes over each of them? Also, where would relay activity show up?
Let me know if anyone is interested, happy to share.
Thanks,
Lucho
Sent from my iPhone using Tapatalk
Loggin activity
Re: Loggin activity
Nice
It's an XML file with all the parameters for everything we can log.
I don't think we created a document.
Start with the source code:
https://github.com/reefangel/Libraries/ ... i.cpp#L223
If you still unsure of any of them, let us know.
It's an XML file with all the parameters for everything we can log.
I don't think we created a document.
Start with the source code:
https://github.com/reefangel/Libraries/ ... i.cpp#L223
If you still unsure of any of them, let us know.
Roberto.
Re: Loggin activity
Thanks Roberto. I think I managed to get most of them. I only have a few missing (EM, EM1, REM, R1-8, RON1-8, ROFF1-8, and SF).
The question may be answered with the above, but where can I see relay status? I have 2 relay expansions.
thanks,
Lucho
The question may be answered with the above, but where can I see relay status? I have 2 relay expansions.
thanks,
Lucho
Re: Loggin activity
EM and EM1 are for expansion modules enabled.
SF and AF are for status flags and Alert flags.
REM is for which relay expansion module you have enabled.
R1-8 are the expansion relay boxes without the override flags.
RON1-8 are the expansion relay boxes override flag for always on flags.
ROFF1-8 are the expansion relay boxes override flag for always off flags.
In the Global.h, you will find the bits.
SF and AF are for status flags and Alert flags.
REM is for which relay expansion module you have enabled.
R1-8 are the expansion relay boxes without the override flags.
RON1-8 are the expansion relay boxes override flag for always on flags.
ROFF1-8 are the expansion relay boxes override flag for always off flags.
In the Global.h, you will find the bits.
Code: Select all
// EM Bits
#ifdef PWMEXPANSION
#define PWMEbit 1
#else
#define PWMEbit 0
#endif // PWMEXPANSION
#ifdef RFEXPANSION
#define RFEbit 2
#else
#define RFEbit 0
#endif // RFEXPANSION
#ifdef AI_LED
#define AIbit 4
#else
#define AIbit 0
#endif // AI_LED
#ifdef SALINITYEXPANSION
#define Salbit 8
#else
#define Salbit 0
#endif // SALINITYEXPANSION
#ifdef ORPEXPANSION
#define ORPbit 16
#else
#define ORPbit 0
#endif // ORPEXPANSION
#ifdef IOEXPANSION
#define IObit 32
#else
#define IObit 0
#endif // IOEXPANSION
#ifdef PHEXPANSION
#define PHbit 64
#else
#define PHbit 0
#endif // PHEXPANSION
#if defined WATERLEVELEXPANSION || defined MULTIWATERLEVELEXPANSION
#define WLbit 128
#else
#define WLbit 0
#endif // WATERLEVELEXPANSION || MULTIWATERLEVELEXPANSION
// EM1 Bits
#ifdef HUMIDITYEXPANSION
#define HUMbit 1
#else
#define HUMbit 0
#endif // HUMIDITYEXPANSION
#ifdef DCPUMPCONTROL
#define DCPumpbit 2
#else
#define DCPumpbit 0
#endif // DCPUMPCONTROL
#ifdef LEAKDETECTOREXPANSION
#define Leakbit 4
#else
#define Leakbit 0
#endif // LEAKDETECTOREXPANSION
#ifdef PAREXPANSION
#define PARbit 8
#else
#define PARbit 0
#endif // PAREXPANSION
#ifdef SIXTEENCHPWMEXPANSION
#define SCPWMbit 16
#else
#define SCPWMbit 0
#endif // SIXTEENCHPWMEXPANSION
// Alert Flags bits
#define ATOTimeOutFlag 0
#define OverheatFlag 1
#define BusLockFlag 2
#define LeakFlag 3
// Status Flag Bits
#define LightsOnFlag 0
#define FeedingFlag 1
#define WaterChangeFlag 2
Roberto.
Re: Loggin activity
Thanks for the quick reply.
I am clearly beyond my expertise.
Are the bits pieces you quoted above a way to understand what the number means? E.g., a 3 in AF means Leak flag is activated?
The other is in the relays. If i understand well, there are 3 status output per relay box (R, RON, and ROFF), with a number result for each. How do I translate that to knowing the status of each outlet within the relay box?
Thanks a lot!
Sent from my iPhone using Tapatalk
I am clearly beyond my expertise.
Are the bits pieces you quoted above a way to understand what the number means? E.g., a 3 in AF means Leak flag is activated?
The other is in the relays. If i understand well, there are 3 status output per relay box (R, RON, and ROFF), with a number result for each. How do I translate that to knowing the status of each outlet within the relay box?
Thanks a lot!
rimai wrote:EM and EM1 are for expansion modules enabled.
SF and AF are for status flags and Alert flags.
REM is for which relay expansion module you have enabled.
R1-8 are the expansion relay boxes without the override flags.
RON1-8 are the expansion relay boxes override flag for always on flags.
ROFF1-8 are the expansion relay boxes override flag for always off flags.
In the Global.h, you will find the bits.Code: Select all
// EM Bits #ifdef PWMEXPANSION #define PWMEbit 1 #else #define PWMEbit 0 #endif // PWMEXPANSION #ifdef RFEXPANSION #define RFEbit 2 #else #define RFEbit 0 #endif // RFEXPANSION #ifdef AI_LED #define AIbit 4 #else #define AIbit 0 #endif // AI_LED #ifdef SALINITYEXPANSION #define Salbit 8 #else #define Salbit 0 #endif // SALINITYEXPANSION #ifdef ORPEXPANSION #define ORPbit 16 #else #define ORPbit 0 #endif // ORPEXPANSION #ifdef IOEXPANSION #define IObit 32 #else #define IObit 0 #endif // IOEXPANSION #ifdef PHEXPANSION #define PHbit 64 #else #define PHbit 0 #endif // PHEXPANSION #if defined WATERLEVELEXPANSION || defined MULTIWATERLEVELEXPANSION #define WLbit 128 #else #define WLbit 0 #endif // WATERLEVELEXPANSION || MULTIWATERLEVELEXPANSION // EM1 Bits #ifdef HUMIDITYEXPANSION #define HUMbit 1 #else #define HUMbit 0 #endif // HUMIDITYEXPANSION #ifdef DCPUMPCONTROL #define DCPumpbit 2 #else #define DCPumpbit 0 #endif // DCPUMPCONTROL #ifdef LEAKDETECTOREXPANSION #define Leakbit 4 #else #define Leakbit 0 #endif // LEAKDETECTOREXPANSION #ifdef PAREXPANSION #define PARbit 8 #else #define PARbit 0 #endif // PAREXPANSION #ifdef SIXTEENCHPWMEXPANSION #define SCPWMbit 16 #else #define SCPWMbit 0 #endif // SIXTEENCHPWMEXPANSION // Alert Flags bits #define ATOTimeOutFlag 0 #define OverheatFlag 1 #define BusLockFlag 2 #define LeakFlag 3 // Status Flag Bits #define LightsOnFlag 0 #define FeedingFlag 1 #define WaterChangeFlag 2
Sent from my iPhone using Tapatalk
Re: Loggin activity
You will need to learn a little about binary numbers.
Google "binary number".
Here is one hit: https://www.mathsisfun.com/binary-number-system.html
Basically, the decimal number that the controller gives is a decimal representation of an 8bit number.
So, let's say you get 9 on R. The binary representation of the decimal 9 number is: 00001001
So, port 1 and port 4 would be on.
RON and ROFF are the override masks for On and Off.
You need to bitwise AND and OR the masks.
The formula is ( R || RON ) && ROFF
You need to bitwise OR RON and then bitwise AND ROFF. This will give you what the relay ports will be like after the override masks are applied.
Google "binary number".
Here is one hit: https://www.mathsisfun.com/binary-number-system.html
Basically, the decimal number that the controller gives is a decimal representation of an 8bit number.
So, let's say you get 9 on R. The binary representation of the decimal 9 number is: 00001001
So, port 1 and port 4 would be on.
RON and ROFF are the override masks for On and Off.
You need to bitwise AND and OR the masks.
The formula is ( R || RON ) && ROFF
You need to bitwise OR RON and then bitwise AND ROFF. This will give you what the relay ports will be like after the override masks are applied.
Roberto.
Re: Loggin activity
Got it. Thanks, I now decoded the relays piece (I am familiar with binary). Is this also the thinking behind the AF and SF?
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
-
- Posts: 74
- Joined: Mon Aug 05, 2013 3:16 am
Re: Loggin activity
Lucho, would you be willing to share this google sheet?
Thanks!
Thanks!