Page 2 of 2

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:10 am
by Marshall O
As far as I know, yes. I only removed it when I was trying to update the firmware, but I did not have any bus locks during that time. If I do get a bus lock, I can just unattach the USB on the RF and it immediately clears it. I have tried three different ports on the expansion hub (I am not plugged into the side, as some saw less issues with it plugged in there), but this has not made a difference.

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:22 am
by rimai
Ok, let me try using a different library. Give me a couple days.

Re: Bus Lock Issues

Posted: Tue Dec 30, 2014 10:23 am
by Marshall O
Thanks Roberto!!

Re: Bus Lock Issues

Posted: Thu Jan 01, 2015 7:09 pm
by rimai
Ok, let's try this one.
Let me know how it goes.

Re: Bus Lock Issues

Posted: Thu Jan 01, 2015 8:09 pm
by lnevo
Roberto any improvements to this one or something specific for Marshall?

Re: Bus Lock Issues

Posted: Thu Jan 01, 2015 8:11 pm
by rimai
No improvements. I just used a different I2C library to see if the interferences go away. The bus locks are coming externally from something that is causing the signal to deteriorate.

Re: Bus Lock Issues

Posted: Fri Jan 02, 2015 7:02 am
by Marshall O
rimai wrote:Ok, let's try this one.
Let me know how it goes.
Thanks Roberto! I will do this tonight when I get home, and then update tomorrow :)

Re: Bus Lock Issues

Posted: Fri Jan 02, 2015 6:45 pm
by Marshall O
Well, the update did not go well. It immediately locked, and didn't clear itself. Tried again (I installed the original firmware, then re-installed the new update), and same thing. Immediately locked. So I re-installed the bus lock fix in the meantime. The only thing I can think of that would be causing my interference may be the microinverters for my photo-voltaic system. From the manual: "This equipment generates, uses and can radiate radio frequency energy..."

Re: Bus Lock Issues

Posted: Sat Jan 03, 2015 11:49 am
by rimai
Are you using the RF module for Radions or just vortech?

Re: Bus Lock Issues

Posted: Sat Jan 03, 2015 11:53 am
by Marshall O
rimai wrote:Are you using the RF module for Radions or just vortech?
Just Vortechs. (2) MP40s, (2) MP10s.

Re: Bus Lock Issues

Posted: Sat Jan 03, 2015 9:34 pm
by rimai
Something is not making sense.
If you disconnect the rf module from the hub and plug it back in, it should blink red three times and go off.
Does it eventually change colors (after a minute or so) or it stays off all the time?

Re: Bus Lock Issues

Posted: Sun Jan 04, 2015 7:36 am
by Marshall O
rimai wrote:Something is not making sense.
If you disconnect the rf module from the hub and plug it back in, it should blink red three times and go off.
Does it eventually change colors (after a minute or so) or it stays off all the time?
It blinks red 3 times, then immediately goes to the color of the mode I want to run in. It stays lit all the time.

I believe I have not gotten any locks for maybe 24 hours now. However, my Vortechs do not respond to the mode shown all of the time. They go into feeding mode no problem, and respond to changes to the internal memory, but nothing that I coded. I have them set to go to NutrientTransport mode at night. The controller says it is in NTM, however the Vortechs stay in whatever the last mode they were in. Very weird.

Re: Bus Lock Issues

Posted: Mon Jan 05, 2015 6:03 pm
by rimai
Can I see your entire code?
It was not supposed to light up after the 3 blinks.

Re: Bus Lock Issues

Posted: Wed Jan 07, 2015 7:17 am
by Marshall O
Sorry for the delay in sending this to you, but here it is:

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 <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

void setup()
{
  ReefAngel.Init(); // Initialize Controller
  ReefAngel.Use2014Screen();
  ReefAngel.AddStandardMenu();
  ReefAngel.AddDateTimeMenu();  
  ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
  ReefAngel.FeedingModePorts = Port5Bit; // Turn off Port 5 (skimmer, carbon reactor) when Feeding Mode is activated
  ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port7Bit | Port8Bit; // Turn off Ports 1 (ATO), 5 (skimmer/reactor, etc), 7 (heater) and 8 (return pump, powerhead) when Water Change Mode is activated
  ReefAngel.OverheatShutoffPorts = Port4Bit; // Turn off Ports 4 when overheat occurs
  ReefAngel.LightsOnPorts = Port3Bit | Port4Bit; // Turn on/off Ports 3 & 4 when Light On/Off menu option is selected
  ReefAngel.OverheatProbe = T2_PROBE; // Use Temperature probe 2 to check for overheat
  ReefAngel.TempProbe = T2_PROBE;
  ReefAngel.Relay.On(Port8); // Always on
  ReefAngel.Relay.On(Port6);
  ReefAngel.Relay.On(Port5);
}

void loop()
{
  ReefAngel.Portal("Marshall%20O",""); // Note I deleted my password to post this
  
  ReefAngel.WaterLevelATO(Port1,800,60,63); // On at 60% and Off at 63%, timeout 800 seconds
  
  ReefAngel.StandardLights(Port3,60); // Actinic Lights set for 60 minute offset from daylights
  ReefAngel.StandardLights(Port4); // Daylight Lights
  //ReefAngel.StandardLights(Port6,05,30,23,30); // Moon Lights on at 530A, off at 1130P
  ReefAngel.StandardHeater(Port7); // Heater
  ReefAngel.StandardFan(Port2); // Fans
  ReefAngel.Relay.DelayedOn(Port5, 60); //delay skimmer 1 hr after feed/water change
  if (ReefAngel.Params.Temp[T1_PROBE||T2_PROBE]>778) ReefAngel.Relay.Off(Port7);
  if (ReefAngel.Params.Temp[T2_PROBE]>790||ReefAngel.Params.Temp[T2_PROBE]<755) ReefAngel.PWM.SetActinic(100); else ReefAngel.PWM.SetActinic(0);
  //if (!ReefAngel.HighATO.IsActive()) ReefAngel.PWM.SetDaylight(100); else ReefAngel.PWM.SetDaylight(0);
  if (!ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off(Port1); 
  if (ReefAngel.LowATO.IsActive() || !ReefAngel.HighATO.IsActive()) ReefAngel.PWM.SetActinic(100); else ReefAngel.PWM.SetActinic(0);
    
  if (ReefAngel.DisplayedMenu!=FEEDING_MODE || ReefAngel.DisplayedMenu!=WATERCHANGE_MODE)
  {
    if (hour()>=22 && hour()<=23)
    {
      ReefAngel.RF.UseMemory=false;
      ReefAngel.RF.SetMode(NutrientTransport,100,10);
    }
     else if (hour()>=0 && hour()<2)
    {
      ReefAngel.RF.UseMemory=false;
      ReefAngel.RF.SetMode(NutrientTransport,100,10);
    }
    else if (hour()>=2 && hour()<7)
    {
      ReefAngel.RF.UseMemory=false;
      ReefAngel.RF.SetMode(TidalSwell,50,0);
    }
    else
    {
      ReefAngel.RF.UseMemory=true;
     }
  }

  
  ReefAngel.ShowInterface(); // Display everything on the LCD screen
}

Re: Bus Lock Issues

Posted: Thu Jan 08, 2015 6:24 pm
by rimai
Ok, I was able to figure out why your LED was lighting up.
There was a bug in the libraries.
Please open the RF.cpp again.
Remove the comment you added to the line the previous time.
Then you need to update the line right below it.
Both lines should look like this:

Code: Select all

			if (millis()%60000<200) lastcrc=-1;
			if ( (lastcrc!=(byte)(mode+speed+duration)) || millis()<5000 )
Save and upload the code to your RA again.
Let me know how it goes.

Re: Bus Lock Issues

Posted: Thu Jan 08, 2015 6:29 pm
by Lionfan
Is any of this common with my problems, Roberto?

Re: Bus Lock Issues

Posted: Thu Jan 08, 2015 6:37 pm
by weaverwf
Roberto, it looks like the second close paren after "duration" prematurely closes off the if clause.

Re: Bus Lock Issues

Posted: Thu Jan 08, 2015 6:38 pm
by weaverwf
Never mind delete previous

Re: Bus Lock Issues

Posted: Thu Jan 08, 2015 6:56 pm
by rimai
Lionfan wrote:Is any of this common with my problems, Roberto?
No. this is for a bus lock issue he's been having.

Re: Bus Lock Issues

Posted: Fri Jan 09, 2015 5:08 am
by Marshall O
rimai wrote:Ok, I was able to figure out why your LED was lighting up.
There was a bug in the libraries.
Please open the RF.cpp again.
Remove the comment you added to the line the previous time.
Then you need to update the line right below it.
Both lines should look like this:

Code: Select all

			if (millis()%60000<200) lastcrc=-1;
			if ( (lastcrc!=(byte)(mode+speed+duration)) || millis()<5000 )
Save and upload the code to your RA again.
Let me know how it goes.
Thanks Roberto! I will do this tonight and then update you.