How to setup your wifi attachment

New members questions
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Sounds like you still have that router in there and you probably have two routers, which is complicating things a bit for you.
Roberto.
Echo5delta16
Posts: 20
Joined: Fri Apr 15, 2016 8:57 am

Re: How to setup your wifi attachment

Post by Echo5delta16 »

Sooo frustrated... I did everything as i was supposed to from research here. i get to the part where i have to make it work with outside of my home network and nothing i see people saying that i should see. Meaning i dont see what people are telling me i should see. but it may be because they didnt explain how to get to that part.
Echo5delta16
Posts: 20
Joined: Fri Apr 15, 2016 8:57 am

Re: How to setup your wifi attachment

Post by Echo5delta16 »

Sooo frustrated... I did everything as i was supposed to from research here. i get to the part where i have to make it work with outside of my home network and nothing i see people saying that i should see. Meaning i dont see what people are telling me i should see. but it may be because they didnt explain how to get to that part.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Is it working on your wifi network?
If so, you need to setup port forwarding in your router.
Roberto.
Echo5delta16
Posts: 20
Joined: Fri Apr 15, 2016 8:57 am

Re: How to setup your wifi attachment

Post by Echo5delta16 »

rimai wrote:Is it working on your wifi network?
If so, you need to setup port forwarding in your router.
it WAS connecting to my router but now with trying all of these tips it wont even connect now. i plug it in now the blue light stays flashing.
i think its time to sell
slm222
Posts: 104
Joined: Wed Nov 18, 2015 9:16 pm

Re: How to setup your wifi attachment

Post by slm222 »

double post
Last edited by slm222 on Tue Jun 14, 2016 6:15 pm, edited 1 time in total.
slm222
Posts: 104
Joined: Wed Nov 18, 2015 9:16 pm

Re: How to setup your wifi attachment

Post by slm222 »

ok. I am able to hit the Reef Angel Controller Webserve from the public ip address http://24.170.42.205:2000/ .


Below is the code I uploaded. But all I get on the reef angel wifi unit is a green blinking light....help :?:

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 <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();  // Add Standard Menu
    ReefAngel.AddWifi(); // Add Wifi
    
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port2Bit | Port8Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port4Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 830 );


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


    // Ports that are always on


    ////// Place additional initialization code below here

    // Define labels for 2014 LCD screen
    //box0
    ReefAngel.CustomLabels[0]="T5HO"; 
    ReefAngel.CustomLabels[1]="Skimmer"; 
    ReefAngel.CustomLabels[2]="FugeLight"; 
    ReefAngel.CustomLabels[3]="Heater"; 
    ReefAngel.CustomLabels[4]="ScrubLight"; 
    ReefAngel.CustomLabels[5]="Kalk_Mixer"; 
    ReefAngel.CustomLabels[6]="Kalk_ATO"; 
    ReefAngel.CustomLabels[7]="RO_ATO";
  
    //lowers minimum speed for DC pump
    InternalMemory.DCPumpThreshold_write(0);
    
    //gives random sopmething to randomize against
     randomSeed(now()/SECS_PER_DAY); 
    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.ShowInterface(); //wifi
    
    ReefAngel.MHLights( Port1,12,30,14,30,5 ); //t5ho
    ReefAngel.MHLights( Port2,7,0,22,0,5  );  //skimmer
    ReefAngel.StandardLights( Port3,18,0,10,0 ); //fugelight
    ReefAngel.StandardHeater( Port4,785,788 ); //heater
    ReefAngel.StandardLights( Port5,18,0,10,0 ); //scrubber light
    ReefAngel.DosingPumpRepeat( Port6,0,240,25 ); // kalk mixing every 6 hours for 25 seconds
    
    ////// Place your custom code below here

    ////// Wave Pattern Code Start
    //Hardcode minimum speed of DC pumps
    ReefAngel.DCPump.Threshold=0;

    // Add random mode if we set to Mode to Custom in portal
    static int rmode;
    static boolean changeMode=true;

    // These are the modes we can cycle through. You can add more and even repeat...
    byte modes[] = { ReefCrest, NutrientTransport, TidalSwell, Lagoon, Else, ReefCrest, Else };

    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = AntiSync; 
  
    if (now()%SECS_PER_DAY==0 || changeMode==true) { // Change at midnight or if controller rebooted
    rmode=random(100)%sizeof(modes); // Change the mode once per day to pick from our array
    changeMode=false;
 }

    // Set timer when in feeding mode
    static unsigned long feeding;
    if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();

    // after feed mode Continue NTM for the 60 minutes
    if (now()-feeding<1800) {
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=Else;  

} 
    //7am to 9am - wake up from night mode
    else  if (hour()>=7 && hour()<9){ 
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=350;
    ReefAngel.DCPump.Mode=Sine;
    ReefAngel.DCPump.Speed=50;
}
    //9am to 10am - ramp up to random
    else  if (hour()>=9 && hour()<10){ 
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=Lagoon;
    ReefAngel.DCPump.Speed=60;
}
    //10am to 6pm - Random
    else if (hour()>=10 && hour()<18) { 
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=modes[rmode];  // Put the mode to the random mode :)
    ReefAngel.DCPump.Speed=70; 
}
    //6pm to 7pm - slow down from random
    else  if (hour()>=18 && hour()<19){ 
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=Lagoon;
    ReefAngel.DCPump.Speed=60;

}
    //7pm to 9pm - slow down to night mode
    else  if (hour()>=19 && hour()<21){ 
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=350;
    ReefAngel.DCPump.Mode=Sine;
    ReefAngel.DCPump.Speed=50;

}
    // Night mode 
    else  { 
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=450;
    ReefAngel.DCPump.Mode=Sine;
    ReefAngel.DCPump.Speed=40; 
}
    ////// Wave Pattern Code End

    ////// ATO RO and Kalk Settings    
if ((hour()>18 || hour()<9) && (ReefAngel.Params.PH < 822))
{
    ReefAngel.SingleATO( true,Port7,600,0 );   //  Sump switch. Kalk schedule 6pm - 7am if pH < 8.25  If ATO/Kalk runs for 10 minutes=600 seconds, then shut off.
    ReefAngel.Relay.Off(Port8);
}
 else 
{
    ReefAngel.SingleATO( true,Port8,500,0 );   //  Sump switch.  If ATO/RoDi runs for 8.20 minutes=480 seconds, then shut off.
    ReefAngel.Relay.Off(Port7);
}
    ////// End ATO RO and Kalk Settings      

       

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

If you are able to access the internal webserver you are all set.
Green light means you are connected to your WiFi network.
It is not supposed to do anything else.
Roberto.
slm222
Posts: 104
Joined: Wed Nov 18, 2015 9:16 pm

Re: How to setup your wifi attachment

Post by slm222 »

rimai wrote:If you are able to access the internal webserver you are all set.
Green light means you are connected to your WiFi network.
It is not supposed to do anything else.

when I upload the wifi sketch I lose all my current code. how can I set up the reef angel and keep my code?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

You are already all set. You don't need the wifi sketch. Your wifi attachment is already setup and connected to your network.
Roberto.
slm222
Posts: 104
Joined: Wed Nov 18, 2015 9:16 pm

Re: How to setup your wifi attachment

Post by slm222 »

I'm sorry, I'm very dense on the programming side of things. But I cannot access it remotely. Am I missing something
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

You just said you can access it using the public ip.
That is a remote connection.
Maybe you are not explaining or I'm not understanding what you are trying to do.
Roberto.
slm222
Posts: 104
Joined: Wed Nov 18, 2015 9:16 pm

Re: How to setup your wifi attachment

Post by slm222 »

nevermind. I found it. I added a couple lines into the code I found on here... seems to be working now. im trying to get my phone to pick it up. but on the iPhone app im getting and "Alert: unable to process controller data!"
slm222
Posts: 104
Joined: Wed Nov 18, 2015 9:16 pm

Re: How to setup your wifi attachment

Post by slm222 »

please disregard my comments. another stupid finding. I did not realize the user name on the app was case sensitive.

thank you for the responses.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Hello All,
Forgive me if this has been addressed here, but i am having trouble setting up the WIFI. The RA WiFi attachment is flashing green, but won't connect. I've looked in my router (Ubee) and it has assigned 192.168.0.11 for my RA WiFi, but I believe I have to set up port forwarding in my router. Not exactly sure how to do that. See image below! Thank you!
David
Attachments
RAWiFi copy.jpg
RAWiFi copy.jpg (166.91 KiB) Viewed 43154 times
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

It depends on your router...

Can you ping the IP address from your desktop (192.168.0.11)?

Can you browse to http://192.168.0.11:2000/wifi in your browser
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Thank you for the quick response!
lnevo wrote:It depends on your router...

Can you ping the IP address from your desktop (192.168.0.11)?

No, I get 'unable to connect'

Can you browse to http://192.168.0.11:2000/wifi in your browser
I can browse the above, I just get blank parameters and 'connecting' and unknown forum user

Thank you!
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Good go into settings and add your controller there. Don't fill in the cloud settings.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Thank you, but the similar results... 'disconnected', 'never' update, 'unknown' forum user
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

If you are seeing the cloud server connection status showing up, you may have entered cloud server settings when setting up your controller.
Delete that profile and create a new one, making sure that you don't enter anything on cloud server settings.
Roberto.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Thank you Roberto, I've deleted the old profile and created a new one with the same results. I may have to do something with my wifi modem to recognize the RA-wifi. Under the wife status in the image posted above, its says:
DHCP:false and shows the ip address as 0.0.0.0

When I go into the modem, I see the RA-wifi is assigned 192.168.0.11, Do I need to set up port forwarding? I, of course, don't know how to do this. Thanks again,
David
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

You will eventually, but before that, you should be able to access the controller from inside your wifi network.
When you browse to http://192.168.0.11:2000/wifi delete all profiles and hit refresh.
What happens?
Roberto.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Thank you Roberto. OK! I have status! Temp and pH show up! So far so good!
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Good. That means that you are getting access to your controller inside your own wifi.
Now, if you also want to have control when outside your wifi, you will need to setup port forwarding in your router.
Routers block access by default. All routers do as they treat any incoming access as malicious. So, you need to tell the router that when you come in through port 2000, you want to get access to your controller and that's when port forwarding comes in.
Roberto.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

I think we're good on the local and outside network, thank you! I currently only have the temp probe and pH probe installed. On the status page, data reads exactly what's on the controller screen, however when I click on the pH or Temp number, the graph displayed are way off in temp/pH values. I have calibrated the pH probe. Any thoughts there? You have already been most helpful, thanks again.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

sophie10 wrote:I think we're good on the local and outside network, thank you! I currently only have the temp probe and pH probe installed. On the status page, data reads exactly what's on the controller screen, however when I click on the pH or Temp number, the graph displayed are way off in temp/pH values. I have calibrated the pH probe. Any thoughts there? You have already been most helpful, thanks again.
Can someone tell me why the graph is lagging by 2 or 3 days and is not accurate? According to the status pH when I've checked, it hasn't been above 8.35, and is showing an impossible reading of 10.23? :o The temperature is equally inaccurate on the graph, but fine on the status. Any thoughts are appreciated. :D
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Are you sure you have the controller setup correctly?
Do you have this in your code?

Code: Select all

ReefAngel.Portal("sophie10");
There is no data in your portal.
Roberto.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Hi Roberto,
I thought I set it up correctly. I set it up using the pre-loaded settings and then had you help me set up the wifi. Attached is a current image of the graph display, the current pH is actually 8.22 and has fluctuated between 8.19 and 8.33 over the last two weeks, but look at the graph (from almost pH 10 dropping to 7.8)! Thanks and happy holidays!
Attachments
Untitled copy.jpg
Untitled copy.jpg (39.01 KiB) Viewed 43523 times
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

The preloaded code is not customized.
You need to generate a code with the wizard to be able to customize your controller to you and add your forum integration.
Otherwise the controller doesn't send information to the portal.
Roberto.
sophie10
Posts: 14
Joined: Fri Nov 25, 2016 6:54 am

Re: How to setup your wifi attachment

Post by sophie10 »

Well that would explain a lot. I will investigate. Thank you!
Post Reply