Portal, data logging, app issues

Related to the Portal
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Portal, data logging, app issues

Post by reefoffillory »

Hi, new reef angel owner here [used unit - new owner]

I got my wifi set up to where the Android app will show data while on my home network, but not outside of the network.

My computer is able to access the portal using my internal and external IP, and update data from inside or outside of my home network.

My phone is not able to [through chrome app] display/update data from the controller.

Port forwarding for port 2000 is open and working [hence I can access it from my work computer for example]

The portal on the website is not working. It does not show me any parameters. Connection Status: Unreachable

My code includes the portal("reefoffillory") and ddns(home). I am also unable to access anything using http://reefoffillory-home.myreefangel which is what my code is set up to direct

I also don't get any data for graphs, and I would like to be able to access/save/download data which will pull every [# of minutes] so That I can correlate changes in my tank with activities such as dosing/lights on/off, refugium light on/off etc.


Any help is greatly appreciated! I'm happy to have figured out port forwarding. I messed up my network about 5 times before I got it to work from outside of my network. The Portal and ddns has never worked for me since getting the controller.


Thanks!

Austin
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

When I access the page using my external [or internal] IP + port/wifi I can't get any graphs either. I get a 'No data to display' message.

I was also hoping to maybe get an Amazon fire tablet to hook up to the controller and keep in/on the tank cabinet. Will this work?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Try deleting the ddns line.
I think that is broken when we switched servers.
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Try deleting the ddns line.
I think that is broken when we switched servers.
I will try that when I get home tonight. The setup wizard automatically added that into my code that I uploaded.

Any idea why the android app won't connect to the controller from outside the network, but I can get the info [and control outlets] from outside the server using my IP on my work computer?

Any ideas about logging/why graphing isn't working? - Is this related to the server?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Yes, graph is but the android is not.
The android phone should work since your work computer is able to.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Portal, data logging, app issues

Post by binder »

i would make sure you have the right ip in the android app. the setup can default to an internal network address or it will default to using the ddns value for the domain name. so most likely the configuration needs to be updated in the app for it to work properly. check the settings page to see what it is set to.


Sent from my iPad using Tapatalk
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

binder wrote:i would make sure you have the right ip in the android app. the setup can default to an internal network address or it will default to using the ddns value for the domain name. so most likely the configuration needs to be updated in the app for it to work properly. check the settings page to see what it is set to.


Sent from my iPad using Tapatalk
I had a 5 where there should have been a 6, for my External IP address. Got that part fixed! Thanks for pointing me to the IP configuration
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

#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.AddStandardMenu(); // 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 = Port3Bit | Port4Bit;
// 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( 800 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
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( Port3,8,30,21,0 );
ReefAngel.StandardLights( Port4,8,37,20,54 );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "reefoffillory" );
ReefAngel.ShowInterface();
}
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

Portal with above code
Attachments
Screenshot_20171102-191446.png
Screenshot_20171102-191446.png (101.28 KiB) Viewed 7427 times
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Ahhh. I just realized you bought this unit used.
You will need to update the wifi attachment to point to the correct server:
http://forum.reefangel.com/viewtopic.php?f=3&t=4601
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Ahhh. I just realized you bought this unit used.
You will need to update the wifi attachment to point to the correct server:
http://forum.reefangel.com/viewtopic.php?f=3&t=4601
When doing this on Tera Term i'm getting 'Stary WiFly module configuration'

I have the Wifi Module plugged in to the computer, green light is flashing
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

reefoffillory wrote:
rimai wrote:Ahhh. I just realized you bought this unit used.
You will need to update the wifi attachment to point to the correct server:
http://forum.reefangel.com/viewtopic.php?f=3&t=4601
When doing this on Tera Term i'm getting 'Stary WiFly module configuration'

I have the Wifi Module plugged in to the computer, green light is flashing
I changed it to COM3, and now it's slowly going through numbers after 'ftp:##:wait 'AOK'
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

Got through it to where it gave me the option to 'Start WiFly module configuration' again, so I plugged the WiFi attachment back into the Reef Angel and the portal's still not working. My IP [internal and external] is still working though

Is there a way for me to log/store the data from my reef angel through my Internal.IP:2000/wifi or External.IP:2000/wifi?

And/Or auto-update and receive messages based upon parameters?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Can you post the log of tera term?
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Can you post the log of tera term?
Is this what you're looking for?


x=0
while x<>121

messagebox 'Start WiFly module configuration' 'Webscan Config Program'

;this macro all sent with 5 msec character delay
timeout=10
send '$$$'
wait 'CMD'
sendln 'factory RESET'
wait 'Set Factory Defaults'

sendln 'reboot'
wait '*READY*'

;----------------------------------------
; Begin user settings


send '$$$'
wait 'CMD'
sendln 'set ftp address 198.175.253.161'
wait'AOK'
sendln 'save'
wait 'config'
sendln 'set wlan ssid Matties$2.4'
wait 'AOK'
sendln 'set wlan pass Password'
wait 'AOK'
sendln 'set option deviceid ReefAngelWifi'
wait 'AOK'
sendln 'set w j 1'
wait 'AOK'
sendln 'set c c 0'
wait 'AOK'
sendln 'set c r 0'
wait 'AOK'
sendln 'set c o 0'
wait 'AOK'
sendln 'set i d 1'
wait 'AOK'
sendln 'set c i 3'
wait 'AOK'
sendln 'set dns name www.reefangel.com'
wait 'AOK'
sendln 'set i h 104.36.18.155'
wait 'AOK'
sendln 'set i r 80'
wait 'AOK'
sendln 'set i f 0x06'
wait 'AOK'
sendln 'set s t 0x10'
wait 'AOK'
sendln 'set u m 2'
wait 'AOK'
sendln 'set i p 2'
wait 'AOK'
sendln 'set u b 57600'
wait 'AOK'
sendln 'set s p 0'
wait 'AOK'
sendln 'set c s 1420'
wait 'AOK'

sendln 'save'
wait 'config'

sendln 'save user'
wait 'user'

sendln'reboot'


;inputbox 'Configure another module (y/n)' 'WiFly Config Program'

; convert inputstr to ASCII int value
; str2code x inputstr

endwhile
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

I changed the baudrate and it did something different this time. That might have been the issue
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

CMD
factory RESET
Set Factory Defaults
<4.41> reboot
*Reboot*CMD
set ftp address 198.175.253.161
AOK
<4.41> save
Storing in config
<4.41> set wlan ssid Matties$2.4
AOK
<4.41> set wlan pass Password
AOK
<4.41> set option deviceid ReefAngelWifi
AOK
<4.41> set w j 1
AOK
<4.41> set c c 0
AOK
<4.41> set c r 0
AOK
<4.41> set c o 0
AOK
<4.41> set i d 1
AOK
<4.41> set c i 3
AOK
<4.41> set dns name http://www.reefangel.com
AOK
<4.41> set i h 104.36.18.155
AOK
<4.41> set i r 80
AOK
<4.41> set i f 0x06
AOK
<4.41> set s t 0x10
AOK
<4.41> set u m 2
AOK
<4.41> set i p 2
AOK
<4.41> set u b 57600
AOK
<4.41> set s p 0
AOK
<4.41> set c s 1420
AOK
<4.41> save
Storing in config
<4.41> save user
Storing in user
<4.41> reboot
*Reboot*HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 03 Nov 2017 02:41:07 GMT
Connection: close
Content-Length: 326

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Verb</h2>
<hr><p>HTTP Error 400. The request verb is invalid.</p>
</BODY></HTML>
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 03 Nov 2017 02:41:23 GMT
Connection: close
Content-Length: 326

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Verb</h2>
<hr><p>HTTP Error 400. The request verb is invalid.</p>
</BODY></HTML>



I believe the Bad Requests came when I hit ctrl+C to to copy the text so that I could paste it here.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Good. Try to use it now.
It takes 5 minutes for the connection to go through. So, please allow 5 minutes before you check if the portal received any data.
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

awesome - it's working now! Thanks Roberto!
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Good. Try to use it now.
It takes 5 minutes for the connection to go through. So, please allow 5 minutes before you check if the portal received any data.

Got the portal working, and the app is working when I open it manually, but I keep getting error notifications on the app

Error 15: Timeout connecting to [IP address]
Error 13: Software caused connection abort
Error 13
Error 15
Error 13
Error 15
Error 13
Error 13: timeout
Error 13: No route to host
Error 13: Unexpected status line:GET / status/submitp.aspx?t1=771&t2=771&t3=771&ph761

I've also had problems with the skimmer/ATO not doing the delay after feeding/water change mode. I used the wizard to set up my code, and set the skimmer to have a 15min delay, the ATO to have a 20min delay.

I don't see anything in the code though to tell the controller to do the delays?

Also, I can't seem to be able to set my refugium light for anything less than 'opposite of display tank light outlet'

I'd like to be able to run my refugium for 8hours instead of 12 hours. Is this not possible using the wizard?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Can you post your code?
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Can you post your 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 <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.AddStandardMenu(); // Let's use 2014 Screen
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port3Bit | Port4Bit | Port8Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // 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.StandardHeater( Port2 );
    ReefAngel.ActinicLights( Port3 );
    ReefAngel.DayLights( Port4 );
    ReefAngel.Relay.DelayedOn( Port5 );
    ReefAngel.Relay.DelayedOn( Port7 );
    ReefAngel.Relay.Set( Port8, !ReefAngel.Relay.Status( Port4 ) );
    ////// Place your custom code below here
    

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

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


I changed the part about the standard menu [as advance as my arduino/coding knowledge goes] and I changed the last part about the portal [that you said to do earlier]

I got this coding after using the Wizard
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Well, you are using internal memory code and we can't see the settings you are using.
But, I just reread the post and there is no such thing as delayed start after feeding in the wizard.
For lights, if you use hard coded settings, you can pick the time to start and stop.
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Well, you are using internal memory code and we can't see the settings you are using.
But, I just reread the post and there is no such thing as delayed start after feeding in the wizard.
For lights, if you use hard coded settings, you can pick the time to start and stop.

I must have misunderstood the wording from the wizard, I thought it said under 'delayed start' that it's the amount of time that outlets are shut off after entering feeding and/or waterchange mode.

Is it better to use internal memory code or another type? I'm guessing this is in relation to the second screen of the wizard? I don't really need to be able to adjust the settings in the portal - I don't mind hooking my laptop up to the RA in order to change settings
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Yes, you better off using hard coded settings.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Portal, data logging, app issues

Post by binder »

delayed start is the amount of time the outlet remains OFF after one of the following: exiting water change mode, feeding mode and controller start up

so if you set port1 to have a 1 minute delayed start, it won’t turn on until 1 minute after you have 1 of the 3 previously mentioned scenarios.

this is useful if you have a powerhead that is out of the water during water changes and it takes your return pump a minute to get the water level back up to normal. so you wouldn’t want that powerhead on and running out of the water immediately after your water change.


Sent from my iPad using Tapatalk
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

binder wrote:delayed start is the amount of time the outlet remains OFF after one of the following: exiting water change mode, feeding mode and controller start up

so if you set port1 to have a 1 minute delayed start, it won’t turn on until 1 minute after you have 1 of the 3 previously mentioned scenarios.

this is useful if you have a powerhead that is out of the water during water changes and it takes your return pump a minute to get the water level back up to normal. so you wouldn’t want that powerhead on and running out of the water immediately after your water change.


Sent from my iPad using Tapatalk
That was how I intended to use it, I wanted my skimmer to stay off for 15 minutes, and my ATO to stay off for 20 minutes (how I set it up in the wizard) but it's not working, going to try again sometime this week
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal, data logging, app issues

Post by rimai »

Unless someone changed the libraries, the delayedstart is only applicable to power on delays.
Roberto.
reefoffillory
Posts: 20
Joined: Tue Sep 19, 2017 6:36 pm

Re: Portal, data logging, app issues

Post by reefoffillory »

rimai wrote:Unless someone changed the libraries, the delayedstart is only applicable to power on delays.
I tried searching the forum for information, but couldn't find anything. Am I able to download the data in the portal history to a form which is able to be manipulated such as a comma delimited/excel etc. file?

I'd like to be able to log my data for more than 3 days at a time, even if that means I have to download data every 3 days and compile it into a spreadsheet myself.

Is there already the capability to do this? I only see the option on the webchart to export image files

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

Re: Portal, data logging, app issues

Post by rimai »

Sure. You can get a json formatted file.
http://forum.reefangel.com/status/jsonp ... &filter=t1
Roberto.
Post Reply