Last step to my wifi. Troubles getting portal to work

Related to the Portal
Post Reply
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Last step to my wifi. Troubles getting portal to work

Post by Saltydogg »

Wifi adapter is working great, im getting updates on Iphone app but when trying to get updated info on portal it is not working. I believe I have setup port forwarding and having ports 1999-2001 on my at&t 2wire router enabled for the ReefAngel ip address given in the Wifi Utility. I entered my public address (http://70.251.102.148:2000) in the portal wifi update spot but nothing will work. Is my address looking correct? I tried with and without the http:// and no luck either way. Anyone on here using the 2wire that can help verify if I have correctly seup the port forwarding? Thnaks for all help in advance!!

Phillip
Image
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by Saltydogg »

Here is my code if it helps
// Autogenerated file by RAGen (v1.2.2.171), (05/27/2012 14:43)
// RA_052712_1443.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 wifi
#define WDT
#define SIMPLE_MENU
*/


#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 <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 that are always on
    ReefAngel.Relay.On(Port5);
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port8);
    ////// Place additional initialization code below here
    

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

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.SingleATOHigh(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.Relay.DelayedOn(Port4, 1);
    ReefAngel.StandardHeater(Port7);
    ////// Place your custom code below here
    

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("saltydogg", "Simple123");

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

Image
Sebyte

Re: Last step to my wifi. Troubles getting portal to work

Post by Sebyte »

I am sure that you know that you need a fixed external IP address. Most IPS only give you one that changes periodically. Also ever time you reboot the router it will pick up a new address.

They way most RA users get around this is to setup an account with DynDns. Google and you will find their site. When you have setup an account you can download a small program that will keep your router in sync with your DynDns address. That address will then never change and it is what you will use on your portal settings page.

Your DynDns address will be something like me.dyndns.org

Then enter on your portal. me.dyndns.org:2000

Also you only need to set the port forwarding to 2000 not to the range 1999-2000. For some reason I have found that the 2wire does not like you using a range with the RA wifi unit.

Hope this helps.
jpalmer
Posts: 31
Joined: Tue May 01, 2012 11:49 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by jpalmer »

I believe code was added to the portal to figure out the IP when the RA connects to log it's stats. With that, the portal retains the last IP it saw connect.

All you have to do to use this, is remove the address of your wifi adapter from the portal.

So, it appears as though all you have to do now, is setup the port forwarding on your router now.
Image
Sebyte

Re: Last step to my wifi. Troubles getting portal to work

Post by Sebyte »

I believe code was added to the portal to figure out the IP when the RA connects to log it's stats. With that, the portal retains the last IP it saw connect.

All you have to do to use this, is remove the address of your wifi adapter from the portal.

So, it appears as though all you have to do now, is setup the port forwarding on your router now.
Hi jpalmer

I have been away for a couple weeks and may have missed something, things move so fast on the forum. :lol:

I know about the bug you found in v0.9.6. which will be corrected in the next libs upgrade. But I was under the impression that should your external IP address change between the portal being polled it would not find its way home to your wifi unit. Hence that is why we have for a long time been setting up DynDns or similar options.

The question I would ask is, why is there the option in the Portal settings for your external IP address or dynamic dns web address of your wifi attachment?

If what you say is correct, could you or Roberto be so kind as to confirm what you have said is correct, and I will write it up to be include it in the next edition of my "where to start guide".

Many thanks
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Last step to my wifi. Troubles getting portal to work

Post by binder »

What he's talking about is primarily just for the Portal. The portal grabs the external IP address during updates it receives from the controller. It stores that value and uses it to communicate with the controller.

It works great if you just use the Portal. It doesn't help with the smart phone apps because they don't have access to that IP address. So the dynamic hostname is required. Dyndns charges now for their service unless you were grandfathered in. A free one that I'm using now is http://www.no-ip.com/ and it works good.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by rimai »

The server only updates that field once if it finds it blank.
But, here is my idea.
I can change the server to always store the ip whenever it receives data from the controller.
This way, the server has the latest ip address.
The apps can use a special page I create for Dave, where you need forum username and forum password and it it is correct, the server returns the stored ip address.
This way, we can ditch the ddns and relly solely on the RA server.
What do you think?
Roberto.
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by Saltydogg »

So what should I do to allow for the portal to update and also be able to update my iPhone app outside of my wireless network
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by rimai »

At this time, if your WAN ip is changing, you will need to setup DDNS.
Roberto.
jpalmer
Posts: 31
Joined: Tue May 01, 2012 11:49 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by jpalmer »

rimai wrote:The server only updates that field once if it finds it blank.
But, here is my idea.
I can change the server to always store the ip whenever it receives data from the controller.
This way, the server has the latest ip address.
The apps can use a special page I create for Dave, where you need forum username and forum password and it it is correct, the server returns the stored ip address.
This way, we can ditch the ddns and relly solely on the RA server.
What do you think?

I love the idea. Lowers the barrier to entry for those who don't know how to setup dynamic DNS (or, can't for one reason or another) and makes it easier for users.
Image
Sebyte

Re: Last step to my wifi. Troubles getting portal to work

Post by Sebyte »

I agree, if ddns can be taken out of the equation it would make it easier for entry level users, and the Portal, iPad/iPhone and Android apps can pick-up the last ip address sent to the portal would be the best solution.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by rimai »

Ok, I've made the change.
I've done some tests and it seems to be working.
If anyone finds any irregularity, please let me know.
Roberto.
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Re: Last step to my wifi. Troubles getting portal to work

Post by Saltydogg »

Everything is now working perfectly. Thanks so much for everyones help!!!
Image
Sebyte

Re: Last step to my wifi. Troubles getting portal to work

Post by Sebyte »

Ok, I've made the change.
I've done some tests and it seems to be working.
If anyone finds any irregularity, please let me know.
Deleted IP address in Portal settings, opened Portal and it could not find my external address. Opened portal settings and the IP address field had been repopulated.

So all it is working ok, good fix :)

I did get an Error splash screen after I turned a relay from auto to off as a test. But the relay did what Ihad asked. Reset to auto and tried it again and could not replicate error. Just one of those things I guess!
Post Reply