Re: Portal, data logging, app issues
Posted: Sun Nov 05, 2017 5:55 pm
Can you post your code?
Community discussion about Reef Angel Controllers and reefing related subjects
http://forum.reefangel.com/
rimai wrote:Can you post your code?
I changed the part about the standard menu [as advance as my arduino/coding knowledge goes] and I changed the last part about the portal [that you said to do earlier]#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.AddStandardMenu(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit | Port8Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port2 );
ReefAngel.ActinicLights( Port3 );
ReefAngel.DayLights( Port4 );
ReefAngel.Relay.DelayedOn( Port5 );
ReefAngel.Relay.DelayedOn( Port7 );
ReefAngel.Relay.Set( Port8, !ReefAngel.Relay.Status( Port4 ) );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal ( "reefoffillory" );
ReefAngel.ShowInterface();
}
rimai wrote:Well, you are using internal memory code and we can't see the settings you are using.
But, I just reread the post and there is no such thing as delayed start after feeding in the wizard.
For lights, if you use hard coded settings, you can pick the time to start and stop.
That was how I intended to use it, I wanted my skimmer to stay off for 15 minutes, and my ATO to stay off for 20 minutes (how I set it up in the wizard) but it's not working, going to try again sometime this weekbinder wrote:delayed start is the amount of time the outlet remains OFF after one of the following: exiting water change mode, feeding mode and controller start up
so if you set port1 to have a 1 minute delayed start, it won’t turn on until 1 minute after you have 1 of the 3 previously mentioned scenarios.
this is useful if you have a powerhead that is out of the water during water changes and it takes your return pump a minute to get the water level back up to normal. so you wouldn’t want that powerhead on and running out of the water immediately after your water change.
Sent from my iPad using Tapatalk
I tried searching the forum for information, but couldn't find anything. Am I able to download the data in the portal history to a form which is able to be manipulated such as a comma delimited/excel etc. file?rimai wrote:Unless someone changed the libraries, the delayedstart is only applicable to power on delays.
Thank you for the response. I will be the first to admit that I am not as technically savvy as I would like to think. Does this pull the current status? How far back does it go?rimai wrote:Sure. You can get a json formatted file.
http://forum.reefangel.com/status/jsonp ... &filter=t1
That would be great, I'd like time & Value for the data so that I can graph it.binder wrote:the example given just pulls the current status for t1, hence the filter=t1 section.
json is just a way to format key value pairs.
there should be a way to get a complete data chunk in xml formatted response from the portal and that would (at least i think but don’t remember off hand since i haven’t looked for a while) include a date & time stamp. that’s what i do in my android app when the user asks for the data from the portal. i don’t have the exact url handy but can get it if you want.
xml and json are the only 2 ways to get the formatted data.
Sent from my iPad using Tapatalk
there currently is no way to export the data from my android app.reefoffillory wrote:That would be great, I'd like time & Value for the data so that I can graph it.binder wrote:the example given just pulls the current status for t1, hence the filter=t1 section.
json is just a way to format key value pairs.
there should be a way to get a complete data chunk in xml formatted response from the portal and that would (at least i think but don’t remember off hand since i haven’t looked for a while) include a date & time stamp. that’s what i do in my android app when the user asks for the data from the portal. i don’t have the exact url handy but can get it if you want.
xml and json are the only 2 ways to get the formatted data.
Sent from my iPad using Tapatalk
I am able to split the values in the JSON file, but it's just not valuable without a date/time reference.
The value before the ,[reading] doesn't seem to mean anything for my purposes?
Thank you guys!
Really hoping to get these last few parts of the controller figured out before I decide to buy some more modules and expand it =)
I do have the android app linked to my portal - is it easier to get the data [including date/time/value] through the app? I am okay with having to manipulate/separate the data out in excel once I get a file with the data in it.