Page 1 of 1

Portal not showing correct info

Posted: Sun Jul 14, 2013 9:57 am
by ganjero
Portal is not showing the correct info. It shows a bunch of relay boxes and other stuff I dont have. Banner doesnt work either.


Reef Angel wifi address: 173.6xxxxxx:2000
My reefangelid:
ganjero
Connection Status:
Ready

Last Update:
Sun Jul 14 12:56:20 2013
Displaying data from:
Reef Angel Controller (live)

Re: Portal not showing correct info

Posted: Sun Jul 14, 2013 11:30 am
by rimai
Looks like the banner is working now.
It was missing the initial labels. I forced them in the database for you.
Are you talking about relays 11 through 18?

Re: Portal not showing correct info

Posted: Sun Jul 14, 2013 12:40 pm
by ganjero
Thanks, it seems the portal is working fine too; it was showing like I had 8 extra relay bars, voretch info, etc., stuff I did not have. Why do the relays skip 9 & 10?

Re: Portal not showing correct info

Posted: Sun Jul 14, 2013 1:29 pm
by ganjero
It's happening again (showing 8 relay boxes and all possible expansion attachments). is it something I'm doing?
I have been working in getting a custom mode on my jebao and feeding modes for them but cant get them to work and I'm not sure if that is messing my portal too.

I want his mode for the jebao flow:
byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
{
// Static's only initialize the first time they are called
static unsigned long LastChange=millis(); // Set the inital time that the last change occurred
static int Delay = random( 500, 3000); // Set the initial delay
static int NewSpeed = MidPoint; // Set the initial speed
static int AntiSpeed = MidPoint; // Set the initial anti sync speed
if ((millis()-LastChange) > Delay) // Check if the delay has elapsed
{
Delay=random(500,5000); // If so, come up with a new delay
int ChangeUp = random(Offset); // Amount to go up or down
if (random(100)<50) // 50/50 chance of speed going up or going down
{
NewSpeed = MidPoint - ChangeUp;
AntiSpeed = MidPoint + ChangeUp;
}
else
{
NewSpeed = MidPoint + ChangeUp;
AntiSpeed = MidPoint - ChangeUp;
}
LastChange=millis(); // Reset the time of the last change
}
if (WaveSync)
{
return NewSpeed;
}
else
{
return AntiSpeed;
}
}


and I want this for the feed modes

static StartFeeding=0;
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
StartFeeding=now(); // if we entered feeding mode, register what time it was.
if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
ReefAngel.PWM.SetActinic(100);
else
ReefAngel.PWM.SetActinic(30);

and this is my current code:
#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>

////// 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.FeedingModePorts = Port7Bit | Port8Bit;
    ReefAngel.FeedingModePortsE[0] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port7Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = Port3Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port4Bit;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port5Bit;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 851 );

    // Feeeding and Water Change mode speed
      static time_t StartFeeding=0;
      if (ReefAngel.DisplayedMenu==FEEDING_MODE)
        StartFeeding=now(); // if we entered feeding mode, register what time it was.
      if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
        ReefAngel.PWM.SetActinic(100);
      else
        ReefAngel.PWM.SetActinic(30);


    // Ports that are always on
    ReefAngel.Relay.On( Port8 );
    ReefAngel.Relay.On( Box1_Port2 );
    ReefAngel.Relay.On( Box1_Port3 );
    ReefAngel.Relay.On( Box1_Port4 );
    ReefAngel.Relay.On( Box1_Port5 );
    ReefAngel.Relay.On( Box1_Port6 );

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,14,0,19,0 );
    ReefAngel.StandardLights( Port2,15,0,20,0 );
    ReefAngel.StandardLights( Port3,19,55,22,0 );
    ReefAngel.StandardLights( Port4,14,0,22,15 );
    ReefAngel.StandardHeater( Port5,780,785 );
    ReefAngel.StandardFan( Port6,780,800 );
    ReefAngel.Relay.DelayedOn( Port7,60 );
    ReefAngel.StandardLights( Box1_Port1,22,0,16,0 );
    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = Sync;
    ////// Place your custom code below here
      if (ReefAngel.DCPump.Mode==Custom)
{
  ReefAngel.PWM.SetDaylight( ElseMode(70,30,true )); // ElseMode on sync mode, 70 +/- 30%
 }
 
    ////// Place your custom code above here

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

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 62, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 62, 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, 93, TempRelay );
    pingSerial();

    // Relay Expansion
    TempRelay = ReefAngel.Relay.RelayDataE[0];
    TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
    TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
    ReefAngel.LCD.DrawOutletBox( 12, 107, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
    ReefAngel.LCD.DrawGraph( 5, 5 );
}
    byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
    {
      // Static's only initialize the first time they are called
      static unsigned long LastChange=millis(); // Set the inital time that the last change occurred
      static int Delay = random( 500, 3000); // Set the initial delay
      static int NewSpeed = MidPoint; // Set the initial speed
      static int AntiSpeed = MidPoint; // Set the initial anti sync speed
      if ((millis()-LastChange) > Delay) // Check if the delay has elapsed
      {
        Delay=random(500,5000); // If so, come up with a new delay
        int ChangeUp = random(Offset); // Amount to go up or down
        if (random(100)<50) // 50/50 chance of speed going up or going down
        {
          NewSpeed = MidPoint - ChangeUp;
          AntiSpeed = MidPoint + ChangeUp;
        }
        else
        {
          NewSpeed = MidPoint + ChangeUp;
          AntiSpeed = MidPoint - ChangeUp;
        }
        LastChange=millis(); // Reset the time of the last change
      }
      if (WaveSync)
      {
        return NewSpeed;
      }
      else
      {
        return AntiSpeed;
      }
    }

Re: Portal not showing correct info

Posted: Sun Jul 14, 2013 5:38 pm
by rimai
Can you try a different browser?

Re: Portal not showing correct info

Posted: Sun Jul 14, 2013 6:14 pm
by ganjero
I changed the code and that seem to fixed it, I could not get the elsemode posted above to work, I'm not sure where the error was ( I would like if someone help me find it). For now I'm using the reefcrest mode, the variable speed in the portal shows on the pwm channels which is fine but how do I get to show it in the DC Pump area?

Thanks

This is the code I'm using now...O left the elsemode code in there until I figure out how to use it.

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>

////// 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.FeedingModePorts = Port7Bit | Port8Bit;
    ReefAngel.FeedingModePortsE[0] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port7Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = Port3Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port4Bit;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port5Bit;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Use T2 probe as temperature and overheat functions
    ReefAngel.TempProbe = T2_PROBE;
    ReefAngel.OverheatProbe = T2_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 851 );

    // Feeeding and Water Change mode speed
      static time_t StartFeeding=0;
      if (ReefAngel.DisplayedMenu==FEEDING_MODE)
        StartFeeding=now(); // if we entered feeding mode, register what time it was.
      if (now()-StartFeeding > 1800 && now()-StartFeeding < 5400) // if feeding started between 1800 and 5400 seconds
        ReefAngel.PWM.SetActinic(100);
      else   
        ReefAngel.PWM.SetActinic(45);


    // Ports that are always on
    ReefAngel.Relay.On( Port8 );
    ReefAngel.Relay.On( Box1_Port1);
    ReefAngel.Relay.On( Box1_Port2 );
    ReefAngel.Relay.On( Box1_Port3 );
    ReefAngel.Relay.On( Box1_Port4 );
    ReefAngel.Relay.On( Box1_Port7 );
    ReefAngel.Relay.On( Box1_Port8 );
    

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,14,0,19,0 );
    ReefAngel.StandardLights( Port2,15,0,20,0 );
    ReefAngel.StandardLights( Port3,19,55,22,0 );
    ReefAngel.StandardLights( Port4,14,0,22,15 );
    ReefAngel.StandardHeater( Port5,780,785 );
    ReefAngel.StandardFan( Port6,780,800 );
    ReefAngel.Relay.DelayedOn( Port7,60 );
    ReefAngel.StandardLights( Box1_Port5,22,0,16,0 );
    ReefAngel.DCPump.UseMemory = false;
    ////// Place your custom code below here
     
    ReefAngel.PWM.SetDaylight( ReefCrestMode(70,30,true) ); // ReefCrest at 70% +/- 30% on sync mode
 
    ////// Place your custom code above here

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

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 62, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 62, 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, 93, TempRelay );
    pingSerial();

    // Relay Expansion
    TempRelay = ReefAngel.Relay.RelayDataE[0];
    TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
    TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
    ReefAngel.LCD.DrawOutletBox( 12, 107, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
    ReefAngel.LCD.DrawGraph( 5, 5 );
}
    byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
    {
      // Static's only initialize the first time they are called
      static unsigned long LastChange=millis();        // Set the inital time that the last change occurred
      static int Delay = random( 500, 3000);           // Set the initial delay
      static int NewSpeed = MidPoint;                  // Set the initial speed
      static int AntiSpeed = MidPoint;                 // Set the initial anti sync speed
      if ((millis()-LastChange) > Delay)               // Check if the delay has elapsed
      {
        Delay=random(500,5000);                        // If so, come up with a new delay
        int ChangeUp = random(Offset);                 // Amount to go up or down
        if (random(100)<50)                            // 50/50 chance of speed going up or going down
        {
          NewSpeed = MidPoint - ChangeUp;
          AntiSpeed = MidPoint + ChangeUp;
        }
        else
        {
          NewSpeed = MidPoint + ChangeUp;
          AntiSpeed = MidPoint - ChangeUp;
        }
        LastChange=millis();                           // Reset the time of the last change
      }
      if (WaveSync)
      {
        return NewSpeed;
      }
      else
      {
        return AntiSpeed;
      }
    }

Re: Portal not showing correct info

Posted: Sun Jul 14, 2013 9:25 pm
by rimai
I think you need this:

Code: Select all

ReefAngel.DCPump.UseMemory = true;

Re: Portal not showing correct info

Posted: Mon Jul 15, 2013 6:59 pm
by ganjero
rimai wrote:I think you need this:

Code: Select all

ReefAngel.DCPump.UseMemory = true;
Replaced false with true but nothing changed.

Re: Portal not showing correct info

Posted: Sun Jul 21, 2013 10:35 am
by ganjero
is the DC Pump area in portal static or dynamic? Mine shows ReefCrest Speed 100%. Is it supposed to show what mode and the max speed are onlly? or update and show current pump speed?

Re: Portal not showing correct info

Posted: Sun Jul 21, 2013 10:58 am
by lnevo
Its based on the memory setting not the current speed or mode unless you are using memory