Web portal and banner update issue

Related to the Portal

Posts: 69
Joined: Sun Aug 04, 2013 2:29 am
PostPosted: Tue Dec 30, 2014 7:22 am
stare at least 20min, nothing happened in monitor window.
is there anything wrong with my RA+?
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Dec 30, 2014 7:52 am
Were you using teraterm or the Serial Monitor inside the Arduino app. Can you post your full code. Can you upload the code again and then monitor again via the serial monitor.

Posts: 69
Joined: Sun Aug 04, 2013 2:29 am
PostPosted: Tue Dec 30, 2014 7:58 am
my code as attached

Code: Select all
#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>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>

// Define Relay Ports by Name
#define Return             1
#define ATOPump            2
#define Skimmer            3
#define Wavepump           4
#define None1              5
#define ZeovitShake        6
#define Relay_Box2         7
#define Heater             8

#define T5_Channel1        Box1_Port1
#define T5_Channel2        Box1_Port2
#define T5_Channel3        Box1_Port3
#define ZEO_ST3            Box1_Port4
#define ZEO_SP             Box1_Port5
#define CaHCO3             Box1_Port6
#define ZEO_BB             Box1_Port7
#define ZEO_KB             Box1_Port8



// Define Custom Memory Locations

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


void setup()
{
    // This must be the first line
    ReefAngel.Init(); //Initialize controller
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature
   
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen
   
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port8Bit | Port4Bit | Port1Bit | Port2Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port8Bit;  //should be redefine to new ports
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T3_PROBE;
    ReefAngel.OverheatProbe = T2_PROBE;
   
    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = AntiSync;
    ReefAngel.DCPump.ExpansionChannel[0] = None;
    ReefAngel.DCPump.ExpansionChannel[1] = None;
    ReefAngel.DCPump.ExpansionChannel[2] = None;
    ReefAngel.DCPump.ExpansionChannel[3] = None;
    ReefAngel.DCPump.ExpansionChannel[4] = None;
    ReefAngel.DCPump.ExpansionChannel[5] = None;
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;

    // Ports that are always on
    ReefAngel.Relay.On(Return);
    ReefAngel.Relay.On(Wavepump);
    ReefAngel.Relay.On(Relay_Box2);
   
    ////// Place additional initialization code below here
   
    ReefAngel.CustomLabels[0]="ReturnPump";
    ReefAngel.CustomLabels[1]="ATOPump";
    ReefAngel.CustomLabels[2]="Skimmer";
    ReefAngel.CustomLabels[3]="Wavepump";
    ReefAngel.CustomLabels[4]="None1";
    ReefAngel.CustomLabels[5]="ZeovitShake";
    ReefAngel.CustomLabels[6]="Relay_Box2";
    ReefAngel.CustomLabels[7]="Heater";

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

void loop()
{
  //single ATO
    ReefAngel.SingleATO(true,ATOPump,90,1);
    ReefAngel.StandardHeater(Heater);
    ReefAngel.Relay.DelayedOn(Skimmer);

    // T5 light setup
    //ReefAngel.MoonLights(LunaLED);
    ReefAngel.DosingPumpRepeat1(ZeovitShake);
    ReefAngel.StandardLights(T5_Channel2);
    ReefAngel.PWM.SetChannel(0,ReefAngel.Relay.Status(T5_Channel1)*100);
    ReefAngel.DayLights(T5_Channel1);
    ReefAngel.PWM.SetChannel(1,ReefAngel.Relay.Status(T5_Channel3)*100);
    ReefAngel.ActinicLights(T5_Channel3);
    ReefAngel.PWM.SetChannel(2,ReefAngel.Relay.Status(T5_Channel2)*100);


    //dosing pump setup
    ReefAngel.DosingPump(ZEO_ST3,1,22,31,28);
    ReefAngel.PWM.SetChannel(3,ReefAngel.Relay.Status(ZEO_ST3)*100);
   
    ReefAngel.DosingPump(ZEO_ST3,2,6,31,28);
    ReefAngel.PWM.SetChannel(3,ReefAngel.Relay.Status(ZEO_ST3)*100);
   
    ReefAngel.DosingPump(ZEO_SP,4,22,32,40);
    ReefAngel.PWM.SetChannel(4,ReefAngel.Relay.Status(ZEO_SP)*100);
   
    ReefAngel.DosingPumpRepeat2(CaHCO3);
    ReefAngel.PWM.SetChannel(5,ReefAngel.Relay.Status(CaHCO3)*100);

       
   
    //wave pump setup
    ReefAngel.DCPump.UseMemory = true;
   
    if (now() % SECS_PER_DAY >= 9 * SECS_PER_HOUR && now() % SECS_PER_DAY < (9 * SECS_PER_HOUR + 10 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(Lagoon,90,20);//Set RW8 to 90% speed with  pulse in Lagoon Mode from 9:00~9:10
        }
       
       else if (now() % SECS_PER_DAY >= (9 * SECS_PER_HOUR + 10 * SECS_PER_MIN) && now() % SECS_PER_DAY < 10 * SECS_PER_HOUR )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(TidalSwell,90,20); //Set RW to 90% speed with 20ms pulse in Tidal Swell Mode
        }   
       
       else if (now() % SECS_PER_DAY >= 10 * SECS_PER_HOUR  && now() % SECS_PER_DAY < (10 * SECS_PER_HOUR + 30 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(ReefCrest,85,20);//Set RW8 to 85% speed with Lagoon Pulse Mode
        }
       
        else if (now() % SECS_PER_DAY >= (10 * SECS_PER_HOUR + 30 * SECS_PER_MIN)  && now() % SECS_PER_DAY < (11 * SECS_PER_HOUR + 10 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(Lagoon,85,20);//Set RW8 to 85% speed with  pulse in Lagoon Mode
        }
       
        else if (now() % SECS_PER_DAY >= (11 * SECS_PER_HOUR + 10 * SECS_PER_MIN)  && now() % SECS_PER_DAY < (12 * SECS_PER_HOUR + 0 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(LongPulse,85,30);;//Set RW8 to 85% speed with Long pulse Mode
        }
       
        else if (now() % SECS_PER_DAY >= (12 * SECS_PER_HOUR + 0 * SECS_PER_MIN) && now() % SECS_PER_DAY < 15 * SECS_PER_HOUR )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(TidalSwell,85,20); //Set RW to 85% speed with 20ms pulse in Tidal Swell Mode
        }
       
        else if (now() % SECS_PER_DAY >= 15 * SECS_PER_HOUR  && now() % SECS_PER_DAY < (17 * SECS_PER_HOUR + 0 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(ReefCrest,85,20);//Set RW8 to 85% speed with Lagoon Pulse Mode
        }
       
        else if (now() % SECS_PER_DAY >= (17 * SECS_PER_HOUR + 0 * SECS_PER_MIN)  && now() % SECS_PER_DAY < (18 * SECS_PER_HOUR + 30 * SECS_PER_MIN))
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(NutrientTransport,85,700);//Set WP40 to 90% speed with NutrientTransport Mode
        }
       
        else if (now() % SECS_PER_DAY >= (18 * SECS_PER_HOUR + 30 * SECS_PER_MIN)  && now() % SECS_PER_DAY < (18 * SECS_PER_HOUR + 30 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(Lagoon,85,20);//Set RW8 to 80% speed with  pulse in Lagoon Mode
        }       
       
        else if (now() % SECS_PER_DAY >= (19 * SECS_PER_HOUR + 0 * SECS_PER_MIN) && now() % SECS_PER_DAY < 20 * SECS_PER_HOUR )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(TidalSwell,85,20); //Set RW to 85% speed with 20ms pulse in Tidal Swell Mode
        }   
       
        else if (now() % SECS_PER_DAY >= 20 * SECS_PER_HOUR  && now() % SECS_PER_DAY < (22 * SECS_PER_HOUR + 30 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(ReefCrest,75,20);//Set RW8 to 70% speed with Lagoon Pulse Mode
        }
       
        else if (now() % SECS_PER_DAY >= (22 * SECS_PER_HOUR + 30 * SECS_PER_MIN)  && now() % SECS_PER_DAY < (22 * SECS_PER_HOUR + 35 * SECS_PER_MIN) )
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(Lagoon,90,20);//Set RW8 to 90% speed with  pulse in Lagoon Mode, dossing coral feed.
        }
               
       else
        {
            ReefAngel.DCPump.UseMemory=false;
            ReefAngel.DCPump.SetMode(NutrientTransport,40,30);
        }
       
    // Set timer when in feeding mode
    static unsigned long feeding;
    if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();
    if (now()-feeding<1*SECS_PER_HOUR) {
    // Continue NTM for the 60 minutes
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Mode=NutrientTransport;
    }
   
    //Autofeeder
    if ( ((hour() == 18)) && (minute() == 58) &&(second() == 30) ) ReefAngel.FeedingModeStart();
 
    //Skimmer off 1.5 hours when coral feeding.
    if (now()%SECS_PER_DAY >= (22 * SECS_PER_HOUR + 30 * SECS_PER_MIN)  && now()%SECS_PER_DAY < (23 * SECS_PER_HOUR + 30 * SECS_PER_MIN) )
    {
      ReefAngel.Relay.Off(Skimmer);
    }

    ////// Place your custom code below here
   static boolean powerOutage=false;
    ReefAngel.UseFlexiblePhCalibration();
  // Power Outage - turn off everything
  if (!ReefAngel.Relay.IsRelayPresent(MAIN_RELAY)) // Main Relay NOT present
  {
    powerOutage=true;
    ReefAngel.Relay.Off(Return);
    ReefAngel.Relay.Off(Skimmer);
    ReefAngel.Relay.Off(None1);
    ReefAngel.Relay.Off(Wavepump);
    ReefAngel.Relay.Off(ZeovitShake);
    ReefAngel.Relay.Off(Heater); 
    ReefAngel.Relay.Off(Relay_Box2);
    ReefAngel.Relay.Off(ATOPump);
  }

  // Power Restored - Turn things back on
  if (powerOutage && ReefAngel.Relay.IsRelayPresent(MAIN_RELAY))
  {
    LastStart=now();
    powerOutage=false;
    ReefAngel.Relay.On(Return);
    ReefAngel.Relay.On(Skimmer);
    ReefAngel.Relay.On(Wavepump);
  }
   
     // Turn off Skimmer if Return pump has been shutoff.   
  if (!ReefAngel.Relay.Status(Return)) {
      ReefAngel.Relay.Off(Skimmer);
      ReefAngel.Relay.Off(Heater);
  }

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

    // This should always be the last line
    ReefAngel.Portal( "sesame");
    ReefAngel.ShowInterface();
}

Posts: 69
Joined: Sun Aug 04, 2013 2:29 am
PostPosted: Tue Dec 30, 2014 8:11 am
lnevo wrote:Were you using teraterm or the Serial Monitor inside the Arduino app. Can you post your full code. Can you upload the code again and then monitor again via the serial monitor.

using Arduino Serial monitor. another 10 min. but nothing popup.
may have issue with my laptop?

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Dec 30, 2014 9:14 am
It is weird, because if you can upload codes, you should be able to get it to send data.
To make sure we are in the same page, upload this same above code one more time and right after upload, open Serial Monitor without disconnecting the cable or even touching it at all.
Do you get anything after 10 to 15mins?
If you do not, make sure that "Both NL & CR" is selected on the left side of the baud rate.
On the top part of the window, by the Send button, type "GET / HTTP" and hit enter.
Do you get anything now?
Roberto.
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Dec 30, 2014 9:22 am
Should also add some Serial.println as a test..

Posts: 69
Joined: Sun Aug 04, 2013 2:29 am
PostPosted: Tue Dec 30, 2014 9:33 am
Will have another try
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Dec 30, 2014 9:39 am
Your code looks fine, nothing that would interfere. Just an FYI though, you can't monitor for power outages with the main relay box since the RA will also lose power in that scenario. You can monitor your expansion relay boxes only.

Posts: 69
Joined: Sun Aug 04, 2013 2:29 am
PostPosted: Wed Dec 31, 2014 7:01 am
upload code again, and checked with buildin monitor, nothing happend at "both nl / cr"

type get / http shown message below:

HTTP/1.1 200 OK
Server: ReefAngel
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Connection: close
Content-Type: text/html
Content-Length: 41

<h1>Reef Angel Controller Web Server</h1>
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Dec 31, 2014 8:31 am
ok so I/O is working.. very odd. Did you add a Serial.println as a test?
PreviousNext

Return to Portal

Who is online

Users browsing this forum: No registered users and 3 guests

cron