RF Module for Eco

Do you have a question on how to do something.
Ask in here.
Post Reply
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

RF Module for Eco

Post by ecam »

Is there anyway for the RA to dictate to the Mp 40 to run in either of three modes,

backwall, Sync and Anti.... The reason I ask is b\c I setup my 180 w\ a backwall unit and as per Ecotech, If I go into any non-ES mode it will knock out the back-wall unit from that wall and will not reset it without manual intervention. Any help on this will be greatly appreciated....
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RF Module for Eco

Post by lnevo »

The way I use the vortech's in my custom mode is to address each channel seperately with the custom mode.

ReefAngel.RF.Set(Custom, 50, 0);

Where 50 is the speed I want and 0 is the channel,

0 = Sync
1 = Anti-Sync
2 = Back wall.

This doesn't necessarily help with your issue. I would recommend giving EcoTech a call. It sounds like a firmware issue on the back wall pump...
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

This is perfect actually.......
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RF Module for Eco

Post by lnevo »

Keep in mind you get no waveform with that method... you can sub the "50" with one of the built-in functions to do your own. You could even have different waves on each channel :)
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

Lee,

Do you have the sample code you use for this... So that i can use it as a template. Would love to set it to get a wave action when needed... Once a day

ideally.. i want to do this with 3 MP40s:

Night mode: 10pm - 3am Master-S (SYNC), Slave S, Backwall, S
Lagoon mode 3-am-8am Master-S, Slave AS (Anti-Synch), Backwall, S
Reef Crest 8am- 11am Master-S, Slave S, Backwall, S
Tidal Swell 11- 4pm Master-S, Slave AS, Backwall, - Backwall
NTS Mode 4pm-7pm Master-S, Slave AS, Backwall, - Backwall
Lagoon Mode: 7pm-10pm Master-S, Slave AS, Backwall, - Sync

I also want the display and iphone to tell me what mode is on the display.

Any help would be greatly appreciated...

Code: Select all

On Sun, Sep 01, 2013 at 09:25 PM, Edwin Cambero wrote:

    #include <ReefAngel_Features.h>

    #include <Globals.h>

    #include <RA_Wifi.h>

    #include <Wire.h>

    #include <OneWire.h>

    #include <Time.h>

    #include <DS1307RTC.h>

    #include <InternalEEPROM.h>

    #include <RA_NokiaLCD.h>

    #include <RA_ATO.h>

    #include <RA_Joystick.h>

    #include <LED.h>

    #include <RA_TempSensor.h>

    #include <Relay.h>

    #include <RA_PWM.h>

    #include <Timer.h>

    #include <Memory.h>

    #include <InternalEEPROM.h>

    #include <RA_Colors.h>

    #include <RA_CustomColors.h>

    #include <Salinity.h>

    #include <RF.h>fa

    #include <IO.h>

    #include <ORP.h>

    #include <AI.h>

    #include <PH.h>

    #include <WaterLevel.h>

    #include <ReefAngel.h>

     

    ////// Place global variable code below here

     

     

    ////// Place global variable code above here

     

     

    void setup()

    {

        // This must be the first line

        ReefAngel.Init();  //Initialize controller

        // Ports toggled in Feeding Mode

    ReefAngel.WaterChangePorts = Port1Bit | Port8Bit; // Turn off Ports 5 and 6 when Feeding Mode is activated

      ReefAngel.FeedingModePorts = Port1Bit | Port6Bit | Port8Bit; // Turn off Ports 1, 6, 7 and 8 when Water Change Mode is activated

      ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit| Port5Bit;

      ReefAngel.OverheatShutoffPorts = Port2Bit |Port3Bit | Port4Bit | Port5Bit | Port7Bit; // Turn off Ports 3,

        ReefAngel.TempProbe = T3_PROBE;

        ReefAngel.OverheatProbe = T3_PROBE;

        // Set the Overheat temperature setting

        InternalMemory.OverheatTemp_write( 825 );

     

        // Setup ATO Port for AI communication

        ReefAngel.AI.SetPort( lowATOPin );

     

     

        // Ports that are always on

        ReefAngel.Relay.On( Port1 );

     

     

        ////// Place additional initialization code below here

       

     

        ////// Place additional initialization code above here

    }

     

    void loop()

    {

        ReefAngel.Relay.Set( Port2, !ReefAngel.Relay.Status( Port5 ) );

        ReefAngel.StandardLights( Port3,11,0,16,0 );

        ReefAngel.StandardLights( Port4,11,0,20,0 );

        ReefAngel.StandardLights( Port5,9,0,19,0 );

        ReefAngel.StandardHeater( Port7,800,810 );

        ReefAngel.Relay.DelayedOn( Port8,2 ); //Skimmer

        ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,75,0) );

        ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,0) );

        ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,(MoonPhase()/5)<3 ? 3:MoonPhase()/5) );

        ReefAngel.RF.UseMemory = false;

        ReefAngel.RF.SetMode( ReefCrest,85,10 );

        ReefAngel.RF.SetChannel( Radion_White, PWMParabola(9,0,20,0,0,60,0) );

        ReefAngel.RF.SetChannel( Radion_RoyalBlue, MoonPhase() );

        ReefAngel.RF.SetChannel( Radion_Red, PWMParabola(9,0,20,0,15,65,15) );

        ReefAngel.RF.SetChannel( Radion_Green, PWMParabola(9,0,20,0,15,50,15) );

        ReefAngel.RF.SetChannel( Radion_Blue, MoonPhase() );

        ReefAngel.RF.SetChannel( Radion_Intensity, PWMParabola(9,0,20,0,15,94,15) );

        if ( second()==0 ) ReefAngel.RF.RadionWrite();

     

     

        ////// Place your custom code below here

       

        

    ReefAngel.RF.UseMemory = false;

    if (hour()>=6 && hour()<11)

      ReefAngel.RF.SetMode(ReefCrest,85,10);

    else if (hour()>=11 && hour()<13)

      ReefAngel.RF.SetMode(ReefCrest,85,10);

    else if (hour()>=13 && hour()<16)

      ReefAngel.RF.SetMode(Smart_NTM,85,15);

    else if (hour()>=16 && hour()<19)

      ReefAngel.RF.SetMode(ReefCrest,65,10);

    else

      ReefAngel.RF.SetMode(Lagoon,40,10);

            

         

            

        // Hardcode PH calibrations

         //ReefAngel.PHMin=544; // PH7.0

         //ReefAngel.PHMax=830; // PH10.0

     

        ////// Place your custom code above here

     

        // This should always be the last line

        ReefAngel.Portal( "ecam" );

        ReefAngel.ShowInterface();

    }

     

    void DrawCustomMain()

    {

        int x,y;

        char text[10];

        // Aqua Illumination

        x = 10;

        y = 20;

        //ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x,y,"WH:" );

//        ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x+38,y,"BL:" );

//        ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x+76,y,"RB:" );

  //      for ( int a=0;a<3;a++ )

//        {

  //        ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x+18,y,ReefAngel.AI.GetChannel(a) );

    //      x += 38;

      //  }

//        pingSerial();

     

        // Parameters

    #if defined DisplayLEDPWM && ! defined RemoveAllLights

        ReefAngel.LCD.DrawMonitor( 15, 48, ReefAngel.Params,

        ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );

    #else // defined DisplayLEDPWM && ! defined RemoveAllLights

        ReefAngel.LCD.DrawMonitor( 15, 48, ReefAngel.Params );

    #endif // defined DisplayLEDPWM && ! defined RemoveAllLights

        pingSerial();

     

        // Main Relay Box

        byte TempRelay = ReefAngel.Relay.RelayData;

        TempRelay &= ReefAngel.Relay.RelayMaskOff;

        TempRelay |= ReefAngel.Relay.RelayMaskOn;

        ReefAngel.LCD.DrawOutletBox( 12, 94, TempRelay );

        pingSerial();

     

        // Date and Time

        ReefAngel.LCD.DrawDate( 6, 122 );

        pingSerial();

    }

     

    void DrawCustomGraph()

    {

ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

Now Since I have 3 vortechs, How do i tell them indivdually, what to do?


Can i set each vortech as its own variable or can the RF module not handle sending indvdual instructions to each vortech


lnevo wrote:The way I use the vortech's in my custom mode is to address each channel seperately with the custom mode.

ReefAngel.RF.Set(Custom, 50, 0);

Where 50 is the speed I want and 0 is the channel,

0 = Sync
1 = Anti-Sync
2 = Back wall.

This doesn't necessarily help with your issue. I would recommend giving EcoTech a call. It sounds like a firmware issue on the back wall pump...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RF Module for Eco

Post by lnevo »

I am pretty backlogged. You can look at what people are doign with the Jaebo pumps on different schedules. THe code would be the same. If you are using the "Custom" mode for Vortech to address each channel it would be the same as using the ReefAngel.PWM.SetDaylight/SetActinic functions.

You would do something like ReefAngel.RF.Set(Custom,ReefCrestMode(50,20,true),0);

as an example. This would be similar to doing ReefAngel.PWM.SetDaylight(ReefCrestMode(50,20,true));

If you have specific questions, feel free to ask and I can help. I can't do any more custom INO for people right now until I finish the ones I owe already...
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

Lee, first question

I want to assign each pump a name so that i can call it in each mode. How do I declare the variable for that and also can the RF handle this?

Esentially something like this

#define Var_40L
#define Var_40R
#define Var_40B

and then how do i call it.. into this code while still assigning the custom function you mentioned.....

here is my current Custom modes

Code: Select all

ReefAngel.RF.UseMemory = false;

if (hour()>=6 && hour()<11)

  ReefAngel.RF.SetMode(ReefCrest,85,10);

else if (hour()>=11 && hour()<13)

  ReefAngel.RF.SetMode(ReefCrest,85,10);

else if (hour()>=13 && hour()<16)

  ReefAngel.RF.SetMode(Smart_NTM,85,15);

else if (hour()>=16 && hour()<19)

  ReefAngel.RF.SetMode(ReefCrest,65,10);

else

  ReefAngel.RF.SetMode(Lagoon,40,10);
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RF Module for Eco

Post by lnevo »

ecam wrote:Lee, first question

I want to assign each pump a name so that i can call it in each mode. How do I declare the variable for that and also can the RF handle this?

Esentially something like this

#define Var_40L
#define Var_40R
#define Var_40B

and then how do i call it.. into this code while still assigning the custom function you mentioned.....

here is my current Custom modes

Code: Select all

ReefAngel.RF.UseMemory = false;

if (hour()>=6 && hour()<11)

  ReefAngel.RF.SetMode(ReefCrest,85,10);

else if (hour()>=11 && hour()<13)

  ReefAngel.RF.SetMode(ReefCrest,85,10);

else if (hour()>=13 && hour()<16)

  ReefAngel.RF.SetMode(Smart_NTM,85,15);

else if (hour()>=16 && hour()<19)

  ReefAngel.RF.SetMode(ReefCrest,65,10);

else

  ReefAngel.RF.SetMode(Lagoon,40,10);
First answer:

Code: Select all

#define Var_40L 0
#define Var_40R 1
#define Var_40B 2
0 = Sync
1 = AntiSync
2 = Back

To use it you would change one of the below ReefAngel.RF.SetMode commands to something like this...

Code: Select all

ReefAngel.RF.SetMode(Custom, ReefCrestMode(85,10,true), Var_40L); // true is sync
ReefAngel.RF.SetMode(Custom, ReefCrestMode(75,10,false), Var_40R); // false is anti-sync
ReefAngel.RF.SetMode(Custom, ShortPulseMode(65,75,100,true), Var_40B); // no built-in for the back wall pump..
This would address each channel seperately. Obviously you would change this to be whatever you wanted. The built in functions don't have a "mode" for the back wall pumps..so you could run it as a sync / anti-sync / or something different like I did with ShortPulse..
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

Wow, i cant believe at the speed you crank this stuff out at...

Thanks... will play with this stuff tonight...
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

Okay, Im finally ready to work on this code. I have 4 vortechs. 1 left, 1 right, 2 in the back (l,r). I see from a previous post how to define the channels. The question is, how do i know which of my vortechs are being called in the variable.

For example, the 2 in the backwall i only want it to run lagoon and short pulse.

The left and right ones I dont want it running those modes.

Also, I'm assuming there is no variable yet to call the back wall feature of the Vortechs


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

Re: RF Module for Eco

Post by lnevo »

Its determined by the mode you set your pump.

Once they are in slave mode i believe

White= sync
Orange=anti-sync
Turquoise=back wall

If your gonna run the backwall ones in a different mode then left / right, you could run the backwall as sync/antisync with each other.
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: RF Module for Eco

Post by ecam »

IF I use this:

#define Var_40L
#define Var_40R
#define Var_40BL
#define Var_40BR

how can i be sure that the 40L is indeed the left vortech? This is why im trying to figure out how ti id the channels on the RF module

I want to doas such;

40L reef crest mode
40R Antisync
40BL short pulse or backwall
40BR antisynch to 40BL
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: RF Module for Eco

Post by lnevo »

You can define those like that. You need to assign the value to those variable names. You have to look at your vortech manual and assign the pumps to the channel you want them. You could set each channel one by one to confirm. This is a vortech question really...
Post Reply