relay expansion help

Expansion modules and attachments
Post Reply
fishflipper
Posts: 121
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

here is the code i uploaded and it is still not working.

#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.AddPHExpansion(); // pH Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
ReefAngel.AddHumidityExpansion(); // Humidity Expanion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port7Bit;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit;
ReefAngel.OverheatShutoffPortsE[0] = 0;
// Ports turned off when Leak is detected
ReefAngel.LeakShutoffPorts = Port8Bit;
ReefAngel.LeakShutoffPortsE[0] = 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( 835 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port2 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
ReefAngel.Relay.On( Box1_Port5 );
ReefAngel.Relay.On( Box1_Port6 );
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.StandardLights( Port7,13,0,22,30 );
ReefAngel.WaterLevelATO( Port8,25,80,90 );
////// Place your custom code below here

if (ReefAngel.WaterLevel.GetLevel()>0 && ReefAngel.WaterLevel.GetLevel() < 80) ReefAngel.Relay.On(Port8);
if (ReefAngel.WaterLevel.GetLevel() >=85) ReefAngel.Relay.Off(Port8);


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

// This should always be the last line
ReefAngel.Portal( "fishflipper" );
ReefAngel.DDNS( "nickgrill.getmyip.com" ); // Your DDNS is fishflipper-nickgrill.getmyip.com.myreefangel.com
ReefAngel.ShowInterface();
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

Humm.
Can you swap svga cables with the main box?
If it still doesn't work, can you test the relay box itself as the main box?
Roberto.
fishflipper
Posts: 121
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

when connecting the box directly to the controller it does work.
fishflipper
Posts: 121
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

ugh!!! all this and its seems to be the expansion hub. plugged the relay into my other hub and the lights came on. do the expansion hubs just plug into each other to work, right? the light was on so i thought it was working.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

No, you can only use one hub per system.
The signal won't propagate to the 2nd hub.
Roberto.
fishflipper
Posts: 121
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

Oh, really? Any future thoughts of adding it? Can the usb port on the expansion box still be used?

Sent from my SAMSUNG-SM-G900A using Tapatalk
fishflipper
Posts: 121
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

Robert, i just want to say thank you for the quick replies and the help on this matter the other night. everything is working great! i do have one more question though.....i know you said only one expansion hub is supported but can the usb port on the expansion module still be used?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: relay expansion help

Post by rimai »

No. It can't.
Did you run out of ports in the hub?
Roberto.
fishflipper
Posts: 121
Joined: Fri Jul 03, 2015 8:29 am

Re: relay expansion help

Post by fishflipper »

No, not yet. This relay box is on a second tank with a 15 foot usb cable and I only had one so was hoping to not have to run another one to the hub.

Sent from my SAMSUNG-SM-G900A using Tapatalk
Post Reply