My Neptune Apex web interface compatible DIY reef controller

How hard would it be to add a Salinity Probe to this?

you can just duplicate the code for ph sensor and adjust it for the conductivity probe. someone else did it. I plan on starting this weekend to add the code to support the other atlas stamps.
 
Awesome d0ughb0y. Currently I'm using an Arduino 2560 to control all my water changes. I have relay controlled valves, and controlling my outlets for my pumps. Works really slick.

I also just realized that my previous post was my first post on RC, and I have been a member for over 5 years. Wow I'm a long time lurker.
 
Awesome d0ughb0y. Currently I'm using an Arduino 2560 to control all my water changes. I have relay controlled valves, and controlling my outlets for my pumps. Works really slick.

I also just realized that my previous post was my first post on RC, and I have been a member for over 5 years. Wow I'm a long time lurker.

Are the valves like solenoid valves?
I think when I once looked into it, I was unable to find one that will work with salt water. Do you have a link to it?
 
Hello d0ughb0y,
Question could you explain how the feed a -d works. Can you have the feeder be program to feed more than once a day
 
Hello d0ughb0y,
Question could you explain how the feed a -d works. Can you have the feeder be program to feed more than once a day

The feed mode is based on neptune controller feed mode. If you are familiar with neptune Apex, it works sort of the same way, except I added a few enhancements.

Apex feed mode is simply programming a set of actions to work together that can be initiated by a button click. This would typically be turning off return pump, skimmer, power heads. then after a certain number of minutes, turn them back on again. Apex allows defining 4 feed modes, hence feed a-d.

A major flaw with Apex feed mode (which is still true up to now), is it is not schedulable. So you can only manually initiate a feed mode.

In the case of chauvet16 code, you define a "macro" much like programming an outlet. the programming is exactly the same. Then you associate one to six actions to the macro. These actions would be like, turning off return pump, turning off skimmer, etc. but also includes turning the auto feeder. In addition, for pwm pumps, it will automatically use the feed mode for the pwm pump.

Since macro scheduling works the same way as outlets, you can only program it in multiples of 24 hour period. Say, twice a day, at 6am and 6pm, so your cycle is 12 hours. You have your initial off time, on time and off time. The on time is the total time the macro is active. In my feed example in config.h, the ON time is 4 minutes (240 seconds).
When assigning actions, you define an initial off (or delay) then the on time. Say you want return and powerheads to be off immediately and for return pump to turn ON 1 minute before the end of the active time. Then you define return pump off time for 180 seconds, then on time 60 seconds. If you want the powerhead to be off the entire 4 minutes, you define off time for 240 seconds and on time 0. etc. At the end of the macro active time, all outlets go back to their regular schedule.

If you want to schedule feed that is not a multiple of 24 hours, you will need to define 2 different feed modes and schedule each one accordingly, say one a 2pm and the other at 6pm. As with outlet programming, you can also select the days of week the program is active.

You are not restricted to use the feed buttons strictly for feed mode. It can be defined for a group of actions you want to be able to initiate with the click of a button (and does not have to be scheduled).

for example, if you turn off return, skimmer, heater, ato when you do a water change, you can program all these actions into a macro. Just make sure you define the active time long enough so your pumps do not come on before you are done with the water change. You can cancel an active feed mode anytime to resume normal outlet schedule.
 
Hi d0ughb0y

I download your sketch, remark ph and few other parts in config.h which I don't use yet and
program works.

For now I am using only temperature sensor and this shows right temperature.

Still I can't open any log directly. Only if I choose File manager I could see logs and also contents.


I also have problem with NTP.

After running ping pool.ntp.org I got each day other IP? Still after I try about 5 those IP I got same error always.
So I guess controller don't read time from NTP server.

Is there anything more to set-up on my internet router?


As I use local IP 192.168.8.177:8000 how could I forward this IP and port 8000 in my router to external world?

I already use two webcams and other AP which I successfully forward thru router and I could access them by using my static IP address
still those devices uses port 80 and not 8000.

When I try to compile shetch by using port 80 ... I can't connect with browser to controller?


I also don't get any graphs in status window on temperature? Is this related with problem with NTP or maybe with logs problem?
 
After many hours (20+) of testing, trying to discover where is a problem I find out as..

I should also change my controller mac address.

This is not in config.h but in network.ino

If anyone don't know that or forgot.. do this as withouth this with default mac address NTP will not work.


But in my case even with this NTP don't work by default.

So I try this example:

http://www.openreefs.com/ntpServer

And finds out there NTP is working. As both code is practical the same I was trying to finds out why one code is working and other no and I finds out in openreefs example NTP is working because IP si getting by DHCP but in main d0ughb0y sketch IP is assigned in config.h


So I just add DHCP section in setup() and now NTP is working, I got right time each time and after each reset of controller.
I manage to run first DHCP then again network initialization but withouth clock initialization and now NTP is working aslo in main d0ughb0y sketch.

Still this is really strange as with DHCP NTP is working and on fixed IP NTP is not working.

Any idea?


And now after NTP is working... still even if it is working by strange shortcut then aslo min, max and average values is visibile on temperature and Ph readings.

And also viewing of all three logs starts to work.
I only finds out as after 10h of wrk there is only one reading of temperature in log file? Why?

So I am still waiting for that graph to appears in status view. I guess this is related with this numbers of log entries in Sensor log.

But I am progressing :)
 
I will get you some pictures of my valves. They are homemade basically. Also I'm trying to compile your code, and ran into an issue. I also moved the Ethernet Libraries to my Sketch folder as a test, that is what you seeing. I get the same error either way.



In file included from \Documents\Arduino\libraries\Ethernet/Ethernet.h:8,
from Chauvet16.ino:17:
\Documents\Arduino\libraries\Ethernet/EthernetServer.h:15: error: invalid abstract return type for member function 'EthernetClient EthernetServer::available()'
\Documents\Arduino\libraries\Ethernet/EthernetClient.h:8: note: because the following virtual functions are pure within 'EthernetClient':
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/Client.h:20: note: virtual uint8_t Client::connected()
In file included from Chauvet16.ino:20:
TinyWebServer.h:178: error: cannot declare field 'TinyWebServer::client_' to be of abstract type 'EthernetClient'
\Documents\Arduino\libraries\Ethernet/EthernetClient.h:8: note: since type 'EthernetClient' has pure virtual functions
Chauvet16:31: error: 'NEGATIVE' was not declared in this scope
Network.ino: In function 'boolean netCheck()':
Network:39: error: cannot declare variable 'client' to be of abstract type 'EthernetClient'
\Documents\Arduino\libraries\Ethernet/EthernetClient.h:8: note: since type 'EthernetClient' has pure virtual functions

Thoughts?
 
Last edited:
I figured out my coding issue. Had to make a few small changes, however now my LCD screen just flickers. trying to figure that out now.
 
After many hours (20+) of testing, trying to discover where is a problem I find out as..

I should also change my controller mac address.

This is not in config.h but in network.ino

If anyone don't know that or forgot.. do this as withouth this with default mac address NTP will not work.


But in my case even with this NTP don't work by default.

So I try this example:

http://www.openreefs.com/ntpServer

And finds out there NTP is working. As both code is practical the same I was trying to finds out why one code is working and other no and I finds out in openreefs example NTP is working because IP si getting by DHCP but in main d0ughb0y sketch IP is assigned in config.h


...

teslo -

To fix NTP do the following:

config.h
add the following below (line 10) "#define ROUTER_IP x,x,x,x"
#define DNS_SERVER 4,2,2,2 //change this to your DNS Server


Network.ino
add the following below (line 35) "IPAddress ip(LOCAL_IP);"

byte dnServer[] = {
DNS_SERVER };
byte gateway[] = {
ROUTER_IP };

edit (line 54 & 62 <--- Should be the new line numbers)

Ethernet.begin(mac,ip);

to look like

Ethernet.begin(mac,ip,dnServer,gateway);
 
SorsCode !!

Thanks for your advice !

But after a whole week trying to solve this problem also I come to same conclusions and yesterday I finally change code and yes.. NTP is working now without problems.

I think d0ughb0y should change source code in his Github as other users don't finds out same issue as we do and need time to solve this.

I guess in some local networks even without this added parameters for default gateway and DNS server controller runs OK still with those two additional parameters it works really in all local networks.

Now after NTP starts to work also graphs on status page are shown. :)
And also logging works normally. :)

Still today I find out as logging in Outlet log shows changes with +1h difference? strange really.


I would have suggestion if in sensors section below also some notice for alarm could be added? maybe only a red/green LEDs? In this way each time when we check status we would know everything is OK? Otherwise if we are not at home to hear alarms then we had to check logs?

Is there any chance to change graphs in this way as when moving along curve it shows not only value but also hour when that value was recorded?
 
Back
Top