Page 1 of 1

wifi adapter wont Sync with RA client

Posted: Sat Jun 15, 2013 4:51 pm
by tomek77pl
Hi

I recently purchased a wifi expansion and I got everything to work with the portal and my iphone but I cannot figure out how to connect the reef angel client suite to my wifi adapter. Am I missing a something in my code? because everything in the RA client settings is set correctly. thank you for your help :)


Here is my 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 <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 = Port3Bit | Port5Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit | Port5Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );


// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );

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


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

void loop()
{
ReefAngel.StandardHeater( Port1,773,778 );
ReefAngel.DosingPumpRepeat( Port6,0,50,15 );
ReefAngel.StandardLights( Port7,23,0,10,0 );
ReefAngel.SingleATO( true,Port8,10,0 );
////// Place your custom code below here



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

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

}


I also get this error message :
*****6/15/2013 8:23:34 PM*****
Message:
Inside WifiSend:
Unable to connect to the remote server
StackTrace:
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadString(Uri address)
at System.Net.WebClient.DownloadString(String address)
at ReefAngelWCFListener.ReefAngelListener.WifiSend()

Re: wifi adapter wont Sync with RA client

Posted: Sat Jun 15, 2013 7:34 pm
by rimai
Your code looks fine.
Make sure that you have it set to connect over wifi and that you have the correct url.

Re: wifi adapter wont Sync with RA client

Posted: Sat Jun 15, 2013 7:58 pm
by tomek77pl
The client mentions that it can not complete a web-request call to the wifi adapter. what could cause this? I have set all the right addresses to the portal. but when I access my portal it says that my connection status: Unreachable address. is that normal?

Re: wifi adapter wont Sync with RA client

Posted: Sun Jun 16, 2013 5:22 pm
by dbmet
Is your port forwarding turned on in your router for port 2000?

Re: wifi adapter wont Sync with RA client

Posted: Tue Jun 18, 2013 2:34 pm
by tomek77pl
Got it to work, it was the port forwarding, thank you so much :)

Re: wifi adapter wont Sync with RA client

Posted: Tue Jun 18, 2013 3:40 pm
by dbmet
Great!!

Re: wifi adapter wont Sync with RA client

Posted: Sat Jun 22, 2013 10:01 am
by tomek77pl
I still get an error message from the wifi Icon that says Could not complete the web request call to wifi adapter & when I set up my notifications for low PH I get email and texts every hr saying my ph is 6.84 when on the Reef Client, Portal and on the controller it self I have my ph around 7.89. I have calibrated the probe yesterday as well.