Limitless Garden - the home-grown IOT backend service

2 minute read

In the first three parts of this series we have looked into

Now we want to go the next step toward an automated home irrgiation system. For that we will need to go beyond visualization and anayse the real data - so we need to save them first.

For this I have created a small IOT-backend written in node.js with a MongoDB datastore. I could also have used one of the many cloud offers already available for IOT data storage:

I have looked at them and then entered into a severe analysis paralysis - I could not decide which one to use. So I thought it would be nice just to start my own back end with a very simple CRUD code in node.js, the core api code is just about 50-60 lines of code.

As a platform I have chosen heroku because it is so brilliantly easy to get your environment assembled with a MongoDb storage, error logging via papertrail, and just for fun I also added 3scale API management so that I could control the traffic quota for each application.

heroku chose also a name for my site which was such a good fit for this internet-enabled home garden, I just had to use this as the project name and it is now on github as abarbanell/limitless-garden. I did not choose this name, the name chose this project by itself, how could I refuse?

image of limitless garden website

This project has no user interface worth much at this time, although this may come later. The only real meat is in the api functions which allow you to save and retrieve arbitrary data. The api_key is the most suitabe security for this as it is very lightweight - and we are not talking about very sensitive data. We may need to revise this if the data here could actually open some water pumps in your home, you would not want this system to be compromised in this case.

Conclusion

We have now build some monitoring and data capture system which allows us to build further. the next iterations will be to scale up the amount of data logged from our home garden, then build some signals to water the plants, then push this signal down to automatically operate a water pump.

Stay tuned for more.

Leave a Comment