Portal not displaying relay activity and web chart info

Related to the Portal
Post Reply
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Portal not displaying relay activity and web chart info

Post by Appleseed »

Hi,

for some reason (possibly due to my own erroneous input) the relay activity and web charts contain no info.

I have also noticed that when the portal opens it initially shows a last update date of 5/12/2012 and then after the first refresh changes to today's date.

Can anyone advise what I may have done wrong?

cheers
Attachments
portal 1.jpg
portal 1.jpg (56.92 KiB) Viewed 6371 times
portal 2.jpg
portal 2.jpg (58.74 KiB) Viewed 6371 times
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Portal not displaying relay activity and web chart info

Post by lnevo »

It is most likely something in the code that is causing SendPortal not to run. Check if you turned on the portal key and it matches your code, otherwise can you post your ino.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

I dont use a portal key

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 <ReefAngel.h>

////// Place global variable code below here
  // Globals Needed for RF Mode on Custom Main
    byte vtechmode;    byte vtechspeed;
    byte vtechpercent;
    boolean bFeeding=false;
    
      byte x = 6;
      byte y = 2;
      byte t;
      char text[7];

    //Custom Main, Graph & Menu

    void DrawCustomMain()
    {
//      ReefAngel.LCD.DrawDate(6, 2);
      ReefAngel.LCD.DrawText(3,255,6,2," Reef of Low");

      ReefAngel.LCD.DrawDate(7, 120);
      ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
      pingSerial();

/*
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 6, 90, "--------------------");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 6, 126, "--------------------");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 2, 93, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 2, 103, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 2, 113, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 2, 123, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 126, 93, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 126, 103, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 126, 113, "|");
      ReefAngel.LCD.DrawText(COLOR_TOMATO,255, 126, 123, "|");
*/


      vtechmode=ReefAngel.RF.Mode;
      vtechspeed=ReefAngel.RF.Speed;
      vtechpercent=ReefAngel.RF.Duration;
      
      ReefAngel.LCD.Clear(255, 35, 20, 20, 85);
      
      ReefAngel.LCD.DrawText(0,255,18,21,"EcoSmart Mode");
      if (vtechmode == 0) ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,25,31,"Constant");
      else if(vtechmode == 1) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,25,31,"Lagoonal");
      else if (vtechmode == 2) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,25,31,"Reef Crest");
      else if (vtechmode == 3) ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,25,31,"Short Pulse");
      else if (vtechmode == 4) ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,25,31,"Long Pulse");
      else if (vtechmode == 5) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,25,31,"STM_NTM.");
      else if (vtechmode == 6) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,25,31,"Tidal Swell");
      else if (vtechmode == 9) ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,45,31,"Night");
//
      char text[10];

     ReefAngel.LCD.DrawText(2,255,32,42,"Speed");
     ConvertNumToString(text, vtechspeed, 1);
     if (vtechspeed )ReefAngel.LCD.DrawLargeText(0,255,35,51,text);
     
     ReefAngel.LCD.DrawText(23,255,32,62,"Duration");
     ConvertNumToString(text, vtechpercent, 1);
     if (vtechpercent) ReefAngel.LCD.DrawLargeText(0,255,35,70,text);
//    
      ReefAngel.LCD.DrawText(0,255,10,80,"Tank");
      ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
      ReefAngel.LCD.DrawLargeText(COLOR_RED, 255, 10, 88, text, Num8x8);
      pingSerial();

      ReefAngel.LCD.DrawText(0,255,100,80,"pH");
      ConvertNumToString(text, ReefAngel.Params.PH, 100);
      ReefAngel.LCD.DrawLargeText(COLOR_INDIGO, 255, 85, 88, text, Num8x8);
      pingSerial();
//
      pingSerial();
      byte TempRelay = ReefAngel.Relay.RelayData;
      TempRelay &= ReefAngel.Relay.RelayMaskOff;
      TempRelay |= ReefAngel.Relay.RelayMaskOn;
      ReefAngel.LCD.DrawOutletBox(12, 100, TempRelay);
//
    }
    void DrawCustomGraph()
    {
    }


////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port4Bit | Port7Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 290 );

    // Ports that are always on
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port7 );
//    ReefAngel.Relay.On( Port8 );
    
//   if (!ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off(Port7); // Turn Skimmer off if Return is off and water level increases in sump
//    ReefAngel.Relay.Set(Port7,ReefAngel.LowATO.IsActive()); // Turn Skimmer on if Return is on and water level in the sump is normal
  
  
////// Place additional initialization code below here
    

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

void loop()
{
    ReefAngel.StandardHeater( Port1,251,261 );
    ReefAngel.StandardHeater( Port2,251,261 );
//    ReefAngel.StandardFan( Port3,271,281 );
//    ReefAngel.StandardLights( Port3,20,0,5,0 );

//    ReefAngel.StandardLights( Port6,20,0,0,0 );

    ReefAngel.StandardLights( Port5,21,0,10,0 );
//    ReefAngel.DosingPumpRepeat( Port8,0,180,30);
	ReefAngel.CO2Control ( Port8,604,615 ); //was 635 - 645
    ReefAngel.DosingPumpRepeat( Port3,0,180,120);
   ////
    ReefAngel.RF.UseMemory = false;
///////
//    ReefAngel.RF.SetMode(Constant,80,5);
//    ReefAngel.RF.SetMode(Random2,50,5);
//    ReefAngel.RF.SetMode(Smart_NTM,50,10);
//    ReefAngel.RF.SetMode(Smart_NTM,60,8);
//    ReefAngel.RF.SetMode(Custom,30,0); //Custom Mode Sync
//    ReefAngel.RF.SetMode(Custom,50,1); //Custom Mode Anti-Sync
//    ReefAngel.RF.SetMode(Custom,50,2); //Custome Mode Back of tank

         
///////    ATTEMPT TO CHANGE MODE @ TIMES
if ( ReefAngel.RF.Mode != Feeding_Start)
  
          if (hour()==10)
            ReefAngel.RF.SetMode(ReefCrest,30,20);
//
         else if (hour()>=0 && hour()<1)
            ReefAngel.RF.SetMode(Lagoon,80,15);           
            
         else if (hour()>=1 && hour()<2)
            ReefAngel.RF.SetMode(Lagoon,60,20);            
            
         else if (hour()>=2 && hour()<3)
            ReefAngel.RF.SetMode(Lagoon,50,25);            
            
         else if (hour()>=3 && hour()<4)
            ReefAngel.RF.SetMode(Lagoon,60,20);                     
            
         else if (hour()>=4 && hour()<5)
            ReefAngel.RF.SetMode(Lagoon,70,10);
            
         else if (hour()>=5 && hour()<6)
           ReefAngel.RF.SetMode(Lagoon,60,15);            
            
         else if (hour()>=6 && hour()<7)
            ReefAngel.RF.SetMode(Lagoon,50,20);                     
            
         else if (hour()>=7 && hour()<8)
            ReefAngel.RF.SetMode(Lagoon,40,30);                     
            
         else if (hour()>=8 && hour()<9)
            ReefAngel.RF.SetMode(Lagoon,50,20);                     
            
         else if (hour()>=9 && hour()<10)
            ReefAngel.RF.SetMode(Lagoon,60,10);
            
         else if (hour()>=10 && hour()<11)
            ReefAngel.RF.SetMode(Lagoon,80,5);
            
          else if (hour()>=11 && hour()<12)
            ReefAngel.RF.SetMode(Smart_NTM,90,6);
          
          else if (hour()>=12 && hour()<13)
            ReefAngel.RF.SetMode(Smart_NTM,80,10);
            
          else if (hour()>=13 && hour()<14)
            ReefAngel.RF.SetMode(Smart_NTM,70,12);
            
          else if (hour()>=14 && hour()<15)
            ReefAngel.RF.SetMode(Smart_NTM,60,10);
            
          else if (hour()>=15 && hour()<16)
            ReefAngel.RF.SetMode(Smart_NTM,40,8);
            
          else if (hour()>=16 && hour()<17)
            ReefAngel.RF.SetMode(Lagoon,50,10);

          else if (hour()>=17 && hour()<18)
            ReefAngel.RF.SetMode(Lagoon,80,10);            

          else if (hour()>=18 && hour()<19)
            ReefAngel.RF.SetMode(Constant,60,10);                        

          else if (hour()>=19 && hour()<20)
            ReefAngel.RF.SetMode(Constant,50,10);                        

          else if (hour()>=20 && hour()<21)
          ReefAngel.RF.SetMode(Constant,40,10);   

          else if (hour()>=21 && hour()<22)
            ReefAngel.RF.SetMode(Constant,45,10);

          else if (hour()>=22 && hour()<23)
            ReefAngel.RF.SetMode(Constant,50,10);

          else if (hour()>=23 && hour()<0)
            ReefAngel.RF.SetMode(Lagoon,50,15);            
//
          else
            ReefAngel.RF.SetMode(ReefCrest,40,8);
            
    ////// Place your custom code below here
    
    if (hour()>=8 && hour()<10)
  ReefAngel.PWM.SetDaylight( LongPulseMode(0,40,10,true) ); // Long pulse at 40% with 10s pulse on sync mode
 
    else if (hour()>=10 && hour()<16)
  ReefAngel.PWM.SetDaylight( NutrientTransportMode(75,90,2000,true) ); // Nutrient Transport on sync mode
 
    else if (hour()>=16 && hour()<17)
  ReefAngel.PWM.SetDaylight( ReefCrestMode(80,20,true) ); // ReefCrest at 75% + - 20 on sync mode
 
    else if (hour()>=17 && hour()<20)
     ReefAngel.PWM.SetDaylight( LongPulseMode(0,60,4,true) );
//  ReefAngel.PWM.SetDaylight( NutrientTransportMode(75,90,2000,true) ); // Nutrient Transport on sync mode

     
    else if (hour()>=20 && hour()<24)
  ReefAngel.PWM.SetDaylight( TidalSwellMode(60,true) ); // Tidal Swell at 60% on sync mode
 
     else
  ReefAngel.PWM.SetDaylight( LongPulseMode(0,40,10,true) ); // Long pulse at 40% with 10s pulse on sync mode
 


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

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


Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Portal not displaying relay activity and web chart info

Post by lnevo »

Hmm only thing I can see is that you are using username appleseed but your forum name is Appleseed. Not sure if this is case-sensitivd.

Make sure that in the portal settings page the key is in fact disabled. Thats all I can see that could be causing it..
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

I changed my id to Appleseed (thanks to my awesome bluetooth adapter I didnt have to leave my workstation :D )
but it does not seem to have made any difference
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal not displaying relay activity and web chart info

Post by rimai »

The forum username in the portal is not case sensitive, so it wouldn't make a difference.
I'm thinking it is something in your wifi attachment.
What did you use to configure it?
Dave's wify utility or the one that came with the RA installer?
Roberto.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

I configured it by hand :/ via the usb serial console using the set commands.
Image
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

<2.35> get e
WiFly Ver 2.35, 06-12-2012 on RN-131
Beacon=100
Probe=5
Reboot=0
OPEN=
CLOSE=
REMOTE=
FlushSize=1024
MatchChar=0
FlushTimer=10
IdleTimer=0
CmdChar=$
IF=UP
DHCP=OFF
IP=172.16.254.200:2000
NM=255.255.255.0
GW=172.16.254.1
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
DNS=194.168.4.100
Name=server1
Backup=backup2
FTP=208.109.14.133:21
File=wifly-GSX.img
User=roving
Pass=Pass123
Dir=public
Timeout=200
FTP_mode=0x0
SSID=reef_mon
Chan=0
ExtAnt=0
Join=1
Auth=WPA2
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=0
Passphrase=1234567890
SleepTmr=0
WakeTmr=0
Trigger=0x1
Autoconn=0
IoFunc=0x0
IoMask=0x20f0
IoValu=0x0
DebugReg=0x0
PrintLvl=0x1
TimeEna=0
TIMEADR=129.6.15.28:123
Zone=7
Baudrate=57600
Flow=0x0
Mode=0x0
Cmd_GPIO=0
JoinTmr=1000
Replace=0x24
DeviceId=WiFly-GSX
Password=
Format=0x0
Signal=0
Average=5
BCAST=255.255.255.255:55555
Interval=0x7
Sensor=0x0
SensePwr=0x0
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Portal not displaying relay activity and web chart info

Post by lnevo »

Host is not set properly

It needs to point to portal ip
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

I assume you mean;

HOST=0.0.0.0:2000

should it be 198.171.134.6:80
Image
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

I think I set it to the host 0.0.0.0 when I was having issues with the wifi module.. :/
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal not displaying relay activity and web chart info

Post by rimai »

Correct...
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Portal not displaying relay activity and web chart info

Post by lnevo »

Appleseed wrote:I assume you mean;

HOST=0.0.0.0:2000

should it be 198.171.134.6:80
Yes, but not sure what else might be missing. That was a big red flag :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal not displaying relay activity and web chart info

Post by rimai »

I would also change the idletimer to 3
IdleTimer=0
Roberto.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

cool, set the idletimer to 3, will try again and see what happens.
Image
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

one other stupid question, is it necessary to power off the head-unit when connecting/disconnecting the bluetooth and wifi modules? I usually do but was not sure if i should or should not.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Portal not displaying relay activity and web chart info

Post by lnevo »

Not for wifi, maybe for bt
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal not displaying relay activity and web chart info

Post by rimai »

They are both hot swappable
Roberto.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

I assume you mean they are hot swappable?.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal not displaying relay activity and web chart info

Post by rimai »

sorry... yeah.. :oops:
I fixed it
Roberto.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

rimai wrote:sorry... yeah.. :oops:
I fixed it
:D

It seems the relay and web banners still not being updated. The portal does show the correct ph, temps etc.
Unless im being to impaitent...

I can connect to my RA using the android app (via the mobile network), so i assume my nat etc is working.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Portal not displaying relay activity and web chart info

Post by rimai »

Please check these settings against yours.
This is the macro file I use to program the units:

Code: Select all

send '$$$'
wait 'CMD'
sendln 'set ftp address 198.175.253.161'
wait'AOK'
sendln 'save'
wait 'config'
sendln 'set wlan ssid testing'
wait 'AOK'
sendln 'set wlan pass a01b02c03d'
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 c i 3'
wait 'AOK'
sendln 'set dns name www.reefangel.com'
wait 'AOK'
sendln 'set i h 198.171.134.6'
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'
Roberto.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

Ill reconfigure it using the relevant parameters.

I did try use the Wifi Attachment Setup Utility to reconfigure it but kept getting the error "Please disconnect and then reconnect the Reef Angel Wifi Attachment from the USB-TTL cable and try again" which reminded my why i manually configured the module :/
Image
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Portal not displaying relay activity and web chart info

Post by Appleseed »

Whoo hoo, i reconfigured it using that script but with a static IP and it seems to be working :D


thanks again for all your help.

It now beer time :D
Image
Post Reply