You need to install Meteor first (if you haven't already).
Then:
git clone https://github.com/CommonGarden/Grow-IoT
cd Grow-IoT
meteor npm install
meteor
And that's it! Visit http://localhost:3000 with your browser of choice; you should now have the application running.
Create a new device (click the '+' button) and take note of the device uuid
and token
. Then run (in a seperate terminal):
node tests/test-grow-hub.js
Paste in the uuid
and token
and presto! You've connected your first thing to Grow-IoT.
You can find then component for this device in imports/examples/GrowHub.jsx
.
See Grow.js for more info on connecting devices such as the Raspberry Pi.
You can interact with the Grow-IoT api using the Distributed Data Protocol. There are DDP Clients available in many different programming languages, see http://meteorpedia.com/read/DDP_Clients for a list.
We are also slowly adding support for connecting devices over the CoAP protocol. See the experimental server in imports/api/coap.js
.
To do so:
- Make a new
CustomComponent.jsx
file in `imports/things/' - Open
imports/things/index.js
. import CustomComponent from './CustomComponent'
- Lastly, add
CustomComponent
to the exportedcomponents
object.
In the repo you'll find the following directories and files:
File/Folder | Provides |
---|---|
.meteor |
Meteor stuff, well documented in other places. |
.sandstorm |
Sandstorm.io stuff (can) |
client |
Imports things and starts the React app. |
imports |
API, UI, and thing examples live here |
public |
Fonts and other static, public assets live here. |
tests |
Unit and Thread conformance tests |
server |
Imports the server code. |
tests |
Hmmm.... |
We have a few different repos for alternative (perhaps non-Meteor) stacks:
- Graph-QL api and schema
- Rest API (using Express)
- Mongoose models
Our wiki also contains a growing assortment of useful info, including:
Grow-IoT is released under the 2-Clause BSD License, sometimes referred to as the "Simplified BSD License" or the "FreeBSD License".
Link => https://groups.google.com/a/commongarden.org/forum/#!forum/dev