Setting Reminders

Would you like to help?
Share your walkthrough tutorial with others
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Fri Jul 24, 2015 8:15 pm
Plus you haven't used wifialert much so it's all good. I figured the chances were low but just wanted to point out the possibility
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Fri Jul 24, 2015 8:25 pm
lnevo wrote:Plus you haven't used wifialert much so it's all good. I figured the chances were low but just wanted to point out the possibility

Yeah, I wasn't sure about how it works exactly. I didn't realize those possibilities. Thanks again for feedback.

Sent from my Moto X

Posts: 121
Joined: Fri Jul 03, 2015 8:29 am
PostPosted: Fri Jul 24, 2015 8:39 pm
Thank you both for this!

Just so I'm clear, these alerts are going to alert me through the app? Right? Is there a way to do text messages?

Sent from my SAMSUNG-SM-G900A using Tapatalk
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Jul 25, 2015 7:18 am
fishflipper wrote:Thank you both for this!

Just so I'm clear, these alerts are going to alert me through the app? Right? Is there a way to do text messages?

Sent from my SAMSUNG-SM-G900A using Tapatalk

no. they will be sent through the portal not the app. you will also need the portal(...) line added to your code. then from the portal, you will enter your email address and you can get email messages with these alerts (some carriers have a special email address that sends you a txt message to your phone).

there is really not a way to do this from the phone except for adding in manual alarms...so that defeats the point of the controller sending the reminders.


Sent from my iPad mini

Posts: 38
Joined: Sat Aug 04, 2012 1:20 pm
Location: Lexington, KY
PostPosted: Sat Jul 25, 2015 7:43 am
Here are the formats for most of the US services. 《number》is your 10 digit phone number.

AT&T: number@txt.att.net
T-Mobile: number@tmomail.net
Verizon: number@vtext.com
Sprint: number@messaging.sprintpcs.com or number@pm.sprint.com
Virgin Mobile: number@vmobl.com
Tracfone: number@mmst5.tracfone.com
Metro PCS: number@mymetropcs.com
Boost Mobile: number@myboostmobile.com
Cricket: number@sms.mycricket.com
Nextel: number@messaging.nextel.com
Alltel: number@message.alltel.com
Ptel: number@ptel.com
Suncom: number@tms.suncom.com
Qwest: number@qwestmp.com
U.S. Cellular: number@email.uscc.net

Posts: 121
Joined: Fri Jul 03, 2015 8:29 am
PostPosted: Sat Jul 25, 2015 8:54 am
Thanks, I would rather have text messages. I didn't think there was a way to do it.

Sent from my SAMSUNG-SM-G900A using Tapatalk
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Jul 25, 2015 6:01 pm
awesome. great list. I knew they existed but didn't know them.

Sent from my Moto X

Posts: 8
Joined: Tue Apr 21, 2015 5:03 am
Location: AUSTRALIA
PostPosted: Sun Aug 02, 2015 5:28 am
Hi there
Has anyone got this code up and running, working?. I'm having troubles in trying to get the code to compile.
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Aug 02, 2015 6:10 am
Whats your error

Posts: 8
Joined: Tue Apr 21, 2015 5:03 am
Location: AUSTRALIA
PostPosted: Mon Aug 03, 2015 5:27 am
Hi Inevo
Thanks for your response.
I think my problem is where in my code to add "checkReminders(); in my main loop and also were to add the function.
My code is all from the wizard. except where I tried to add the reminders. I'm a total noob when it comes down to coding. I do have the wifi module , and reef angel plus.

Code: Select all
void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    ReefAngel.Use2014Screen();  // Let's use 2014 Screen
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port2Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit | Port5Bit | Port6Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port8 );

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

void loop()
{
    ReefAngel.Relay.DelayedOn( Port1 );
    ReefAngel.Relay.DelayedOn( Port2 );
    ReefAngel.StandardHeater( Port3 );
    ReefAngel.StandardHeater( Port4 );
    ReefAngel.ActinicLights( Port5 );
    ReefAngel.DayLights( Port6 );
    ReefAngel.MoonLights( Port7 );
    ReefAngel.PWM.SetDaylight( MoonPhase() );
    ReefAngel.PWM.SetActinic( MoonPhase() );
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = AntiSync;
    ReefAngel.DCPump.ActinicChannel = AntiSync;
    ////// Place your custom code below here
    checkReminders();


    ////// Place your custom code above here
void checkReminders()
{
   // grab the current time and use it for processing the reminders
   // do it this way to prevent rollover errors...just in case
   time_t t = now();
   remindTraceElements(t);
   remindWaterChange(t);
   remindMonthly(t);
}

void remindTraceElements(time_t t)
{
   // Sunday = 1, Monday = 2, etc
   if ((weekday(t) == 2) || (weekday(t) == 5)) {
      // Every monday and thursday at 10pm
      if ((hour(t) == 22) && (minute(t) == 0) && (second(t) == 0)) {
         // send reminder, No Spaces Allowed in message
         sendReminder("Add+Trace+Elements");
      }
   }
}

void remindWaterChange(time_t t)
{
   if (weekday() == 4) {
      // Every wednesday at 8pm
      if ((hour(t) == 20) && (minute(t) == 0) && (second(t) == 0)) {
         // send reminder, No Spaces Allowed in message
         sendReminder("Water+Change+Time");
      }
   }
}

void remindMonthly(time_t t)
{
   // Every 1st of the month at 8pm
   if (day(t) == 1) {
      if ((hour(t) == 20) && (minute(t) == 0) && (second(t) == 0)) {
         // send reminder, No Spaces Allowed in message
         sendReminder("Change+filter+pads");
      }
   }
}

void sendReminder(char* msg)
{
   static WifiAlert r;
        // No delay, for immediate sending
   r.SetDelay(0);
   // No spaces are allowed in the msg
   r.Send(msg);
}
    // This should always be the last line
    ReefAngel.Portal( "GreenVF" );
    ReefAngel.ShowInterface();
}


 



and then the errors
sketch_aug03a.cpp: In function 'void loop()':
sketch_aug03a:86: error: 'checkReminders' was not declared in this scope
sketch_aug03a:91: error: a function-definition is not allowed here before '{' token
sketch_aug03a:101: error: a function-definition is not allowed here before '{' token
sketch_aug03a:145: error: expected `}' at end of input
Attachments
newsetup.ino
not working code file
(3.84 KiB) Downloaded 69 times
PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron