Software platforms for garden automation

DrewT

Well-Known Member
I'm excited to find some experienced engineers on the forums and I wanted to start a discussion about aggregating sensor/switch administration. Some of us may only have a single sensor or switch in our garden while others have hundreds. I'm looking to find an administration/automation solution that would suit most needs and pave the path to scaling out technology in the garden.

Recently, @odam2k and @Latitude17 were discussing Blynk as a way to create mobile phone dashboards for networked sensors and switches. This got me to thinking if there were other open source solutions that may work to extend ease of use and compatibility of smart sensors in the garden.

I'll start with a diagram illustrating what I've come up with in terms of an ideal arrangement.

PxN Diagrams-Software topology.png


Details concerning the more important aspects of the system:
  1. I think any component worth adding to the system should be atomic, meaning a fully functional device on its own. None of this "must get master controller or brain to use" stuff. I should be able to get a single switch or sensor, and wirelessly administrate it from my phone as the base use case.

  2. The method used to administer any aspect of the system should be platform agnostic. Any commonly available networked device like a phone or computer should be able to connect to and manage the system.

  3. The system must not depend on external networks (requiring an internet connection), but may optionally integrate with one or more services on the internet.

  4. No proprietary software. I should be able to download, install, configure, and use this system without spending a dime. I should also be able to modify any of its code or functionality to suit my needs without restriction.

  5. I should be able to direct communications wirelessly or over wired connections for any device. Providing an optional wired bus topology makes this solution scalable in situations where security and simplicity are a priority.

So far there are only two solutions that even meet the bar for me.

  • OpenHAB - An open source automation platform that allows us to create physical devices and pair them with software bindings for integrated functionality. This solution has a rule engine that allows IFTTT event logic to be programmed through a graphical interface.

  • Hass.io - Another open source automation with many of the same features presented by OpenHAB. This solution supports a wide variety of existing devices out of the box (many of them not related to gardening however)
Does anyone else have a suggestion they'd like to include? Are there other open source automation platforms not listed that provide the same functionality?
 
Quite often I've found it easier and quicker to start from scratch rather than learn and work around the idiosyncrasies of an existing platform. More than once I've had to debug an existing platform, and I've always had to develop work arounds for areas it didn't quite meet my needs. At the very minimum you'll need access to the source code, so you can make required changes.

A platform may allow rapid application development (RAD), but usually consumes more resources than required. It will actually slow you down if you encounter problems with it. A software development company I worked for had to wait over 14 months for a RAD platform development company to find and eradicate some of the bugs in their product. That delayed our launch of key features for more than a year.
 
On smaller projects I would tend to agree with you. In this case, the amount of work involved is way beyond my capacity and what's out there is pretty darn good in my opinion. Have you looked at OpenHAB? The framework is robust and it might be as easy as writing isolated bindings for my specific projects. I cant imagine trying to write the server side stuff and front-end framework myself... it would simply never get done.
 
I'm a roll your own type, as I've said elsewhere, I don't mind re-inventing the wheel... Not so much because I think I can build a better wheel, but I will certainly KNOW and UNDERSTAND that wheel much better than just using someone else's....

Besides, I've got plenty of time, nothing else to do, and I need to keep my mind occupied... :)
 
@odam2k thanks for joining the conversation :) . Is Blynk not something you find useful? Do you plan to scrap it as a tool and build a similar version from scratch? Blynk, and solutions like it, did not come from people tinkering by themselves in a bubble. I get this odd push-back in general from folks on forums. It's like most acknowledge the critical value of technology but simultaneously cast indifference and cynicism towards it.

I'll say this once, as it's in my heart and will drive my participation in this forum. I'm here because I want to build systems that empower people to grow plants (food and medicine). I've read about your journey and appreciate where you're coming from. My journey has put me in a place where I have knowledge and resources to do something great for many besides myself. If I fail to contribute to something meaningful, like empowering people to easily feed or medicate themselves, I have squandered my gifts. I've made the money, I've traveled the world, I am healthy. I wake up every day inspired for no specific reason and feel compelled to put these gifts to use.

Consider the feedback and advice you've benefited from on this forum. Perhaps it came from people wishing to contribute to, collaborate with, or help you in your work. Consider how you might be able to do the same for me, I know you're capable. I ask the world "what do you think about this, how could it be better", and in reply I tend to get different flavors of "I don't care". Please don't take this personally. This is a frustration I have in general.

Well, maybe I ripped on the Dutch Treat a tad hard tonight :bong:. I don't mean to offend anyone. I just see a ton of smart people and think, damn we could do some really cool stuff together.
 
I'll be honest with you, Blynk is cool, but I nearly DID end up writing my own version, I had no idea what Blynk could do, I'd heard the name, that was about it. I sat down and started learning to program Android with java. I'm not saying I would have accomplished results like Blynk has, but I'm not afraid to plow ahead on my own if need be. And to answer your burning question, Yes, I probably will replace Blynk with something I write, for no other reason that I want to learn. It's on my todo list, but at the very bottom...

That's MY project, run according to my goals...

As for YOUR project, there is no reason I can't switch hats, and look at what YOU want to do, and contribute in a helpful way toward your goal. I guess my above post didn't quite send that message :(

If you are looking to start from some existing solution, and try to move it forward, there's going to be a huge investment of time as you need to first, become an EXPERT User of the system. Then you need to go under the hood, and become as knowledgeable about it as it's creator is. I have experience taking over maintenance of existing software projects.

In the end, how close is the existing solution to your own goals? If it's really close, then are you adding any benefit? If it's a long way, then how much time will you still need to allocate for design,development, integration, testing, of just your changes, that could have just gone toward starting from scratch, and not having to make compromises. Add it to the time you need to invest in learning the existing solution in depth and you just might have enough time to write it all yourself.

And by yourself, I don't mean just you, but you and whatever "open source contributors" end up participating in your project.

There are many ways to accomplish the same goals, and while each of us is on our own journey, our paths cross, and when they do, hopefully everybody benefits.

What do I think? Really? Ok, here it is...
I would focus less on the technology I want to use and focus entirely on the solution I want to provide. Never mind the hardware, software, and even the architecture to start with, what DATA do I want, and why? What can I do with it?
Then once I know WHAT I want to do, I could start thinking about HOW to do it. At this point, it would be easy to try to align YOUR spec with any and all existing solutions, and know which ones you want to look at more closely, or perhaps you will realize just how revolutionary your ideas (spec) are, and that nothing comes close. Unfortunately, then you decide if you want to compromise and make the solution and your spec fit, or just go ahead and do it from scratch. If the compromises are acceptable, then that's your path...

I'll try to remember to change my hat before I come into your thread so I'm in the right mindset :) I think what you are doing is noble, I spent nearly my entire career writing software for some of the largest Non Profit's Fundraising departments. I always felt good about what I was doing... Using your gifts to benefit others is rewarding in itself.

Perhaps you'll get this project off the ground, and I'll be able to contribute in a helpful way. I'm more than happy to share everything I've learned with my own project, but I need my project for my own piece of mind, it keeps my personal demons at bay :eek:

Ok, lets go!
 
If you are looking to start from some existing solution, and try to move it forward, there's going to be a huge investment of time as you need to first, become an EXPERT User of the system. Then you need to go under the hood, and become as knowledgeable about it as it's creator is. I have experience taking over maintenance of existing software projects.

Then as you are programming your application you WILL run into bugs in that existing solution. If it's an open source solution, YOU will end up debugging it. A good example of this is TJ Gold, which was a graphical user interface for DOS written in Borland Pascal. I ended up spending more time fixing bugs in that than working on our application.

A more current example is the Arduino. Even the standard libraries that come with it have problems. The documentation is poor by my standards. I ended up writing my own libraries to take their place.

There are dozens more examples. Any programmer with at least some experience has horror stories about trying to use existing platforms.
 
Here's my $.02:

People have been writing about grow room automation for years, even as far back as 2011 on 420magazing.com with Arduino's, and they always hit some kind of wall that just takes the motivation right out of them. Lack of skill, frustration with hardware, lack of good documentation on libraries, lack of time... we've all been there.

It's a tough nut to crack, and it's even tougher to try to be all things to all people to cover all situations. Write it for yourself, and if you're feeling generous when you're happy with it - open source it somewhere like GitHub.
 
Thanks @Latitude17, I appreciate the feedback!

they always hit some kind of wall

For me personally, my only wall is working in isolation. I feel the advice of "going it on your own" is recipe for failure if your goals are to positively benefit others besides yourself. I'll continue to look for opportunities to collaborate and engage in conversation that supports collective gain.
 
@DrewT Any more thoughts or work on this? I just finished coding my outdoor fan logic. I'm trying to write software for a semi sealed environment. Since I'm growing in the attic the conditions will be harsh. My goal is to use fresh air when possible, else fall back to more active measures, like heater/AC. It ended up being pretty complicated to try and balance ideal temperature and humidity, since the outside air might be good to help one of those values but could make the other one worse.
 
The joys of open source include the fun of equally excellent ideas that don't align with the vision of the "founder". I'm happy to look at things and help where I can - don't let us old grumpy farts take the wind out of your sails. :high-five:
 
Any more thoughts or work on this?

I'm zeroing in on a direction I feel has the best potential. After prototyping a few designs I really like the functionality of both local and remote management. I've got a private fork of Tasmota running and plan to customize it to serve as the base program logic for individual component modules. Tasmota has managed to pack a ton of functionality into a binary that can run on the ubiquitous esp8266 package (1M no spiffs). This makes it a very compatible runtime environment but it has a ton of junk thrown in and the code base is messy in my opinion. I'm stripping non-essential libraries and reworking the web server response handlers to make direct management (through captive portal) a smoother experience.

I'm really leaning towards OpenHAB for the orchestrator. It runs on cheap hardware (Raspberry PI) and supports a ton of existing IOT solutions out of the box. As I continue refining the component modules I plan to slowly integrate new bindings required to connect a given component module to OpenHAB. I'll start with the switched power relay module and then move quickly to environmental sensors. My primary focus will be getting these bindings to play nice with the newly released graphical rule engine. This will give you the ability to manage garden senors and switch logic in an easy IFTTT style interface.

don't let us old grumpy farts take the wind out of your sails.

Thanks @Latitude17! Truth is, I'll take feedback however it's served and I'd rather grumpy feedback than none at all. You folks have gifted the forum with a ton of great information over the years and I'll make things work with whatever I can pull from that invaluable body of work.
 
Here's my $.02:

People have been writing about grow room automation for years, even as far back as 2011 on 420magazing.com with Arduino's, and they always hit some kind of wall that just takes the motivation right out of them. Lack of skill, frustration with hardware, lack of good documentation on libraries, lack of time... we've all been there.

Not saying it won't happen, but 10 months so far on my project, and still working on it 16+ hours a day...
Every day I deal with the first 3 issues, but since I have nothing else to do, lack of time is not an issue.... :)

I think the fact that I have no "finish" in mind, this will simply be an ongoing adventure, means I'm not chasing any particular targets, either code wise, or time wise... It's a programmers dream job, it just doesn't pay, lol...
When I get particularly frustrated, I'll go have a nap, or watch TV, or play with the dog, just get my mind off the problem for a bit, let the answers come on their own...

Anyhow, here's to another 10 months! :thumb:
 
Is this stil alive? Blynk has matured to 1.6x version, you can have local server so there would be no need for OH of Hassio, but there is even better solution: MyCodo raspi controller, environment control, nutrient mixing/care, logs and web interface... Im making my own tough, and may help woth anything arduino/esp32 related...
 
Back
Top Bottom