Aqua Controller via Raspberry PI

zemuss

Valuable Member
View Badges
Joined
Jun 1, 2010
Messages
1,254
Reaction score
137
Location
Florida
Rating - 0%
0   0   0
discoreefer,
Can't u setup a secure site with the PI? Connect via USER name and Password?
 
OP
OP
W

wolfenstein87

Community Member
View Badges
Joined
Feb 5, 2014
Messages
78
Reaction score
2
Location
DFW, Tx
Rating - 0%
0   0   0
I haven't set up an apache site with authentication, but I'm sure its something simple as an htpasswd reference.
 
Last edited:

Browner20

Active Member
View Badges
Joined
Nov 18, 2014
Messages
176
Reaction score
68
Location
Charlotte, NC
Rating - 0%
0   0   0
Programming novice here but extremely interested in this concept (I was pretty mean at programming the worm on the Commodore 64). I have been researching the Apexs for some time whilst trying to find the perfect opportunity to drop the bomb on wifey that I am going to spend $800(gold package) for a computer to monitor what she calls the "giant water box". Couple questions: both hardware options mentioned seem to have very limited physical protection and would have to be mounted externally correct? To that end can you purchase the probes for self wire and or with long cords? Also Apex claims to solve the concept of Galvanic isolation which could cause inaccurate readings, do these options cover that concept? My ATO is passive/gravity fed and my MH/T5 lighting has a power strip with 5 independent outlets so really only looking for a parameter solution and this project seems cost effective.
 

discoreefer

Community Member
View Badges
Joined
Aug 31, 2014
Messages
37
Reaction score
0
Location
USA
Rating - 0%
0   0   0
discoreefer,
Can't u setup a secure site with the PI? Connect via USER name and Password?
You certainly can, however that still doesn't matter if it gets hacked. You've got a webserver running as root, just bad practice all around.

I haven't set up an apache site with authentication, but I'm sure its something simple as an htpasswd reference.

You'd want to use SSL..., still very simple. But still for my purposes there isn't any reason to have the pi exposed to inbound connections from the internet. The only reason I'd need to connect to a webserver on the pi would be to change settings, but not for my monitoring. Not saying you can't just not what my plan is.
 

discoreefer

Community Member
View Badges
Joined
Aug 31, 2014
Messages
37
Reaction score
0
Location
USA
Rating - 0%
0   0   0
Programming novice here but extremely interested in this concept (I was pretty mean at programming the worm on the Commodore 64). I have been researching the Apexs for some time whilst trying to find the perfect opportunity to drop the bomb on wifey that I am going to spend $800(gold package) for a computer to monitor what she calls the "giant water box". Couple questions: both hardware options mentioned seem to have very limited physical protection and would have to be mounted externally correct? To that end can you purchase the probes for self wire and or with long cords? Also Apex claims to solve the concept of Galvanic isolation which could cause inaccurate readings, do these options cover that concept? My ATO is passive/gravity fed and my MH/T5 lighting has a power strip with 5 independent outlets so really only looking for a parameter solution and this project seems cost effective.

I plan on having my pi and arduino mounted inside of a case that's mounted under my tank by the sump.

The apex is awesome. For me personally I'm not doing a diy monitor to save money or thinking I can build something better. I like to make stuff, so it's just a fun project for me.
 

zemuss

Valuable Member
View Badges
Joined
Jun 1, 2010
Messages
1,254
Reaction score
137
Location
Florida
Rating - 0%
0   0   0
Ok then I will take another approach with this and since apache is a free product I will use it.

As discoreefer sated we will use flask on the PI. If I understand it correctly we can implement web services which would just be a GET and maybe some PUTs for configuration changes. When I dive into this I will have a better solution. But from what i am readying use the flask so we don't have to have root permissions. Then we can load apache on a computer if we needed to for a simple web application.

discoreefer let me know if im in left field still.
 

discoreefer

Community Member
View Badges
Joined
Aug 31, 2014
Messages
37
Reaction score
0
Location
USA
Rating - 0%
0   0   0
Ok then I will take another approach with this and since apache is a free product I will use it.

As discoreefer sated we will use flask on the PI. If I understand it correctly we can implement web services which would just be a GET and maybe some PUTs for configuration changes. When I dive into this I will have a better solution. But from what i am readying use the flask so we don't have to have root permissions. Then we can load apache on a computer if we needed to for a simple web application.

discoreefer let me know if im in left field still.

Flask will use mod_wsgi to communicate with apache. The issue with needing root is that when you make calls to the gpio library to access the IO pins on the pi, it needs to be run as root. So if your webserver is making those calls via your flask controllers then it needs to be run as root or you wouldn't have permissions.

I would suggest firing up a linux vm and install apache, mod_wsgi and flask and maybe make quick demo app. This would help you understand the basics and how all of the parts are able to talk to each other, etc... Here's a good tutorial on installing. https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

Another good, easy to learn python framework is web2py. It's very easy to learn, however it's a little heavy to run on pi. (unless you have a new one with the faster processor and double ram) My current web project I'm using (reefmatrix.com) is using that framework. (just a site project so it doesn't get worked on as much as I'd like) django is probably the most popular, but IMO not as easy to learn.
 
Last edited:

Browner20

Active Member
View Badges
Joined
Nov 18, 2014
Messages
176
Reaction score
68
Location
Charlotte, NC
Rating - 0%
0   0   0
I plan on having my pi and arduino mounted inside of a case that's mounted under my tank by the sump.

The apex is awesome. For me personally I'm not doing a diy monitor to save money or thinking I can build something better. I like to make stuff, so it's just a fun project for me.

Disco - Apex is obviously awesome. I guess my question is would an Apex be overkill for my needs described above, basically just PH, temp, salinity, orp monitoring/automation?
 

KoleTang

Valuable Member
View Badges
Joined
Jun 27, 2011
Messages
2,346
Reaction score
81
Location
Woodbury, MN
Rating - 0%
0   0   0
I'm planning on using flask as it's pretty light weight and I prefer python. There are lots of option you could use though depending on what your comfortable with. Basically you're going to be creating a webserver that you connect to. One issue with allowing access to your pi from the outside internet is that you're going to need to run your webserver as root so that it has access to the gpio pins. This opens some security issues.

My plan was to have flask setup on the pi just to edit settings/change parameters, etc... and it would only be available on my local network (or vpn) but not to the outside world. As my pi collects data, that will be uploaded to a web app on my website where I can monitor the data, send alerts, etc...

Sounds good to me. I'll be along for the ride even though I'm fairly new to this. Most I have done is get limelight pi to stream from my GPU, and even then I haven't gotten sound to work. :p

Would it be possible to get some resources like a parts list going? Let me know what I can do to help.
 

zemuss

Valuable Member
View Badges
Joined
Jun 1, 2010
Messages
1,254
Reaction score
137
Location
Florida
Rating - 0%
0   0   0
Went to purchase the PI 2 from element and they were out of stock. That little bugger is popular now.
 

Ace25

Active Member
View Badges
Joined
Apr 30, 2012
Messages
339
Reaction score
11
Location
California
Rating - 0%
0   0   0
Does anyone know if the Arduino can power more than 6 channels for LED drivers??

Power LEDs or just control them? I know my Reef Angel can't power anything more than a few moonlight LEDs. My PWM module has 6 ports and my Reef Angel itself has 2, for a total of 8 PWM ports. I can add another PWM module if I needed 6 more ports.

For me, the only issue I can foresee with the arduino is what has already been stated, memory limitations. But I have the Wifi Module, PWM module, RF Module, 2 power blocks, 3 temp sensors, ATO, pH, salinity, leak detector, and I am running about 70% of my memory. I can't think of anything else to add so right now I have no memory limitation issues and I have every expansion I can think of (but who knows what may come out in the future).

Picture was when I first got the reef angel and was getting it mounted. Since then I have added several modules. PWM module is the little black box on the left, wifi module on the right.
 

Attachments

  • 5708387391_90a9e4da2d_o.jpg
    5708387391_90a9e4da2d_o.jpg
    45.1 KB · Views: 311

zemuss

Valuable Member
View Badges
Joined
Jun 1, 2010
Messages
1,254
Reaction score
137
Location
Florida
Rating - 0%
0   0   0
Update -- You can now purchase them off AMAZON.
 

SDchris

Active Member
View Badges
Joined
Mar 3, 2015
Messages
123
Reaction score
164
Location
Sydney
Rating - 0%
0   0   0
1. First thing we should get a consensus on is a list of requirements, what do we want this device to be able to do. (Light timer, wave maker, LED controller, top-off, ph probe, etc...)
All of the above and much more. Currently working on using the acceleromter/gyro/magnometer data from an iphone in a waterproof case floating on the water surface to auto tune a wavemaker (wave height).

Chris
 

ifarmer

Valuable Member
View Badges
Joined
Nov 3, 2012
Messages
1,344
Reaction score
252
Location
Hawaii USA
Rating - 0%
0   0   0
Not really worth the effort.
The cost of the pie alone is already like $70. When this is is done, able to ready any parameter. It will be a few hundred bucks . What is the retail value of this diy thing? Cleaniless and liability?
Maybe it is good for educational purpose. But to use on the tank uhhhmmmm.
For just a little over $100. You can.get a rkl and be done with it.
 
Last edited:

cope413

Active Member
View Badges
Joined
Apr 6, 2014
Messages
442
Reaction score
88
Location
Orange County, CA
Rating - 0%
0   0   0
Not sure if the OP has come across this forum before - ReefPI - but there's been quite a bit of work done already. No need to reinvent the wheel on some of this stuff...

ReefPI

I had a pi setup with pH probe and PWM control for my LEDs, PID control for heater, and an opto sensor for ATO, but it was getting more and more complicated to add modules/probes, and frankly, it was becoming a breadboard nightmare of epic proportions.

Yes it was fun (though not as much for my wife) and satisfying to build my own controller and not pay $800 for something that definitely could be made for significantly less, I decided that it was inevitable I was going to have a tank crash due to a bug in my code (or someone else's), a failed relay or voltage regulator (or other component), or even something crazy like the bug on the Pi2 with the xenon flash-reset.

I finally sprung for an APEX a couple weeks ago, and while the price tag still hurts a bit, I'm already extremely happy and quite relieved. I'm doing a lot less worrying than I was with my pi project.

All that said, I've designed a few different raspi cases and would happily 3D print cases for a few of you embarking on this project if that's something that would be helpful.
 

mrehfeld

New Member
View Badges
Joined
Dec 4, 2013
Messages
24
Reaction score
22
Location
NJ
Rating - 0%
0   0   0
Have you thought about using the Arduino YUN? It has a Linux OS embedded with wifi, acts as a web server and controls/links to the microcontroller side via software bridge. It's completely programmable via the wifi.
 

bobcorr

New Member
View Badges
Joined
Jul 9, 2010
Messages
1
Reaction score
0
Location
Pennsylvania
Rating - 0%
0   0   0
Another good choice would be the Teensy 3.1. You can program it with the Arduino IDE, but it is much faster than the Arduino, has 4X the memory, and much more I/O capacity. https://www.pjrc.com/teensy/teensy31.html. The Pi is easier to program, but more difficult for an inexperienced user to use the I/o ports. That said, the Pi would be easier to program for the internet and wifi.
 

chessplayer86

Active Member
View Badges
Joined
Dec 30, 2014
Messages
135
Reaction score
18
Location
Mexico
Rating - 0%
0   0   0
OKay so I know this is a kind of old post.. but here we go. I was viewing ladyada videos and find this facinating. The $5 USD pi zero awesome!!.. the idea here is make something cheaper in price with same functionality as the new controllers and Open Source.

I know you dont need to reinvent the wheel.. but, you may upgrade the wheel technology to the trending one.. Who saw CES 2016 videos and trend news?.. the Internet of Things is the "Thing" , I know it has been there since years ago. But what are we doing to make it happen?

2016 is the year for us to work on open source controllers. We need contribution on code, make a good index of coding examples, and make it work!.. ahaha maybe I am exited on this. But read about MQTT.org and also watch January 16, 2016 ladyada´s video explaining the capability of this technology.

Now imagine you are in your car, and you could press a button on the "eink touchscreen on your dashboard" and the car would give you a status on your aquarium, connect to your webcamera take a picture and send it to you. Hell post it on twitter and facebook by just pressing a share results button. I mean we need something this sofisticated taken to a simplest level after a plug and play setup. I wish I had this running.

Make it happen! =) 2016 yes!
 

chessplayer86

Active Member
View Badges
Joined
Dec 30, 2014
Messages
135
Reaction score
18
Location
Mexico
Rating - 0%
0   0   0
Also need a sensor on every possible cup, reservoir , media reactor which pushes relevant data if anything happens, example:

1. Skimmer Overflow
2. Dosing Reservoir , when is almost empty, send you prices to your email for the product your dosing, hell maybe order it online.
3. RODI almost need to change cartridge, same thing as the reservoir. send you email with prices maybe..
4. Media reactor not working properly, maybe send a notification. or how about a change of media advising.. there are a lot of upgrades we can make happen.
5. water flow meter sensors? or something similar... water pressure sensors on the rodi input , send notification if water pump is failing?

should I go on? =)
 

Bubbles, bubbles, and more bubbles: Do you keep bubble-like corals in your reef?

  • I currently have bubble-like corals in my reef.

    Votes: 49 41.5%
  • I don’t currently have bubble-like corals in my reef, but I have in the past.

    Votes: 12 10.2%
  • I don’t currently have bubble-like corals in my reef, but I plan to in the future.

    Votes: 33 28.0%
  • I don’t currently have bubble-like corals in my reef and have no plans to in the future.

    Votes: 22 18.6%
  • Other.

    Votes: 2 1.7%
Back
Top