Relay on off and wifi module

Expansion modules and attachments
Post Reply
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Relay on off and wifi module

Post by Elevatorguy1 »

I've had an issue with one of my relay ports toggling on an off for no reason.

I think it maybe related to the wifi module. What I've noticed Is that the relay toggles very quickly every 10 to 15 minutes and if I remember correctly my RA updates the portal every 10 to 15 minutes. Could I have a problem with the wifi module cord or the module itself?
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Relay on off and wifi module

Post by cosmith71 »

I wouldn't think so.

Post your code. Do you know which relay it is?

--Colin
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: Relay on off and wifi module

Post by Elevatorguy1 »

Hey Colin,

I'm using internal memory but here's my code. I think it's the relay on box 1 port eight.

Another thing that's annoying is happening, when I turn a port off with my android tablet, I'll here the relay toggle and the port that I turned off will turn on by itself.

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


// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port2 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );

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


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

void loop()
{
ReefAngel.MoonLights( Port1 );//sump light
ReefAngel.DayLights( Port2 );//top fuge light
ReefAngel.CO2Control(Port5);
ReefAngel.StandardATO( Port6 );
ReefAngel.StandardHeater( Port7 );
ReefAngel.DayLights( Port8 );//lights fan
ReefAngel.DosingPumpRepeat1( Box1_Port5 );
ReefAngel.DosingPumpRepeat2( Box1_Port6 );

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "elevatorguy1", "****");
ReefAngel.ShowInterface();
}
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Relay on off and wifi module

Post by cosmith71 »

Port 8 on the expansion box? Strange. Maybe the VGA cable to the relay box has a bad connection? It really doesn't look like a software problem.

--Colin
Post Reply