Portal Not updating

Related to the Portal
Post Reply
williet
Posts: 7
Joined: Sun Sep 16, 2012 9:36 am

Portal Not updating

Post by williet »

Hi All

My Portal for some reason is not updating. Please have a look at my code.

I am puzzled. it communicates but just not updates the graphs and the parameters??

// Autogenerated file by RAGen (v1.2.2.171), (04/28/2012 21:19)
// RA_042812_2119.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File:
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define RemoveAllLights
#define SaveRelayState
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 6
#define CUSTOM_MAIN
#define COLORS_PDE
#define ENABLE_ATO_LOGGING
#define FONT_8x8
#define NUMBERS_8x16
*/


#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_Colors.h>
#include <RA_CustomColors.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <ORP.h>
#include <RA_TempSensor.h>
#include <Relay.h>
//#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <ReefAngel.h>

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


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

#include <avr/pgmspace.h>
prog_char menu0_label[] PROGMEM = "Water Change";
prog_char menu1_label[] PROGMEM = "ATO Clear";
prog_char menu2_label[] PROGMEM = "Overheat Clear";
prog_char menu3_label[] PROGMEM = "Dosing Additives";
prog_char menu4_label[] PROGMEM = "PH Calibration";
prog_char menu5_label[] PROGMEM = "Date / Time";
prog_char menu6_label[] PROGMEM = "Version";

PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label, menu4_label, menu5_label, menu6_label };

void MenuEntry1()
{
ReefAngel.WaterChangeModeStart();
}
void MenuEntry2()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry3()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry4()
{
ReefAngel.FeedingModeStart();
ReefAngel.DisplayMenuEntry("Feeding and Dosing");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;

}
void MenuEntry6()
{
ReefAngel.SetupDateTime();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;

}
void MenuEntry7()
{
ReefAngel.DisplayVersion();

}

void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved

//ReefAngel.LCD.DrawDate(6, 123);
//pingSerial();

// Display Temp Text
ReefAngel.LCD.DrawText(0,255,12,77,"Temp");
// Display the T1 temp value 10,22
char text[7];
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
ReefAngel.LCD.Clear(255, 0, 22, 50, 36);
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE, 255, 10, 88, text, Num8x16);
pingSerial();

// Display pH Text
ReefAngel.LCD.DrawText(0,255,100,77,"pH");



// Display pH Value
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.Clear(255, 90, 22, 98, 36);
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE, 255, 90, 88, text, Num8x16);
pingSerial();
ConvertNumToString(text, ReefAngel.Params.ORP, 1);
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,13,40,"ORP");
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE, 255, 13, 50, text, Num8x16);
pingSerial();
// byte TempRelay = ReefAngel.Relay.RelayData;
// TempRelay &= ReefAngel.Relay.RelayMaskOff;
// TempRelay |= ReefAngel.Relay.RelayMaskOn;
// ReefAngel.LCD.DrawOutletBox(13, 108, TempRelay);
pingSerial();
}

void DrawCustomGraph()
{
// ReefAngel.LCD.DrawGraph(5, 24);
// pingSerial();
}


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Initialize the custom menu
InternalMemory.ATOTimeout_write(32767);

ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));
ReefAngel.SetTemperatureUnit(1); // set to Celsius Temperature

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port3Bit | Port5Bit ;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port8Bit ;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
// ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit;

// Ports that are always on
ReefAngel.Relay.On(Port8);
ReefAngel.Relay.On(Port2);
ReefAngel.Relay.On(Port3);
ReefAngel.Relay.On(Port4);
////// Place addition initialization code below here

ReefAngel.PHMin=538;// 540=PH7.0 529 ph7 346
ReefAngel.PHMax= 821;// 980=PH10.0 ph4 53


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

void loop()
{
// if(hour()==1 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==2 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==3 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==4 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==5 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==6 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==7 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==8 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==9 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==10 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==11 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==12 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==13 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==14 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==15 && minute()==55 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==16 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==17 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==18 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==19 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==20 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==21 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==22 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);
// if(hour()==23 && minute()==00 && second()==0) ReefAngel.Relay.On(Port2);
// if(hour()==00 && minute()==00 && second()==0) ReefAngel.Relay.Off(Port2);


// Specific functions that use Internal Memory values
ReefAngel.LCD.DrawText(COLOR_WHITE, COLOR_CORNFLOWERBLUE, 0, 0, " "); //Top Banner
ReefAngel.LCD.DrawText(COLOR_WHITE, COLOR_CORNFLOWERBLUE, 0, 2, " Reef Angel "); //Top Banner
ReefAngel.LCD.DrawText(COLOR_WHITE, COLOR_CORNFLOWERBLUE, 0, 10, " Willie's 2M Reef "); //Top Banner
//ReefAngel.StandardATO(Port1,100000); // Standard ATO

ReefAngel.SingleATO(true,Port1,32767,0);
ReefAngel.Relay.DelayedOn(Port5, 1);
ReefAngel.StandardHeater(Port7,258,260); // Heater
ReefAngel.StandardHeater(Port6,258,260); // Heater
////// Place your custom code below here

ReefAngel.Portal("williet");
////// Place your custom code above here
if ( ReefAngel.Params.PH >= 780) ReefAngel.Relay.On(Port2);
if ( ReefAngel.Params.PH <= 780 ) ReefAngel.Relay.Off(Port2);
// This should always be the last line
ReefAngel.ShowInterface();
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Portal Not updating

Post by lnevo »

Did you setup a key in the portal settings?
williet
Posts: 7
Joined: Sun Sep 16, 2012 9:36 am

Re: Portal Not updating

Post by williet »

lnevo wrote:Did you setup a key in the portal settings?
Hi

I have no key setup.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Portal Not updating

Post by binder »

when you say it communicates but does not update the graphs or parameters, what do you mean?
How do you know it communicates? if it is communicating then the parameters should be updated. Otherwise, your communication is probably not working.

This probably sounds silly but is your wifi module connected to your network? Can you communicate with the RA using one of the apps? Can you bring up the internal webserver on the controller?

Just trying to get some more information because the code looks ok and the portal line looks correct for no security key.

Sent from my XT1585 using Tapatalk
williet
Posts: 7
Joined: Sun Sep 16, 2012 9:36 am

Re: Portal Not updating

Post by williet »

binder wrote:when you say it communicates but does not update the graphs or parameters, what do you mean?
How do you know it communicates? if it is communicating then the parameters should be updated. Otherwise, your communication is probably not working.

This probably sounds silly but is your wifi module connected to your network? Can you communicate with the RA using one of the apps? Can you bring up the internal webserver on the controller?

Just trying to get some more information because the code looks ok and the portal line looks correct for no security key.

Sent from my XT1585 using Tapatalk
Hi Yes

I can access it. I even control the reefangel from the App on my phone. it just does not update the portal.
Did it last in September 2015 ?
Post Reply