Web Based IR Light Controller - The Planted Tank Forum
Reply
 
LinkBack Thread Tools Display Modes
post #1 of 20 (permalink) Old 05-13-2015, 01:12 AM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
Web Based IR Light Controller

There are a few light controllers already out there that can control the Current USA Satellite and/or Ecoxotic E Series fixtures but none of them seem to be web based. Since the rest of my tank will be controlled by an Apex controller I didn't like the idea of having something that requires physical access to change settings on.

I write code for a living so it only made sense to write a controller that's accessible via the web from a browser ... both desktop and mobile.

I had an Arduino Uno and Ethernet shield lying around so that seemed like the perfect platform.

The Arduino Uno doesn't have much ROM space but so far things are fitting ... just barely though.

The controller is still a work in progress, about 75% done I'd say. The Arduino code is pretty much all done just not debugged yet. Most of the work left is on the web side of things.

Here's a link to the project code:

https://github.com/Stonyx/IRLightController

The controller borrows a concept from the iAqua Lite where you predefine the color values for the 4 memory buttons and then fade between those. However it greatly expands on this by allowing a total of 50 schedule entries per week for when the various colors should be active. It also adds 50 additional schedules per week for sending any IR command to the light which adds great flexibility to do fun things with the various dynamic modes.

It also gets its time from a NTP time server on the web so no more having to change the time when daylight savings kicks in.

And lastly it will be able to control both the Satellite and E Series fixtures.

I'll post updates here as I make progress but feel free to check the Github link for the latest changes and post here with questions, suggestions, etc.

Thanks,
Harry
Harry Muscle is offline  
Sponsored Links
Advertisement
 
post #2 of 20 (permalink) Old 05-13-2015, 02:44 AM
Planted Tank Obsessed
 
PTrader: (0/0%)
Join Date: Aug 2014
Location: Toledo ohio
Posts: 310
wow that sounds great I don't one of them light but there are many here that I am sure that will be downloading that for sure..
rottison is offline  
post #3 of 20 (permalink) Old 05-13-2015, 01:07 PM
Children Boogie
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 16,743
That's a good idea with using the NTP server. I would use both a time server and an RTC. Network connection can go down on some days although rarely but it does happen. The time server can correct the RTC on daylight savings.
mistergreen is offline  
 
post #4 of 20 (permalink) Old 05-13-2015, 02:00 PM
Banned
 
PTrader: (0/0%)
Join Date: Jun 2013
Location: WI
Posts: 11,794
Quote:
Originally Posted by Harry Muscle View Post
There are a few light controllers already out there that can control the Current USA Satellite and/or Ecoxotic E Series fixtures but none of them seem to be web based. Since the rest of my tank will be controlled by an Apex controller I didn't like the idea of having something that requires physical access to change settings on.

I write code for a living so it only made sense to write a controller that's accessible via the web from a browser ... both desktop and mobile.

I had an Arduino Uno and Ethernet shield lying around so that seemed like the perfect platform.

The Arduino Uno doesn't have much ROM space but so far things are fitting ... just barely though.

The controller is still a work in progress, about 75% done I'd say. The Arduino code is pretty much all done just not debugged yet. Most of the work left is on the web side of things.

Here's a link to the project code:

https://github.com/Stonyx/IRLightController

The controller borrows a concept from the iAqua Lite where you predefine the color values for the 4 memory buttons and then fade between those. However it greatly expands on this by allowing a total of 50 schedule entries per week for when the various colors should be active. It also adds 50 additional schedules per week for sending any IR command to the light which adds great flexibility to do fun things with the various dynamic modes.

It also gets its time from a NTP time server on the web so no more having to change the time when daylight savings kicks in.

And lastly it will be able to control both the Satellite and E Series fixtures.

I'll post updates here as I make progress but feel free to check the Github link for the latest changes and post here with questions, suggestions, etc.

Thanks,
Harry

Just an FYI and a COMPLETELY DIFFERENT product..:
Cloud based PWM (for LDD drivers)
controller..



BUT def. keep up the project..
WIFI for adruino seems overly problematic...........

Is is space or just poor hardware or problems coding (just curious)??

One would think it is easy, considering the widespread use of the tech..

Suspended for 30 days for being awful to other forum members
jeffkrol is offline  
post #5 of 20 (permalink) Old 05-15-2015, 12:44 PM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
Quote:
Originally Posted by mistergreen View Post
That's a good idea with using the NTP server. I would use both a time server and an RTC. Network connection can go down on some days although rarely but it does happen. The time server can correct the RTC on daylight savings.
Unfortunately the Uno doesn't have enough ROM space for the RTC library in addition to all the existing code.

Thanks,
Harry
Harry Muscle is offline  
post #6 of 20 (permalink) Old 05-15-2015, 01:07 PM
Children Boogie
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 16,743
Quote:
Originally Posted by Harry Muscle View Post
Unfortunately the Uno doesn't have enough ROM space for the RTC library in addition to all the existing code.

Thanks,
Harry
Can you test how this would work if the network goes down for a day? Maybe it won't be an issue
mistergreen is offline  
post #7 of 20 (permalink) Old 05-15-2015, 03:41 PM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
Quote:
Originally Posted by mistergreen View Post
Can you test how this would work if the network goes down for a day? Maybe it won't be an issue
Arduino keeps time internally. It probably won't be super accurate over a long time but over a day it should be fine. One advantage of using an RTC is that it keeps the time even when the device power gets disconnected. My device will simply get the time from the server on power up.

Thanks,
Harry
Harry Muscle is offline  
post #8 of 20 (permalink) Old 05-15-2015, 03:58 PM
Children Boogie
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 16,743
I'll test how bad the time drift when I have the chance. I'm playing with a network arduino controller too with an RTC. I wonder if I can just get rid of the RTC.
mistergreen is offline  
post #9 of 20 (permalink) Old 07-03-2015, 02:47 PM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
This controller is now feature complete ... it's officially graduating from Alpha stage to Beta stage. I have done isolated testing during development, but this hasn't yet been tested on an actual Arduino along with the HTML/CSS/JS interacting with it. It's probably going to be a few weeks before I get my Arduino setup and ready to test, so if anyone feels like helping out and trying this code feel free to do so. I'm open to all comments, suggestions, questions, etc.

Here are screenshots of what the user interface looks like:

Main page:



Memory Schedule page:



Timer Schedule page:



Color Values page:



Reboot page:



Reset page:



About page:



Thanks,
Harry

P.S. The pages are fully responsive and adjust on mobile devices.

P.P.S. Please ignore some of the bogus test values in the screenshots.
Harry Muscle is offline  
post #10 of 20 (permalink) Old 07-05-2015, 03:00 AM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Aug 2014
Location: Edmonton, Alberta, Canada
Posts: 797
Very nice!
robsworld78 is offline  
post #11 of 20 (permalink) Old 09-10-2015, 02:15 PM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
I finally found some time to load this onto my Arduino and debug it. I've committed lots of fixes to github. Web pages are being served very nicely now. A full load takes about 15 seconds which isn't that bad considering how slow an Arduino is and the fact that it's serving fully responsive pages along with a few images.

I ended up running out of code space with one of the fixes, so I had to remove DHCP support, however, that made room for making the time zones and daylight savings time configurable via the web interface.

Things are coming along nicely. I'd say it's around 90% done.

Thanks,
Harry
Harry Muscle is offline  
post #12 of 20 (permalink) Old 09-13-2015, 04:00 PM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
The code base is now basically all done. I've added the last set of configuration screens and tested everything I can think of. The only thing that I can't test is how it actually interacts with the various fixtures it supports, since I don't own all of them, however, the IR codes come from other tested projects so I'm pretty confident it will work just fine.

If anyone feels like trying this out I'd be more than happy to assist. I'm actually surprised there isn't more interest in this ... personally it seems so much easier to access the timer over the network than having to physically touch it to make changes which is what the rest of the Arduino light controllers on this site require. Also not having to change the time twice a year for daylight savings time is a big plus for me personally too.

BTW, here are the mobile screens for the timer:



















Thanks,
Harry
Harry Muscle is offline  
post #13 of 20 (permalink) Old 09-13-2015, 05:14 PM
Algae Grower
 
catskin's Avatar
 
PTrader: (1/100%)
Join Date: May 2004
Location: Redmond, OR
Posts: 33
Tons of interest <g>

...but this is the first I've seen the thread. I have the Sat PRO model and I'll build and test things as I get more parts.

I'm using the iAqua.Lite base code now, highly modified to also add data logging, temperature, etc. It works very well. I bought a RPi and have it setup to be my web server thinking the Arduino would not really be up to the task but I am not that far along yet.

I'm am not a programmer, just fooling around, so my coding is ... inexperienced.
catskin is offline  
post #14 of 20 (permalink) Old 11-02-2015, 09:01 AM
Algae Grower
 
PTrader: (0/0%)
Join Date: Sep 2015
Location: Pennsylvania
Posts: 39
@Harry Muscle - I've been looking at your code and wanting to give it a try. A couple weeks ago I started playing with the iAqua Lite but I like the idea of having something remotely accessible.

Unfortunately, I'm just learning Arduino and I'm really not a code guy at all. There's a few things I'm missing when I look at you code for this project.

1. How do you set the initial IP address? I see you have a web page for the network settings, but not sure how to get there without knowing the default the IP address (if there is one).
2. Which pin should the IR be plugged into? Is there a place to change/define this?
3. I'm going to try running on this on a Mega2560 board, do you know of any reasons it wouldn't work?

Sorry to ask such basic questions.
SL Dan is offline  
post #15 of 20 (permalink) Old 11-03-2015, 01:56 AM Thread Starter
Planted Tank Enthusiast
 
Harry Muscle's Avatar
 
PTrader: (1/100%)
Join Date: Mar 2007
Location: Canada
Posts: 593
Quote:
Originally Posted by SL Dan View Post
@Harry Muscle - I've been looking at your code and wanting to give it a try. A couple weeks ago I started playing with the iAqua Lite but I like the idea of having something remotely accessible.

Unfortunately, I'm just learning Arduino and I'm really not a code guy at all. There's a few things I'm missing when I look at you code for this project.

1. How do you set the initial IP address? I see you have a web page for the network settings, but not sure how to get there without knowing the default the IP address (if there is one).
2. Which pin should the IR be plugged into? Is there a place to change/define this?
3. I'm going to try running on this on a Mega2560 board, do you know of any reasons it wouldn't work?

Sorry to ask such basic questions.
Hi, thanks for the interest.

1. The IP address and settings in general are initially setup by running the following program on the Arduino: https://github.com/Stonyx/IRLightControllerReset. What this does is completely reset the EEPROM with default settings, including setting the IP address to 192.168.1.254.

2. The IR pin is determined by the IRRemote library and the pin differs for different boards. On the Arduino Uno it's pin 3. Here's the source for the library: https://github.com/z3t0/Arduino-IRremote. The pins for other boards I believe are defined in the irremote.h file.

3. I think it should work fine on a Mega, just need to figure out which pin to use for the IR transmitter on the Mega.

Let me know how things go or if you have any other questions.

Thanks,
Harry
Harry Muscle is offline  
Reply

Tags
None

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome