RPiAqua (Raspberry Pi Light Controller - In Progress) - The Planted Tank Forum
 6Likes
Reply
 
LinkBack Thread Tools Display Modes
post #1 of 103 (permalink) Old 07-23-2018, 08:48 PM Thread Starter
Planted Member
 
Kaiede's Avatar
 
PTrader: (0/0%)
Join Date: Sep 2017
Location: Seattle, WA
Posts: 246
RPiAqua (Raspberry Pi Light Controller - In Progress)

Forking this from the Fresh 3.0 vs Twinstar thread, so I can discuss/report work on this project.

I haven't found a light controller I liked. My favorite to date is the one built into the Freshwater Prime. I just wasn't quite a fan of the lights themselves, and prefer something that is silent. So that leaves me in a weird area where there are a few "not quite there" controllers that exist, but nothing quite as powerful as what I really want.

Enter RPiLight. I'm putting it together with the idea that by using a Raspberry Pi with wireless, there is reasonable wiggle room for features and functionality without worrying too closely about memory and performance.

Written in Swift, for a mix of performance and stability, and to make it easier to integrate things going forward with my limited time.

Targeted Equipment:
  • Main Board: Raspberry Pi Zero W or 3B
  • Channel Controller: Built-in PWM (2 Ch), or Adafruit PWM/Servo Bonnet (16 Ch)
  • LED Controller: MOSFET Trigger Switches, or Meanwell LDDs w/optional Adafruit Bi-Directional Logic Converter

Feature List:
  • Adjustable PWM from 480 Hz - 16 KHz (Adafruit limited to 1.5 KHz)
  • 12-bit Dimming
  • "Unlimited" Events
  • Lunar Cycles
  • No Online Accounts

Future Ideas:
  • Thunderstorm / Weather Support
  • REST API for Smartphone Control Apps
  • Web Configuration Interface

On the topic of REST APIs and Web Configuration, my own web development skills are rather weak, and the last time I used AJAX was to clean my bathroom. So once it is on GitHub, I'd welcome any help to provide that part.

----

GitHub Link: https://github.com/Kaiede/RPiLight
Current Milestone Work: v0.4 - Thunderstorms

Currently Working on (Aug 28, 2018): 0.3 is out.

Starting to think about how Thunderstorms will work. These should be a lot easier to implement than lunar cycles (I don't have to write a whole library to do it), but I a going to take a week or so to breathe before starting the next bit of work. Binaries that can be installed on the Raspberry Pi using 'apt-get' are also in the pipe.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by Kaiede; 08-28-2018 at 01:36 PM. Reason: Updated Status
Kaiede is online now  
Sponsored Links
Advertisement
 
post #2 of 103 (permalink) Old 07-23-2018, 08:55 PM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Feb 2018
Location: Maryland
Posts: 578
Fun... my dumbass wanted to save work by getting a premade controller and somehow now I'm rewriting their firmware for them. I probably should have just built one but hindsight and all that...
What the heck is fast forward?
Wobblebonk is online now  
post #3 of 103 (permalink) Old 07-23-2018, 09:43 PM
Wannabe Guru
 
PTrader: (0/0%)
Join Date: May 2017
Posts: 1,698
I can think of a few similar projects in the DIY section; Pi + wifi shield.

The one guy shared the hardware config, had a PCB printed (can be built without pcb) and uploaded his code to github. It might be worth checking out. You will get much farther with your limited time leveraging his code base.

I was going to build it but then sanity struck and I realized a $30 controller does what I need and that my time is worth much more than .05/hour.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ChrisX is offline  
 
post #4 of 103 (permalink) Old 07-23-2018, 10:19 PM
Algae Grower
 
f-fish's Avatar
 
PTrader: (0/0%)
Join Date: Jul 2009
Location: JHB, South Africa
Posts: 91
Very nice .. any plans for adding some mqtt functionality? Is the idea that this will be an end node or also a basic hub for other sensors and features?
Fully agree with No Online Accounts ....

Later Ferdie

F is for fish (with plants) - the more I see the more I like. Need more pictures
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
f-fish is offline  
post #5 of 103 (permalink) Old 07-23-2018, 10:32 PM
Planted Tank Guru
 
PTrader: (0/0%)
Join Date: Jun 2013
Location: WI
Posts: 10,751
no, no no,, these projects fall down a rabbit hole and never finish...or get lost in endless revisions/confusion/demands..

KISS...KISS..
Wobblebonk likes this.

"A man with a watch knows what time it is. A man with two watches is never sure."
jeffkrol is online now  
post #6 of 103 (permalink) Old 07-23-2018, 10:53 PM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Feb 2018
Location: Maryland
Posts: 578
I'm nearly done with my little side project but that has very limited ram/program space limitations... well side project #1 anyways :/
Wobblebonk is online now  
post #7 of 103 (permalink) Old 07-23-2018, 11:29 PM Thread Starter
Planted Member
 
Kaiede's Avatar
 
PTrader: (0/0%)
Join Date: Sep 2017
Location: Seattle, WA
Posts: 246
Quote:
Originally Posted by Wobblebonk View Post
Fun... my dumbass wanted to save work by getting a premade controller and somehow now I'm rewriting their firmware for them. I probably should have just built one but hindsight and all that...
Yeah, in my case, the Pi was sitting around already. And targeting the Zero W makes it surprisingly cheap, while giving more wiggle room than an Arduino or similar.

Quote:
Originally Posted by Wobblebonk View Post
What the heck is fast forward?
Demo/Preview/etc. Play the schedule very quickly. Feel free to mock my inability to name things.

Quote:
Originally Posted by ChrisX View Post
I can think of a few similar projects in the DIY section; Pi + wifi shield.

The one guy shared the hardware config, had a PCB printed (can be built without pcb) and uploaded his code to github. It might be worth checking out. You will get much farther with your limited time leveraging his code base.
I assume you are referring to FishNet, yes? Took a quick look, it's interesting, but building it pretty much exclusively in Node-Red makes some things easier, and some things harder. I looked at Node-Red myself, but decided python was going to be fairly straight-forward and could be bolted onto a front-end built in some other way once it was time for that. Node-Red-Dashboard would be an interesting stop-gap for a web front-end, but not really ideal.

There's a good reason he went the route he did, but there's a good reason I decided against that route. Node-Red just isn't flexible enough for the thing I'm looking to build. It's a great sandbox, and a great way to make it easier for someone to play with the IoT. But not really ideal once you hit the edges of the sandbox.

I also looked at iAqua/iAqua Lite. But if you are referring to something different, and my search didn't catch it, I'd be happy to take a peek.

And yeah, this probably should be moved to the DIY section, whoops. I'll see if I can get a mod to do that.

Quote:
Originally Posted by ChrisX View Post
I was going to build it but then sanity struck and I realized a $30 controller does what I need and that my time is worth much more than .05/hour.
I wish that were true for what I wanted.

Quote:
Originally Posted by f-fish View Post
Very nice .. any plans for adding some mqtt functionality? Is the idea that this will be an end node or also a basic hub for other sensors and features?
Fully agree with No Online Accounts ....

Later Ferdie
Plans should be driven by a need, and a goal. Right now the need I have is to have a controller that I can use to dim my Twinstar light (and my second Twinstar down the road), and have better timing configuration than the Storm/HurricaneX or the Bluefish, but isn't tied to Windows-only software that seems to break for me like the TC-420 does.

That's the need. That's the thing I will deliver, since it's mostly done already.

The goal though, is more that I want to chase the AI Prime's configurability. That's the north star.

Now, if I can deliver on that goal with the web UI is a good question (The REST API is effectively the path to get to a Web UI). But with the prototyping I've done so far, it should be possible to at least capture the feature set, using a JSON config file at a minimum without too much work being done.

If you approach this as expecting a single-mode TC-420 that you can more easily build to what you need, and configure it without proprietary software, you won't be disappointed. If you want this to become the next iAqua, I doubt it. The only automation I do on my tanks is lighting.

Quote:
Originally Posted by jeffkrol View Post
no, no no,, these projects fall down a rabbit hole and never finish...or get lost in endless revisions/confusion/demands..

KISS...KISS..
I hear ya. I want to focus as much as possible on providing smaller chunks of functionality that can be used as early as possible.

Personally, I was hoping to be able to hook this up on one of my tanks this weekend and let it run through the week to see how well it works. I was set back a little bit on prototyping the scheduler. Technically, I could still do it right now, but I wasn't happy with how much timing drift I was seeing with the super-dumb sleep method I was using to space apart events.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Kaiede is online now  
post #8 of 103 (permalink) Old 07-24-2018, 01:36 PM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Feb 2018
Location: Maryland
Posts: 578
Quote:
Originally Posted by Kaiede View Post
Demo/Preview/etc. Play the schedule very quickly. Feel free to mock my inability to name things.

I think hurricanex calls it "sim" mode and that code probably was carried over from storm x code though I don't have a stormx to confirm or the original source for that though I'm pretty sure that's using a gpl license so not too hard to get the code. Heh

I have some crazy ideas for app control / assigning channels to rgb for bluetooth/wifi control but I hate working on iphone apps so they might be sol for a while... though all of that won't be for a while anyhow also. But stuff I want for myself I will find the time to do :/

Last edited by Wobblebonk; 07-24-2018 at 02:47 PM. Reason: ...
Wobblebonk is online now  
post #9 of 103 (permalink) Old 07-24-2018, 02:10 PM
Wannabe Guru
 
PTrader: (0/0%)
Join Date: May 2017
Posts: 1,698
Quote:
Originally Posted by Kaiede View Post
Plans should be driven by a need, and a goal. Right now the need I have is to have a controller that I can use to dim my Twinstar light (and my second Twinstar down the road), and have better timing configuration than the Storm/HurricaneX or the Bluefish, but isn't tied to Windows-only software that seems to break for me like the TC-420 does.
I have the TC421 which has android/iOS software. Granted its not sexy, but it does work and adjustments can be made directly from the phone. Windows software could be run from Coot Camp or Wine. Its not something that you will be looking at much once it's set up.

BTW, I dont think we are referring to the same DIY build, but there are so many of them.

If you only need five channels with full ramping and automation, then TC421 is a decent choice.
The Dude1 likes this.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ChrisX is offline  
post #10 of 103 (permalink) Old 07-24-2018, 05:26 PM Thread Starter
Planted Member
 
Kaiede's Avatar
 
PTrader: (0/0%)
Join Date: Sep 2017
Location: Seattle, WA
Posts: 246
Quote:
Originally Posted by Wobblebonk View Post
I think hurricanex calls it "sim" mode and that code probably was carried over from storm x code though I don't have a stormx to confirm or the original source for that though I'm pretty sure that's using a gpl license so not too hard to get the code. Heh

I have some crazy ideas for app control / assigning channels to rgb for bluetooth/wifi control but I hate working on iphone apps so they might be sol for a while... though all of that won't be for a while anyhow also. But stuff I want for myself I will find the time to do :/
iOS is partly my bread and butter. I'd have a far easier time putting together an iPhone app than a web app. But you are spot on with the bolded bit. That's probably the best lesson I've learned since college. I will do it if I want it, and I will not do it if I don't. So learn how to keep what I want and what would be cool separate for projects like this. You'll be much more honest about what you can accomplish with it, and be more focused.

Second most important thing: Don't engineer the whole thing before you start. I've seen too many projects evaporate under the weight of designing too much too quickly.

Quote:
Originally Posted by ChrisX View Post
I have the TC421 which has android/iOS software. Granted its not sexy, but it does work and adjustments can be made directly from the phone. Windows software could be run from Coot Camp or Wine. Its not something that you will be looking at much once it's set up.
I had this big rant planned about how I got here, but decided to cut it, there's plenty of tidbits in my post history here and there. I had the TC-420. Stopped being able to update it, spent too much time trying to figure out why. Not going down that rabbit hole again. Tried multiple other controllers. Still reached this conclusion.

I'm not really sure what you hope to gain here by pushing this idea that I should just do something else? Forgive me if I'm blunt, but this is starting to come off as a bit patronizing. Please stop.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Kaiede is online now  
post #11 of 103 (permalink) Old 07-24-2018, 07:20 PM
Wannabe Guru
 
PTrader: (0/0%)
Join Date: May 2017
Posts: 1,698
Quote:
Originally Posted by Kaiede View Post
I'm not really sure what you hope to gain here by pushing this idea that I should just do something else? Forgive me if I'm blunt, but this is starting to come off as a bit patronizing. Please stop.
OK.

There are products that meet your requirements, and also other fully actualized DIY projects that do the same.

When you said you had "limited time" to work on this, thats when I thought you could use a dose of reality. Just trying to save you alot of work. If your time genuinely is limited, there are other ways for this to go.

If you are *aware* of all the other solutions, if you've gone 20 pages deep in the DIY forum and have seen those projects, then you are operating from an informed place. Two open source projects that do the same thing not as strong as one project with multiple contributors.

You never made a case why the other projects wouldnt work, besides a preference for working in a specific language.

Good luck with your project.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ChrisX is offline  
post #12 of 103 (permalink) Old 07-24-2018, 07:20 PM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Feb 2018
Location: Maryland
Posts: 578
Quote:
Originally Posted by Kaiede View Post
iOS is partly my bread and butter. I'd have a far easier time putting together an iPhone app than a web app. But you are spot on with the bolded bit. That's probably the best lesson I've learned since college. I will do it if I want it, and I will not do it if I don't. So learn how to keep what I want and what would be cool separate for projects like this. You'll be much more honest about what you can accomplish with it, and be more focused.

Second most important thing: Don't engineer the whole thing before you start. I've seen too many projects evaporate under the weight of designing too much too quickly.
I'm not doing the hardware at all that's being sent to me free(& maybe possible compensation/credit) for writing firmware / software so it's not exactly my project per se. Even if I get frustrated and give up theres a small team of people working on it. Though I'm sure I can suggest hardware changes provided ample reasoning, they had already asked if I wanted hardware changes to the existing device but I decided against it since they're working on a new one anyhow.

I hate using macs / xcode. I have to sometimes for work but I would prefer not to vs ubuntu or windoze. Personal problems.
Wobblebonk is online now  
post #13 of 103 (permalink) Old 07-24-2018, 09:21 PM Thread Starter
Planted Member
 
Kaiede's Avatar
 
PTrader: (0/0%)
Join Date: Sep 2017
Location: Seattle, WA
Posts: 246
Quote:
Originally Posted by Wobblebonk View Post
I hate using macs / xcode. I have to sometimes for work but I would prefer not to vs ubuntu or windoze. Personal problems.
To each, their own. I enjoy working on many platforms. The only one I hate working on is Win32 (the API). Give me .NET any day, but I do wish Microsoft had a modern framework for native developers that didn't require the level of contortion that using C++ .NET from a legacy app seems to require.

----

Quote:
Originally Posted by ChrisX View Post
There are products that meet your requirements, and also other fully actualized DIY projects that do the same.

When you said you had "limited time" to work on this, thats when I thought you could use a dose of reality. Just trying to save you alot of work. If your time genuinely is limited, there are other ways for this to go.

You never made a case why the other projects wouldnt work, besides a preference for working in a specific language.
This bit right here is the problem. If you think that serving up a "dose of reality" is the right approach when you don't know someone's background, don't know their experiences to date, and generally haven't interacted with them before... Maybe you should think a bit on a better way to approach things. Maybe interrogating them over the internet is not the best use of either person's time. Thankfully, I don't need to justify my time spent to you to achieve what I am setting out to do. And I'm not inclined to spend my time regurgitating my pages of notes in order to convince you. Believe whatever you like.

Hell, the thing is, you may even be right 90% of the time and the project dies on the vine. Who cares? Hopefully that person at least tried and learned something. The road to success is paved in failures and lessons learned.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Kaiede is online now  
post #14 of 103 (permalink) Old 07-24-2018, 10:01 PM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Feb 2018
Location: Maryland
Posts: 578
I can agree with the win32 nonsense, honestly my problems with macs is just using the ui / having to update / apparent shoddiness of the store updating / them constantly(more like once a year) patching out the crap I did from ios so I have to find a new way/ the licensing gauntlet for ios apps... I'm tired of explaining to a new rep (from other companies that license a product from my work) how to update the licenses that expire every year. I probably don't like it because if I have to touch it at all it's only for licenses expiring or they broke crap for a new ios version (usually they did it intentionally).
Wobblebonk is online now  
post #15 of 103 (permalink) Old 07-24-2018, 10:03 PM
Algae Grower
 
f-fish's Avatar
 
PTrader: (0/0%)
Join Date: Jul 2009
Location: JHB, South Africa
Posts: 91
Think the approach of doing one thing well and keeping it sensible and focused plays well when creating building blocks. You say just automating lights, but it is more than just on / off so well worth the effort. Keen to understand, are you or do you plan on running multiple tanks or is your current need to only do this for 1 tank? Reason I ask, I have found that monitoring before automation plays a bigger drive when you have multiple tanks and need to have that single view of what is actually going on. Having looked at several all-in-one aquarium projects, I have also opted for purpose build solution blocks that can be operated centrally but that actually function autonomously for that one function.

Looking forward to seeing it on github ...

Later Ferdie

F is for fish (with plants) - the more I see the more I like. Need more pictures
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
f-fish 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