Page 1 of 1

portal not working, phone app is

Posted: Sun Jun 26, 2016 9:26 am
by psyrob
My portal page keeps showing data from February, when I reload it it shows todays date for a second then goes back to february. Just before it goes back to February, the Connection Status says "Error - 0" for a brief section.

My iphone app is current and both are pointing to the same IP address and port and I confirmed that my port is open. Any ideas why the portal isn't updating even as my iphone app is?
thanks

Re: portal not working, phone app is

Posted: Sun Jun 26, 2016 7:54 pm
by rimai
Can you post what you get when you browse http://ipaddress:2000/r99 ?

Re: portal not working, phone app is

Posted: Mon Jun 27, 2016 1:04 pm
by psyrob
Here is what came up. Now, when I check the portal from work, it is current. Could it be only happening from my house, like my router changing the IP?

<RA>
<ID>psyrob</ID>
<T1>811</T1>
<T2>784</T2>
<T3>807</T3>
<PH>800</PH>
<R>175</R>
<RON>0</RON>
<ROFF>246</ROFF>
<ATOLOW>0</ATOLOW>
<ATOHIGH>0</ATOHIGH>
<EM>0</EM>
<EM1>2</EM1>
<REM>0</REM>
<BID>1</BID>
<AF>1</AF>
<SF>0</SF>
<PWMA>91</PWMA>
<PWMD>50</PWMD>
<PWMAO>255</PWMAO>
<PWMDO>255</PWMDO>
<DCM>13</DCM>
<DCS>100</DCS>
<DCD>22</DCD>
<DCT>30</DCT>
</RA>

Re: portal not working, phone app is

Posted: Mon Jun 27, 2016 3:19 pm
by psyrob
spoke too soon: now it is back to february data

Re: portal not working, phone app is

Posted: Mon Jun 27, 2016 8:00 pm
by rimai
Ok, there can be two things.
You are using timer 4 or your wifi attachment is not properly configured.
Let's start with the easier. Can you post your code?

Re: portal not working, phone app is

Posted: Sat Jul 09, 2016 5:34 pm
by psyrob
Sorry for the delay, been busy at work: here is my code, note from my banner that the portal is showing data from February... Does this give any answers?
Thanks

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 <PAR.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
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port1 );
    ReefAngel.Relay.On( Port6 );

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

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

void loop()
{
    ReefAngel.ActinicLights( Port2 );
    ReefAngel.DayLights( Port3 );
    ReefAngel.ActinicLights( Port4 );
    ReefAngel.SingleATOLow( Port5 );
    ReefAngel.StandardHeater( Port7 );
    ReefAngel.StandardFan( Port8 );
    ReefAngel.PWM.SetDaylight( MoonPhase() );
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = Sync;
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "psyrob" );
    ReefAngel.DDNS( "99.90.0.55:2000" ); // Your DDNS is psyrob-99.90.0.55:2000.myreefangel.com
    ReefAngel.ShowInterface();
}/code]

Re: portal not working, phone app is

Posted: Sat Jul 09, 2016 8:53 pm
by lnevo
Check under Portal Settings in the Portal and make sure you don't have a key setup.

Also your DDNS name. Should just be a name and shouldn't have your IP and Port.

Re: portal not working, phone app is

Posted: Sun Jul 10, 2016 7:22 pm
by psyrob
do you mean the ddns name should be in my code, and not the IP and Port? As in this line in the code:

ReefAngel.DDNS( "99.90.0.55:2000" ); // Your DDNS is psyrob-99.90.0.55:2000.myreefangel.com
should really be
ReefAngel.DDNS("psyrob");//

Re: portal not working, phone app is

Posted: Sun Jul 10, 2016 8:33 pm
by lnevo
more like controller1. Then your DDNS name will be psyrob-controller1.myreefangel.com

But the key is more than likely your current problem.

Re: portal not working, phone app is

Posted: Sun Jul 31, 2016 6:45 pm
by psyrob
Well, I'm still not able to connect. I redid my code thru the wizard, and this is what it created:

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 <PAR.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
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port6 );

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

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

void loop()
{
    ReefAngel.StandardFan( Port1 );
    ReefAngel.ActinicLights( Port2 );
    ReefAngel.DayLights( Port3 );
    ReefAngel.DayLights( Port4 );
    ReefAngel.SingleATOLow( Port5 );
    ReefAngel.StandardHeater( Port7 );
    ReefAngel.StandardFan( Port8 );
    ReefAngel.PWM.SetDaylight( MoonPhase() );
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = Sync;
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "psyrob" );
    ReefAngel.DDNS( "99.90.0.55:2000" ); // Your DDNS is psyrob-99.90.0.55:2000.myreefangel.com
    ReefAngel.ShowInterface();
}

And again, my iphone app works but the portal does not. And I don't have a key set up on the portal. I checked that. I will try and change in the code "psyrob" to "psy-rob-controller1.myreefangel.com" and see if that works.
any other ideas?

Re: portal not working, phone app is

Posted: Sun Jul 31, 2016 7:00 pm
by psyrob
So I switched my code at the end as follows:

Code: Select all

     // This should always be the last line
    ReefAngel.Portal( "psyrob" );
    ReefAngel.DDNS( "psyrob-controller1.myreefangel.com" ); // Your DDNS is psyrob-99.90.0.55:2000.myreefangel.com
    ReefAngel.ShowInterface();
} 
and it didn't work at first , it went to February data, but after refreshing the page a few times, current data popped up. I will keep an eye on it, but thanks for the help