Connection Status: Unreachable Address

Related to the Portal
Post Reply
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Connection Status: Unreachable Address

Post by nyknicks4412 »

In the process of finishing the setup of my Reef Angel. I have run through the wizard and uploaded my code to the device. I have opened the necessary port on my router (2000), created a DMZ on my modem/router and can access my reef angel externally from my network. I have set DDNS on no-ip which is working.

However, I want to take advantage of the portal on here and setup a forum banner for my controller. I cannot seem to get the portal to receive data from my controller. It says my forum name and below it it says Connection Status: Unreachable Address.

Here is my code. Ideally I could get the DDNS provided by reef angel setup and get my controller updating the portal. Anything I am missing on why this isn't working would be much appreciated!

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>

/*
Port Assignment:
Port1 - Light1
Port2 - Light2
Port3 - Vortech MP10
Port4 - Heater
Port5 - Skimmer
Port6 - Reactor
Port7 - ATO
Port8 - Return
*/

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


    // Ports that are always on
    ReefAngel.Relay.On( Port3 );
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port7 );
    ReefAngel.Relay.On( Port8 );

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,10,0,21,0 );
    ReefAngel.StandardLights( Port2,0,0,19,0 );
    ReefAngel.StandardHeater( Port4,780,790 );
    ////// Place your custom code below here
    

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

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

Re: Connection Status: Unreachable Address

Post by rimai »

There is nothing wrong with the code.
I also don't see any data from your controller, which is weird.
The only thing I can think of is if the wifi attachment is somehow misconfigured, since you confirmed that you can connect from it remotely by using no-ip.
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

Here is the noip address you can see you can reach the controller....

nyknicks4412.ddns.net:2000

How would I trouble shoot the wifi attachment?
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

Roberto...this may help us troubleshoot. I am using a Mac and found that I was unable to connect to my wifi attachment using the files found through the download links on the site. After some searching on the forum I found that by downloading an older version of the wifi utility I was able to connect to the wifi attachment. Could this play a role in having issues connecting with the portal?
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

Digging some more and trying to throw all the information I can at you haha...

iPhone application works remotely. Using my cellphone network I am able to switch on and off ports on relay box. However, I go to the graphs section and am unable to get anything to display. Screen just shows blank.

More than likely because app asks for IP and I input the DDNS I created through no-ip...
Last edited by nyknicks4412 on Sun Feb 22, 2015 9:56 am, edited 1 time in total.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

I think we may need to use coolterm to identify the problem.
Connect the wifi attachment to the usb programming cable.
Connect at 57600 and type $$$ to enter command mode and type get e command.
Paste the result here.
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

Here is the output! Hope this helps. Thanks a lot for helping get this squared away

Code: Select all

wifly-GSX Ver: 4.41 Build: r1057, Jan 17 2014 10:26:29 on RN-131
SSID=WiFly-GSX-b7
Pass=
Linkmon=3600
Beacon=102
Reboot=0
IF=UP
DHCP=ON
IP=192.168.1.5:2000
NM=255.255.255.0
GW=192.168.1.1
HOST=198.171.134.6:80
PROTO=TCP,
MTU=1524
FLAGS=0x6
TCPMODE=0x0
BACKUP=0.0.0.0
OPEN=
CLOSE=
REMOTE=
FlushSize=1420
MatchChar=0
FlushTimer=5
IdleTimer=3
CmdChar=$
DNS=192.168.1.1
Name=www.reefangel.com
Backup=rn.microchip.com
Lease=86400
FTP=198.175.253.161:21
File=wifly-GSX.img
User=roving
Pass=Pass123
Dir=public
Timeout=200
FTP_mode=0x0
SSID=DanKaylaApartment
Chan=0
ExtAnt=0
Join=1
Auth=OPEN
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=5
Passphrase=*****
EAP_Id=userid
EAP_User=peap-user
SleepTmr=0
WakeTmr=0
Trigger=0x10
Autoconn=0
IoFunc=0x0
IoMask=0x20f0
IoValu=0x0
DebugReg=0x0
PrintLvl=0x0
LaunchStr=web_app
TimeEna=0
TIMEADR=64.90.182.55:123
Zone=7
Baudrate=57600
Flow=0x0
Mode=0x2
Cmd_GPIO=0
JoinTmr=1000
Replace=0x24
DeviceId=ReefAngelWifi
Password=
Format=0x0
Signal=0
Average=5
BCAST=255.255.255.255:55555
Interval=0x7
Backup=0.0.0.0:0
Sensor=0x0
SensePwr=0x0
<4.41>
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

I also don't see anything wrong with it :(
Just to answer on the phone app graph, it is generated from the portal database. If the portal doesn't have, your app won't have either.
Everything seems fine, but yet the portal doesn't update.
If you connect the controller to the usb programming cable and open coolterm at 57600 baud, does it print something every 5 minutes?
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

It actually is spitting out information...does the below look like what you'd expect?

Code: Select all

GET /status/submitp.aspx?t1=662&t2=0&t3=0&ph=1057&id=nyknicks4412&em=0&em1=0&rem=0&bid=1&key=&ddns=controller&af=0&sf=0&atohigh=0&atolow=0&r=255&ron=0&roff=255


GET /status/submitp.aspx?t1=662&t2=0&t3=0&ph=1058&id=nyknicks4412&em=0&em1=0&rem=0&bid=1&key=&ddns=controller&af=0&sf=0&atohigh=0&atolow=0&r=255&ron=0&roff=255
Noticed some behavior I am not sure is normal or not. When I connect via coolterm I notice the controller screen goes blank for a minute and something on the relay box clicks and then it turns back on. Normal or?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status: Unreachable Address

Post by lnevo »

Do you have a portal key configured?
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

I do not believe so...so I need to and how would I tell if I do?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status: Unreachable Address

Post by lnevo »

Check the portal settings in the portal if it s on turn it off to test first. If that's the issue you need to change the line to ReefAngel.Portal("username", "key");
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

That is so strange.
Everything is correct, but I can't seem to understand what is going on here :(
Your portal should be populating.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

Something weird I found out.
I still don't know why, but try this.
Change the DDNS keyword to something else and let me know if that works.
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

lnevo wrote:Check the portal settings in the portal if it s on turn it off to test first. If that's the issue you need to change the line to ReefAngel.Portal("username", "key");
Nope it is not on! Good thought though that would have been great if that was it. I just want this thing working so I can mount it on the tank
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

rimai wrote:Something weird I found out.
I still don't know why, but try this.
Change the DDNS keyword to something else and let me know if that works.
changed it to reeftank lets see if this is it! controller a reserved word?
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

rimai wrote:Something weird I found out.
I still don't know why, but try this.
Change the DDNS keyword to something else and let me know if that works.
I don't think that did it... :cry:

Even tried completely removing the DDNS line
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

It's something related to your forum id.
Try this:
Go to User Control Panel->profile page and type "test" on the field Reef Angel Wifi Address
Click submit and let's see if that does it.
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

rimai wrote:It's something related to your forum id.
Try this:
Go to User Control Panel->profile page and type "test" on the field Reef Angel Wifi Address
Click submit and let's see if that does it.
Put in Test and it now comes up as my wifi address on the portal page. However it does not update the page...
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

I think it is working now :)
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

rimai wrote:I think it is working now :)
Success! You must have worked some magic? Haha :D

http://forum.reefangel.com/status/banne ... s4412&t=-5

Any chance I can turn on the DDNS? I removed that line of code but would be bomb to not have to rely on no-ip.

Thanks a ton for the support on a Sunday. Wouldn't get that from a big box controller supplier.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

Should I change my forum name...lol I think it doesn't like it

http://forum.reefangel.com/status/banne ... knicks4412 gets an ASP error page
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

It should work.
Put the line back and let us know.
The banner needs the labels. Go to the portal and set the labels.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status: Unreachable Address

Post by lnevo »

shouldn't it fall back to the default values?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status: Unreachable Address

Post by rimai »

It should. I have to check why it is not.
Roberto.
nyknicks4412
Posts: 17
Joined: Thu Feb 12, 2015 8:56 pm

Re: Connection Status: Unreachable Address

Post by nyknicks4412 »

rimai wrote:It should. I have to check why it is not.
That was the issue! I just had to hit save on the defaults and it took them and is now working...good stuff :D
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status: Unreachable Address

Post by lnevo »

[THUMBS UP SIGN]
Post Reply