Local Portal (i.e., local wifi page)

Related to the Portal
Post Reply
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Local Portal (i.e., local wifi page)

Post by joshlawless »

So I've got some questions about the page served up over the LAN by the Wifi module. When I go to http://192.168.1.250:2000/wifi, I see the fancier version of what is reproduced on the myreefangel.com portal, but there are some issues.

On the LAN page, I can only see the Relay expansion box, and not the main relay box.

I've added the water level expansion in my code, and expect to see a single water level data point, but the local (and, for that matter, remote) portal shows 5 channels of water level data (I only have the single water level expansion).

I see a section labeled "Ecotech Vortech" in addition to the section labeled "DC Pump" -- not sure why. No reference in my INO to Vortech.

Any input is much appreciated!

Here's my test code (not up and running yet):

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>

////// 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 
    ReefAngel.AddSalinityExpansion();  // Salinity Expansion Module
    ReefAngel.AddORPExpansion();  // ORP Expansion Module
    ReefAngel.AddWaterLevelExpansion();  // Water Level Expansion Module
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port3Bit;
    ReefAngel.FeedingModePortsE[0] = Port4Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit;
    ReefAngel.WaterChangePortsE[0] = Port4Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Box1_Port1 );
    ReefAngel.Relay.On( Box1_Port2 );

    ////// Place additional initialization code below here
    ReefAngel.CustomLabels[0]="Heater1";  
    ReefAngel.CustomLabels[1]="Heater2";  
    ReefAngel.CustomLabels[2]="Skimmer";  
    ReefAngel.CustomLabels[3]="Neck Wipe";  
    ReefAngel.CustomLabels[4]="Refugium Light";  
    ReefAngel.CustomLabels[5]="Filters";  
    ReefAngel.CustomLabels[6]="Ozone";  
    ReefAngel.CustomLabels[7]="Air Pump";  
    ReefAngel.CustomLabels[8]="Circulation";  
    ReefAngel.CustomLabels[9]="Diverter";  
    ReefAngel.CustomLabels[10]="Kalk Stirrer";  
    ReefAngel.CustomLabels[11]="ATO  Pump";  
    


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

void loop()
{
    ReefAngel.StandardHeater( Port1 );
    ReefAngel.StandardHeater( Port2 );
    ReefAngel.Relay.DelayedOn( Port3 );
    ReefAngel.DosingPumpRepeat1( Port4 );
    ReefAngel.MoonLights( Port5 );
    ReefAngel.DosingPumpRepeat2( Box1_Port3 );
    ReefAngel.WaterLevelATO( Box1_Port4 );
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = None;
    ////// Place your custom code below here
    
    if (ReefAngel.Params.ORP>450) ReefAngel.Relay.Off(Port7);
    if (ReefAngel.Params.ORP<400 && ReefAngel.Params.ORP>0) ReefAngel.Relay.On(Port7);


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

    // This should always be the last line
    ReefAngel.ShowInterface();
}
And here's a screenshot:
Screen Shot 2015-05-03 at 5.52.51 PM.png
Screen Shot 2015-05-03 at 5.52.51 PM.png (195.34 KiB) Viewed 7136 times
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Local Portal (i.e., local wifi page)

Post by joshlawless »

And, on closer inspection, I note that the Relay expansion ports are labelled 11 through 18 (instead of, as one would expect, 9 through 16).

--edit--
Which is apparently consistent with the remote portal, and even how the unlabeled ports appear on the LCD of the controller unit.
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Local Portal (i.e., local wifi page)

Post by joshlawless »

Worth mentioning that the head unit LCD display only shows one water level channel (channel 0) when scrolling through the pages.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Local Portal (i.e., local wifi page)

Post by binder »

joshlawless wrote:And, on closer inspection, I note that the Relay expansion ports are labelled 11 through 18 (instead of, as one would expect, 9 through 16).

--edit--
Which is apparently consistent with the remote portal, and even how the unlabeled ports appear on the LCD of the controller unit.
the ports are labeled 1-8. the expansion relays start with 1 and go through 8.
for expansion relays, the first number tells you what relay and the second is the port number.
expansion 1 port 5 is 15
expansion 2 port 6 is 26
expansion 3 port 3 is 33
and so forth....

this keeps things consistent and easy going to identify. if you were to keep incrementing like you would expect, it would be much harder to determine what expansion and port was in use.


Sent from my iPad mini
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Local Portal (i.e., local wifi page)

Post by binder »

the lan page is still relatively experimental. it has been updated but is not as fully functional as the portal or smartphone apps. there has been issues with the way the scripts function on different browsers (i think it's written in javascript).


Sent from my iPad mini
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Local Portal (i.e., local wifi page)

Post by joshlawless »

Glad to know it's not specific to my setup or my unit. I note that the Portal hosted here on reefangel.com also shows five channels for water level. Is this expected behavior, based on my code (in which I've got the line ReefAngel.AddWaterLevelExpansion(); )?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Local Portal (i.e., local wifi page)

Post by rimai »

Yes, expected.
Roberto.
Post Reply