How to setup your wifi attachment

New members questions
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Don't I need to add something to the code I currently have running the tank to enable wifi?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Yes

ReefAngel.Portal("username");
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Ok, I got nothing on the portal or the iPad app. Went through the wifi setup utility and set the wifi module set up, everything went fine there. Added the ReefAngel.Portal("username"); must be still missing something
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: How to setup your wifi attachment

Post by dbmet »

Have you turned on port forwarding in your router for port 2000 to your reef angel ip address?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Can you ping the ip? Have you tried it from your browser? Lets start at the basics..
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Not sure how to ping the ip. Yes, tried it in Firefox and got to the reef angel controller web server. Added the wifi to the end of the address and got to the t1 t2 t3 ph page with the temp and ph being displayed.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Cool. So the ip is working you dont need to worry about ping.

Now for ipad/iphone...make sure they are on same network as your reefangel and put the ip you used in your browser in the settings.

Make sure direct connect is turned on..

Also can you post your code.
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

ok, i have the same address in the setting on the ipad app. just noticed that when I switch to controls it looks like i can see which relays are on and off. Changed the setting to direct connect and get nothing. just says updating. On the portal it says unreachable address. I'm using a linksys E1550 router.

Here's what I have coded

#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
InternalMemory.LCDID_write(0);
ReefAngel.Init(); //Initialize controller
ReefAngel.AddStandardMenu(); // Add Standard Menu
ReefAngel.Portal("elevatorguy1");
// 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 = Port1Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 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( 869 );


// Ports that are always on

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


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

void loop()
{
ReefAngel.StandardLights( Port1,22,30,13,30 ); //*sump fuge light
ReefAngel.StandardLights( Port2,13,30,22,30 ); //*top fuge light
ReefAngel.StandardLights( Port3,13,30,22,30 ); //*Actinic
ReefAngel.StandardLights( Port4,13,30,22,30 ); //*Daylight
ReefAngel.DosingPumpRepeat( Port5,0,480,60 ); //*kalk reactor
ReefAngel.StandardATO( Port6,6000 ); //*Fresh water solenoid
ReefAngel.StandardHeater( Port7,775,785 );
ReefAngel.StandardLights( Port8,13,30,22,30 ); //*Light fan
ReefAngel.PWM.SetDaylight( PWMSlope(13,30,22,30,5,60,30,5) );
ReefAngel.PWM.SetActinic( PWMSlope(13,30,22,30,5,70,30,5) );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
byte x;
byte y = 2;
char text[7];



ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, 30, 2, "Gonzo's Reef"); // Put a banner at the top
ReefAngel.LCD.DrawDate(6, 119); // Put the date and time at the bottom
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11); // Draw a black line under the banner
x = 12;
y += MENU_START_ROW+1; // MENU_START_ROW is 10, according to globals.h, so y=2+10+1=13
ReefAngel.LCD.DrawText(COLOR_BLUE, COLOR_WHITE, x, y+6, "Tank Temp pH");
ConvertNumToString(text, ReefAngel.Params.PH, 100); // Get pH reading and convert
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+75, y+18, text, Font8x16); // Put pH on the screen
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10); // Get T1 temp and convert
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.DrawHugeNumbers(COLOR_WHITE, COLOR_BLACK, x, y, text); // Draw the temperature, white numbers on a colored background
x += (16*4) + 8;
ReefAngel.LCD.DrawText(DPColor,DefaultBGColor,8,y+25,"White %");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(), DPColor, 24, y+35, 1); // Draw the white light %
ReefAngel.LCD.DrawText(APColor,DefaultBGColor,x+8,y+25,"Blue %");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(), APColor, x+24, y+35, 1); // Draw the blue light %

// Code for drawing the relay box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 92, TempRelay);
}

void DrawCustomGraph()
{
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

I do not see the ReefAngel.Portal command in your code. It should be right before the ShowInterface() in the loop function. Without that wifi is not enabled
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

So, i need to add ReefAngel.Portal();
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

With your username in "" inside the ()
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Sorry, it was there. Had it below ReefAngel.AddStandard
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

It needs to be before ShowInterface() inside loop() basically after the custom code section.
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Went into my router and disabled the firewall. Now I can see a temp and ph number on my Ipad.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

You will still have a code problem as the portal command needs to be in loop. If you haven't changed it already
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Thanks for the help Inevo. Went to the portal and can see info now.
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Thanks to lnevo I was able to set up the local wifi set up and now I was able to get the port forwarding working! Had a heck of a time with the port forwarding. Come to find out the phone modem through comcast was acting like a router. This caused problems with my linksys router. Had to contact comcast and have them put the Arris Tg862 modem/router into bridge mode and BAM port forwarding works!
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Glad to hear!
DeeAnnMG
Posts: 25
Joined: Sat Aug 24, 2013 1:24 pm

Re: How to setup your wifi attachment

Post by DeeAnnMG »

Hi Roberto,
I know my question has been asked and answered a couple of times, but I'm still lost. This is what I see when connecting my Wifi attachment.

Image

DHCP: false
AND
IP address and port: 0.0.0.0.2000

I know you said that you highly recommend wifi network on WPA2-PSK with AES encryption. Is that my problem here? If so, how do I know what my network encryption is, and how do I change it if I need to?

Thanks,
DeeAnn
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Yes, I would try changing your security settings in your router to see if it makes a difference.
You must log into your router to do that.
Roberto.
DeeAnnMG
Posts: 25
Joined: Sat Aug 24, 2013 1:24 pm

Re: How to setup your wifi attachment

Post by DeeAnnMG »

Can you tell me how to fix that? Do I go through my Internet provider?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

You have to log into your router.
I don't know what brand wifi router you have.
It should have a manual for it, explaining how to connect to it.
Or, if it was provided by your ISP, you can contact them.
I googled and got a few results that may help:
http://www.youtube.com/watch?v=0DXFCXHKcoA
http://compnetworking.about.com/od/wifi ... outers.htm
Roberto.
DeeAnnMG
Posts: 25
Joined: Sat Aug 24, 2013 1:24 pm

Re: How to setup your wifi attachment

Post by DeeAnnMG »

Can you please double check my code? I can see my tank (temp, pH) on the iphone app, but am unable to "connect", and therefore have no control over my system by phone. Using the canyouseeme.org site, I verified that port 2000 is open for forwarding. below is my current code. The ReefAngel.Portal( "DeeAnnMG" ) is almost the last line.

1) Is the placement of that okay?
2) If not, can you think of anything else that could be the problem?

#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 = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 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( 805 );


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

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


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

void loop()
{
ReefAngel.StandardHeater( Port3,775,785 );
ReefAngel.StandardHeater( Port4,775,785 );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "DeeAnnMG" );
ReefAngel.ShowInterface();
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Everything looks good.
Are you able to connect to your controller using the portal?
In the iphone, does it say it can't connect?
Do you have it set with "Direct Connect" turned on?
Roberto.
DeeAnnMG
Posts: 25
Joined: Sat Aug 24, 2013 1:24 pm

Re: How to setup your wifi attachment

Post by DeeAnnMG »

rimai wrote:Everything looks good.
Are you able to connect to your controller using the portal? Using the canyouseeme.org site, I verified that port 2000 is open for forwarding.
In the iphone, does it say it can't connect? Yes, I get the "unable to connect" message when opening the app.
Do you have it set with "Direct Connect" turned on? Yes, direct connect is on.
jack
Posts: 47
Joined: Wed Aug 21, 2013 12:37 am

Re: How to setup your wifi attachment

Post by jack »

sorry if this question is repeated but read few pages here and there and thought better i will ask it here....

i have set up my RA with a wifi attachment and its working pretty cool but the problem is i am able to access the IP adress and my iphone app when i am in my own wifi zone as soon as i disconnect my home wifi zone and go out of the house i am not able to see my updated stats ..... not even from other wifi network.... what can be the possible problem ?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Jack, your problem is the same as Dee's original problem. You need to setup port forwarding on your router.
Dee, I meant the Portal: http://forum.reefangel.com/portal.php
Can you connect to the controller using the portal?
Roberto.
DeeAnnMG
Posts: 25
Joined: Sat Aug 24, 2013 1:24 pm

Re: How to setup your wifi attachment

Post by DeeAnnMG »

rimai wrote: Dee, I meant the Portal: http://forum.reefangel.com/portal.php
Can you connect to the controller using the portal?
Yes, clicking that link took me to a new page which displayed my tank parameters. The weird thing is, my RA wifi address on that link isn't the one generated by the wifi installer. The one that comes up on the link looks like my home IP. But the one I added on my phone app is the one from the installer. Is that the problem? If so, which is the correct one?
jack
Posts: 47
Joined: Wed Aug 21, 2013 12:37 am

Re: How to setup your wifi attachment

Post by jack »

again sorry to pitch in but i am not able to get what you guys are talking....
Post Reply