Controller randomly resetting

Basic / Standard Reef Angel hardware
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Controller randomly resetting

Post by Meshmez »

So I have issues where my controller would randomly reset from time to time. I normally notice it because I have wave makers set up, but I have them overridden to always on through the android app. When it resets it resets my overrides. It also sets the Pwm percentages to 20% when it happens when the lights are not on.

So up until today it has been totally sporadic it would happen once or twice then not again for weeks. Tonight it has been happening frequently so I stood there watching the controller... The orange light on the wifi adapter flashes a couple times, then the controller goes blank with the red status light on, then the orange wifi light flashes a couple times again and the controller comes back on reset. It has been happening every 5-7 min since about 11 pm tonight, and is still doing it now.

I can't post my code right now because im not at the computer with it, but absolutely nothing has changed. I haven't uploaded anything to the controller in probably 6+ months...

Any ideas?
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

Same thing here with the resets, though I cannot confirm about the yellow lights flashing before the reset. I did notice they flashed during the reset I just witnessed, though. My controller has been fairly stable before about 4am today. I know because I have been woken up by the buzzer during each reset. I am not sure how often, but I would venture to say it has reset about every 20~40 minutes.

I also noticed that no data has been logged in the portal since 12:30am or so. Considering that, plus the network activity lights, could this be some sort of attack/probe on the controller?
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: Controller randomly resetting

Post by Meshmez »

so I finally gave up last night and went to bed. this morning I could tell it had reset at least one more time during the night. so far since about 7am this morning there have been no resets. *knock on wood*
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

I think mine stopped resetting since I posted my message; the controller appears to be stable now. Also, the portal has begin collecting data again, with a gap from 12:30am to about 9:30am.

Roberto, did you flip a switch or something?
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: Controller randomly resetting

Post by Meshmez »

looking at portal, the line on the temp charts is continuous, but I noticed a random blip in the chart. Run the mouse over it and sure enough one data point is Monday July 29, 10:54PM, the next is Tues July 30, 7:18AM....
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

Meshmez: you must be on Pacific time? I am on Central.
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: Controller randomly resetting

Post by Meshmez »

yep, pacific. so our times almost line up.

I also just noticed that my PH according to portal has been 8.0 for as long as the chart shows. I can assure you my PH is not that stable, and the android app shows differently...
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: Controller randomly resetting

Post by Meshmez »

Here is my code... not sure if no one has any idea what could be wrong, or if you're waiting for this....

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

void setup()
{
  ReefAngel.Init(); // Initialize Controller
  ReefAngel.FeedingModePorts = Port5Bit | Port6Bit; // Turn off Ports 5 and 6 when Feeding Mode is activated
  ReefAngel.OverheatShutoffPorts = Port7Bit; // Turn off Port 7 when overheat occurs
  ReefAngel.LightsOnPorts = Port3Bit | Port4Bit; // Turn on/off Ports 3 and 4 when Light On/Off menu option is selected
  ReefAngel.OverheatProbe = T1_PROBE; // Use Temperature probe 1 to check for overheat
  
}

void loop()
{
  ReefAngel.LCD.DrawLargeText(COLOR_STEELBLUE,COLOR_WHITE,28,121,"Reef Angel"); // Display Reef Angel banner
  //ReefAngel.StandardATO(Port1); // Standard ATO
  
  //Lighting
  
  if ( hour() >= 20 || hour () <= 3 )
  {
    ReefAngel.MoonLights(Port2); // Moonlights or Refugium
  }
  else
  {
    ReefAngel.Relay.Off(Port2);
  }
  
  ReefAngel.StandardLights(Port3,60); // Actinic Lights with 60 minute offset
  ReefAngel.PWM.ActinicPWMParabola(60);
  
  ReefAngel.StandardLights(Port4); // Daylight Lights at set time
  ReefAngel.PWM.DaylightPWMParabola();
  
  
  // wavemaker functions
  ReefAngel.WavemakerRandom1(Port5,15,40); // Turn Port5 on/off random cycles that lasts from 15 to 40 secs
  ReefAngel.WavemakerRandom2(Port6,15,40); // Turn Port6 on/off random cycles that lasts from 15 to 40 secs
  
  // Heater
  if (ReefAngel.Params.Temp[T2_PROBE]<= 760)
  {
    ReefAngel.StandardHeater(Port7,770,790); // Heater
  }
  if (ReefAngel.Params.Temp[T1_PROBE]<= 770)
  {
    ReefAngel.StandardHeater(Port7,770,790); // Heater
  }
  else
  {
    ReefAngel.Relay.Off(Port7);
  }
  
  // Dosing
  int RunTime = InternalMemory.read_int(150);
  //Calcium
  ReefAngel.DosingPumpRepeat(Port1,15,60, ((RunTime/1.18)*60)/24);

  // Alkalinity

  if ( hour() >= 1 && hour () <= 13 )
  {
    ReefAngel.DosingPumpRepeat(Port8,0,30, ((((RunTime/1.25)*60)/3)/24)*2);
  }
  else
  {
    ReefAngel.DosingPumpRepeat(Port8,0,30,((((RunTime/1.25)*60)/3)/24));
  }
  
  
  ReefAngel.Portal("meshmez");
  ReefAngel.ShowInterface(); // Display everything on the LCD screen
  

}
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

Mine had been stable from July 30 at about 9:00am until just now when it reset for no reason. Any thoughts on the cause?
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

Reset again...
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

After another reset I have unplugged the wifi to test if that is the issue.
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

I waited until it was time for the MH to turn off so they would not be affected by reboots, then plugged the wifi back in. I had the wifi unplugged for over two hours, and the system was stable. It reset after about 8 minutes once the wifi was plugged back in. I also turned off port forwarding, in case there was some sort of attack or probe going on.

At this point my conclusion is the wifi module is causing reboots. Not sure why though, since nothing has changed recently.

Roberto, do you know any way for me to test the wifi module, or method of confirming the wifi module is broken?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controller randomly resetting

Post by rimai »

If it is sending data to the Portal and if you can connect using smart phone app or Portal, it means it is working fine.
It's very weird that this started happening now. Did you add or change anything lately?
Roberto.
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

A week or so ago I changed some code, but it was rock solid until early this morning. The past few hours have been ok with the Wi-Fi plugged in, too. Makes me wonder if the issue is something else.
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Controller randomly resetting

Post by jsclownfish »

OK, so I was going to post a nearly identical message. My system has been untouched for months and was working like a champ. I always get the occasional reset. I know this because I manually override my webcam outlet and when it resets or the power blips for some reason it resets to off. However, the last two days it is resetting all day long. I thought I had a short or something, but I cannot figure it out. I'll try to disconnect the wifi as well to see if it helps.

-Jon
MortenB
Posts: 6
Joined: Tue Jun 19, 2012 3:14 pm

Re: Controller randomly resetting

Post by MortenB »

Same problem here here. My controller is suddenly rebooting every 5 minutes for no reason. Disconnecting WiFi seems to temporarily remedy the problem.
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Controller randomly resetting

Post by jsclownfish »

hmm. Mine seems to have stabilized without the wifi as well.

-Jon
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Controller randomly resetting

Post by jsclownfish »

Thank goodness for this forum, because I was trying everything but the wifi module.

So in order to try and troubleshoot this, are you all running older versions of the software or using Reeftronics.net to survey the controller over time? I am still running an older version software (1.0.2) and I'm not sure what firmware I have on my wifi, but I think I updated it last year.

-Jon
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Controller randomly resetting

Post by lnevo »

I am using reeftronics with no issue. I recently upgraded wifi to 4.x and have been at 1.0.9 for a while now. Knock on wood...
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

I haven't heard of reeftronics before, so that isn't a factor. I haven't upgraded WiFi firmware for a year or so, therefore not sure which version exactly. I just noticed another reset and so have disconnected Wi-Fi again...
MortenB
Posts: 6
Joined: Tue Jun 19, 2012 3:14 pm

Re: Controller randomly resetting

Post by MortenB »

I also have not heard of/used reeftronics. With the WiFi connected, the controller keeps rebooting. With the WiFi disconnected, it seems to works fine. Also tried disabling port forwarding in case the North Koreans were trying to take over my reef tank, but that did not make any difference. So, for now, I'm WiFi-less. Roberto, is this weird or what?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controller randomly resetting

Post by rimai »

I know what is causing it now, but don't know how to solve it yet.
The reefangel.com server is crapping out.
This in turn is sending a lot of garbage to the controller, which gets confused and reboots thinking it is a lock up.
I'm pretty sure if we increase the WDT timeout to 2 seconds, it will give time for the controller to clear up the garbage it is receiving from the server.
I'm investigating it further right now that I know what it is.
Roberto.
kimacom
Posts: 33
Joined: Fri Jul 27, 2012 9:52 am

Re: Controller randomly resetting

Post by kimacom »

same situation here..
it was ok but recently it resets randomly about an hour gap..
what's going on?
should i do something?
plz let me know.. my corals are getting shocked by highlights..
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controller randomly resetting

Post by rimai »

I tried on a 4.00 wifi firmware and wasn't able to replicate it.
It seems to only affect older firmware. So to confirm, I downgrade a 4.00 to 2.36 and there it goes.... I got it doing for me too.
So, I went ahead and changed the WDT to 2 seconds and was able to give the controller enough time to clear out the garbage before it thought it was in unstable state.
Try adding this to your code:

Code: Select all

wdt_enable(WDTO_2S);
Right after ReefAngel.Init();
Keep me posted
Roberto.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controller randomly resetting

Post by rimai »

I also have an open ticket with the webhosting company about the failure. Their sys admin will need to get involved as they don't seem to have a clue of what is going on with their server :(
Roberto.
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Controller randomly resetting

Post by btorrenga »

I added the line and reconnected the Wi-Fi. No resets yet, but a moment ago all of my IO channels reported off, though they are in fact on. Alarms went off, etc, which is how I noticed. I ran the android app to check out the issue and it seems to have rectified itself. All channels properly report on.

FYI, the improper reading from the IO module must have occurred yesterday, too. I received an email from the portal indicating my vodka and vinegar reservoir was empty. As a result I bought some dark eyes and white vinegar on my way home from work, but the reservoir was half full...
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Controller randomly resetting

Post by rimai »

Yes, the portal is not receiving updates until the webserver gets fixed :(
Roberto.
Bo0sted_Rafi
Posts: 75
Joined: Thu Mar 21, 2013 12:11 pm

Re: Controller randomly resetting

Post by Bo0sted_Rafi »

Im in the same boat. I will subscribe this topic to get alert to solve this problem that's let me going crazy finding why it's occurs. For now, the only option it's wait for rimai find the problem.
Last edited by Bo0sted_Rafi on Sat Aug 03, 2013 6:17 pm, edited 1 time in total.
Image
Bo0sted_Rafi
Posts: 75
Joined: Thu Mar 21, 2013 12:11 pm

Re: Controller randomly resetting

Post by Bo0sted_Rafi »

Im in the same boat. I will subscribe this topic to get alert to solve this problem that's let me going crazy finding why it's occurs. For now, the only option it's wait for rimai find the problem.
Image
ICEMAN330824
Posts: 26
Joined: Fri Jul 06, 2012 5:22 pm

Re: Controller randomly resetting

Post by ICEMAN330824 »

Bo0sted_Rafi wrote:Im in the same boat. I will subscribe this topic to get alert to solve this problem that's let me going crazy finding why it's occurs. For now, the only option it's wait for rimai find the problem.

ditto, me to, i have been racking my brain on this. I guess I will just disconnect the wifi module until there is a fix for this. also rimai my reef angel version shows as 1.09 how to I update to firmware version 4.0 and when I try to check for updates for my wifi module I get error message. please inform me on how to update firmware if this helps me to rectify my problem faster. thanks
Image
Post Reply