Page 1 of 1

relay expansion help

Posted: Tue Sep 29, 2015 5:28 pm
by fishflipper
i just installed a expansion relay box and nothing i plug into it powers on. when i connect it to power and plug the serial cable into the expansion hub, the light on the expansion box lights. any ideas??

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:29 pm
by rimai
Try changing the ID.

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:36 pm
by fishflipper
i took the box apart and didn't see the dip switches to do that. shouldn't it power on even if not connected to the controller?

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:40 pm
by fishflipper
i found the switches and changed and it didn't help.

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:42 pm
by rimai
Try with them all on and also with them all off.

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:44 pm
by fishflipper
still no power. shouldnt it work just plugged into the wall by itself?

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:46 pm
by rimai
What do you mean work just plugged into the wall?

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:47 pm
by fishflipper
without being connected to the controller.

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:48 pm
by rimai
If it is not connected to the controller, nothing will turn on.
The controller is the one that tells which ports to turn on.
Run I2Cscanner and send the results:
http://forum.reefangel.com/viewtopic.php?p=18831#p18831

Re: relay expansion help

Posted: Tue Sep 29, 2015 5:59 pm
by fishflipper
i uploaded the code and now the controller is just blinking red

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:02 pm
by rimai
keep following the instructions on the link.
send the results on serial monitor

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:06 pm
by fishflipper
this is what happens when i plug the expansion box in directly to the controler. things flash on for a sec then off


I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D addr: 4E addr: 4F addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:09 pm
by fishflipper
here is the monitor with everything plugged back in


I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 addr: 3A addr: 3B addr: 3C found!
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48 found!
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D found! addr: 4E addr: 4F found! addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:11 pm
by rimai
3C is ID 5
it should be 38.

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:11 pm
by fishflipper
so....what does that mean?

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:17 pm
by rimai
Your module is set to ID5. You need to set it to ID1.
When you set to ID1, it will be found as 38 instead of 3C.

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:23 pm
by fishflipper
is this better? how do you read this?

I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 found! addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48 found!
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D found! addr: 4E addr: 4F found! addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

done

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:47 pm
by rimai
Almost. It found 39.
It needs to be 38

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:54 pm
by fishflipper
still not working


I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38 found!
addr: 39 addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48 found!
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D found! addr: 4E addr: 4F found! addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

done

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:55 pm
by rimai
There ya go.
38.
Now, upload your code.

Re: relay expansion help

Posted: Tue Sep 29, 2015 6:56 pm
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();
}

Re: relay expansion help

Posted: Tue Sep 29, 2015 7:09 pm
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?

Re: relay expansion help

Posted: Tue Sep 29, 2015 7:12 pm
by fishflipper
when connecting the box directly to the controller it does work.

Re: relay expansion help

Posted: Tue Sep 29, 2015 7:16 pm
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.

Re: relay expansion help

Posted: Tue Sep 29, 2015 7:50 pm
by rimai
No, you can only use one hub per system.
The signal won't propagate to the 2nd hub.

Re: relay expansion help

Posted: Tue Sep 29, 2015 7:55 pm
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

Re: relay expansion help

Posted: Wed Oct 07, 2015 3:16 pm
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?

Re: relay expansion help

Posted: Wed Oct 07, 2015 3:41 pm
by rimai
No. It can't.
Did you run out of ports in the hub?

Re: relay expansion help

Posted: Wed Oct 07, 2015 3:57 pm
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