Page 1 of 1

New Reef Angel User

Posted: Wed May 30, 2018 12:04 pm
by Henkie
Good evening from South Africa

I recently acquired a reef angel plus (second hand)

I am however experiencing difficulty in setting up the controller.

What have I done so far.

- Used the web wizard to generate a rather basic code (please see code below)
#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.SetTemperatureUnit( Celsius ); // set to Celsius Temperature

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


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DayLights( Port1 );
    ReefAngel.StandardHeater( Port2 );
    ReefAngel.Relay.DelayedOn( Port3 );
    ReefAngel.StandardHeater( Port4 );
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "Henkie" );
    ReefAngel.DDNS( "10.0.0.10:2000" ); // Your DDNS is Henkie-10.0.0.10:2000 .myreefangel .com
    ReefAngel.ShowInterface();
}
- Installed and connected the wifi attachment to our home network. (received the following message)
Wifi connection status.PNG
Wifi connection status.PNG (23.31 KiB) Viewed 8030 times
Based on the message I gathered that my reef angel IP address is 10.0.0.10 and that port 2000 has successfully been opened on my router.

I did the test by inserting the IP address into my browser and was able to successfully turn the relays on and off.

However I cannot see my data on the portal nor on the app.

What have I done to combat the problem?

I entered by home networks IP address and added the IP address of the Reef Angel (ie 10.0.0.10) to be accepted via port 2000 (please refer to image below)
Port Forwarding.PNG
Port Forwarding.PNG (9.91 KiB) Viewed 8030 times
Trouble experienced

Every time I upload the code it runs through the process, reboots the controller but indicated "Error uploading" (please refer to image)
Error uploading.PNG
Error uploading.PNG (6.85 KiB) Viewed 8030 times
After forwarding the port on my router I can now no longer access 10.0.0.10:2000 via my browser as I could have done previously.

The portal still does not identify my controller neither does the app.

Any assistance will be greatly appreciated

Re: New Reef Angel User

Posted: Wed May 30, 2018 1:10 pm
by rimai
Remove the DDNS line to be able to see data in the portal. I can't remember if that mess up or not.

Re: New Reef Angel User

Posted: Wed May 30, 2018 11:08 pm
by Henkie
Hi Roberto

Thank you for the response. I removed the DDNS line and re-uploaded the code to my RA.

It however still does not pick up my data in the portal

Re: New Reef Angel User

Posted: Wed May 30, 2018 11:18 pm
by rimai
Your wifi attachment has old firmware then.
You need to update it.
Follow the instructions here:
http://forum.reefangel.com/viewtopic.php?f=3&t=4601

Re: New Reef Angel User

Posted: Thu May 31, 2018 9:44 am
by Henkie
Thank you, I have no experience when it comes to programming so the assistance is greatly appreciated.

I downloaded TeraTerm and made the changes in the ttl file, however when I open the TeraTerm I am required to create a new connection.

What do I do here?

Re: New Reef Angel User

Posted: Thu May 31, 2018 10:04 am
by rimai
Use Tera Term and go to menu Control->Macro
Browse to the .ttl file you just edited.
It should configure the module at the end of the process.
If you don't get anything in the screen, you will need to change the baud rate before you open the .ttl file.
Go to menu Setup->Serial port and choose 57600 baud and then go to menu Control->Macro to open the .ttl file.

Re: New Reef Angel User

Posted: Thu May 31, 2018 10:51 am
by Henkie
Thanks.

This is the code displayed on TeraTerm after configuration

GET /status/submitp.aspx?t1=226&t2=0&t3=0&ph=842&id=WarrenElvis&em=8&rem=0&key=&atohigh=0&atolow=0&r=8&ron=0&roff=255&pwma=20&pwmd=20&sal=60

Does this mean it was successful?

Re: New Reef Angel User

Posted: Fri Jun 01, 2018 9:44 am
by rimai
You are plugging it to the wrong stuff. You need to connect the wifi attachment into the usbttl cable and not RA.

Re: New Reef Angel User

Posted: Fri Jun 01, 2018 11:33 am
by Henkie
Thanks Roberto, so I assume this is the right code below (I just hid the password)

CMD
factory RESET
Set Factory Defaults
<4.41> reboot
*Reboot*CMD
set ftp address 198.175.253.161
AOK
<4.41> save
Storing in config
<4.41> set wlan ssid Fourie
AOK
<4.41> set wlan pass (Hidden)
AOK
<4.41> set option deviceid ReefAngelWifi
AOK
<4.41> set w j 1
AOK
<4.41> set c c 0
AOK
<4.41> set c r 0
AOK
<4.41> set c o 0
AOK
<4.41> set i d 1
AOK
<4.41> set c i 3
AOK
<4.41> set dns name www.reefangel.com
AOK
<4.41> set i h 104.36.18.155
AOK
<4.41> set i r 80
AOK
<4.41> set i f 0x06
AOK
<4.41> set s t 0x10
AOK
<4.41> set u m 2
AOK
<4.41> set i p 2
AOK
<4.41> set u b 57600
AOK
<4.41> set s p 0
AOK
<4.41> set c s 1420
AOK
<4.41> save
Storing in config
<4.41> save user
Storing in user
<4.41> reboot
*Reboot*

Then I assume that if there's no data in the portal that I still need to do the port forwarding

Re: New Reef Angel User

Posted: Fri Jun 01, 2018 11:52 am
by rimai
Yes, that is good now.
One thing I noticed is that your code is wrong.
Your controller is sending data to WarrenElvis and not to Henkie.
Make sure you are uploading the correct code to your controller.

Re: New Reef Angel User

Posted: Fri Jun 01, 2018 12:33 pm
by Henkie
How do I go about fixing that? That is the username of the previous owner

Re: New Reef Angel User

Posted: Fri Jun 01, 2018 1:06 pm
by rimai
You need to upload your own code to the controller.

Re: New Reef Angel User

Posted: Sat Jun 02, 2018 5:23 am
by Henkie
Every time I try to upload my own web wizard generated code I get the same messeage as on the first page “error uploading”

Re: New Reef Angel User

Posted: Sat Jun 02, 2018 8:08 pm
by rimai
That board may be bad. We know your usbttl cable is good otherwise you wouldn't be able to program the wifi attachment

Re: New Reef Angel User

Posted: Sun Jun 03, 2018 9:23 pm
by 89delta
Is mine correct?

send '$$$'
wait 'CMD'
sendln 'set ftp address 198.175.253.161'
wait'AOK'
sendln 'save'
wait 'config'
sendln 'set wlan ssid Gundel'
wait 'AOK'
sendln 'set wlan pass *****'
wait 'AOK'
sendln 'set option deviceid ReefAngelWifi'
wait 'AOK'
sendln 'set w j 1'
wait 'AOK'
sendln 'set c c 0'
wait 'AOK'
sendln 'set c r 0'
wait 'AOK'
sendln 'set c o 0'
wait 'AOK'
sendln 'set i d 1'
wait 'AOK'
sendln 'set c i 3'
wait 'AOK'
sendln 'set dns name www.reefangel.com'
wait 'AOK'
sendln 'set i h 192.168.0.16'
wait 'AOK'
sendln 'set i r 2000'
wait 'AOK'
sendln 'set i f 0x06'
wait 'AOK'
sendln 'set s t 0x10'
wait 'AOK'
sendln 'set u m 2'
wait 'AOK'
sendln 'set i p 2'
wait 'AOK'
sendln 'set u b 57600'
wait 'AOK'
sendln 'set s p 0'
wait 'AOK'
sendln 'set c s 1420'
wait 'AOK'

sendln 'save'
wait 'config'

sendln 'save user'
wait 'user'

sendln'reboot'

Re: New Reef Angel User

Posted: Mon Jun 04, 2018 10:55 am
by rimai
No. You shouldn't change the host line.
It's where our server ip address is.
Make sure it is:

Code: Select all

sendln 'set i h 104.36.18.155'

Re: New Reef Angel User

Posted: Mon Jun 04, 2018 12:43 pm
by 89delta
Ok thanks.

Sent from my SM-N920T using Tapatalk

Re: New Reef Angel User

Posted: Fri Jun 15, 2018 1:35 pm
by Henkie
rimai wrote:That board may be bad. We know your usbttl cable is good otherwise you wouldn't be able to program the wifi attachment
How would i go about determining whether the board is bad?