Close

Weighing in the Options: FarmBot on SkyNet

A project log for FarmBot - Open-Source CNC Farming

FarmBot is an open-source CNC farming machine and software package built for small scale, hyper local, DIY food production.

rory-aronsonRory Aronson 08/28/2014 at 19:590 Comments

This blog post was originally written by FarmBot contributor Rick Carlino.

I was recently asked over email about our decision to use Skynet for the Farmbot Project. For those who don’t follow my usual antics, Farmbot is an opensource agricultural robot that aims to automate farming. I am a core contributor to the project and handle most of the web based stuff, occasionally taking a dive in to the hardware side of the project.

The question was a great opportunity for me to reflect on the decision to use skynet and think about the problems that we are attempting to solve. Here are my thoughts on the matter and why we ended up going using Skynet.

Skynet

Skynet is an internet-of-things platform that has been described as ‘device-to-device instant messaging’. It adds extra functionality to the MQTT message protocol, such as support for REST and Websockets. The servers are publicly available and open to all. You can register a device ID on the network by doing a simple HTTP POST request and receive JSON messages in seconds. Various modules have been written to support the platform on different hardware, including Skynet OS for arduino.

Our Old Setup

We were treating each Farmbot as a server that stored everything onboard and was manipulated via RESTful JSON interfaces. It was not the best way to tackle the problem. Trying to shoehorn a device to serve as a traditional REST API had a number of drawbacks including:

Our Current Setup

Our new setup treats all devices involved as API consumers of
Skynet. Almost all services plug in to Skynet as a client rather than a server. There is a soon-to-be-released web based component that allows the user to interact with the device in the browser directly (think Farmville for the real world). Background processes such as measuring weather data and watering plants are handled by a background job workers and a decision support system.

We made the change for a number of reasons:

Although it’s been a good move for us and a step in the right
direction, there still have been some hurdles:

Discussions