Skip to content
This repository was archived by the owner on Jul 9, 2019. It is now read-only.

Commit 85bc413

Browse files
committed
Update readme.md
1 parent faf2345 commit 85bc413

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

readme.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PLEASE READ
22

3-
You might not need to install this software. This software is used by the FarmBot team and advanced users who run their own FarmBot servers. We highly recommend that you use our publicly hosted server at [my.farmbot.io](http://my.farmbot.io), which elimintes the need for server setup.
3+
You might not need to install this software. This software is used by the FarmBot team and advanced users who run their own FarmBot servers. We highly recommend that you use our publicly hosted server at [my.farmbot.io](http://my.farmbot.io), which eliminates the need for server setup.
44

55
# How It Works
66

@@ -9,23 +9,24 @@ Farmbot uses [MQTT](https://en.wikipedia.org/wiki/MQTT) for realtime events. On
99
## Our MQTT Implementation
1010

1111
* Log in to the broker using the same email as on the web app. A JSON Web Token from the API can be used as a password.
12-
* Messages are sent using [JSON RPC](https://en.wikipedia.org/wiki/JSON-RPC).
12+
* Messages are sent using [Celery Script](https://github.com/RickCarlino/farmbot-js/blob/master/src/corpus.ts), which is a domain-specific JSON format used to send messages (and sequences) to FarmBot. If you would like documentation or specifics, please let me know via an issue. CeleryScript transmission is usually handled by [FarmBotJS](https://github.com/FarmBot/farmbot-js), a wrapper library that eliminates the need to write Celery Script directly.
1313

1414
## Available MQTT Topics
15-
1615
* `bot/device_{ BOT_ID }/from_clients`: Commands originated from browsers and clients.
1716
* `bot/device_{ BOT_ID }/from_device`: This is where the bot publishes messages.
17+
* `bot/${uuid}/status`: Everytime bot state changes (Eg: a pin is flipped, movement, etc.) a JSON representation of the bot status is sent.
18+
* `bot/${uuid}/logs`: General log messages. The same ones seen on the nav bar of the FarmBot Web App.
1819

19-
Subscribing to `bot/{ BOT_UUID }/*` via 3rd party MQTT client (Such as [MQTT FX](http://mqttfx.jfx4ee.org/index.php/download)) is useful for debugging and monitoring.
20+
Subscribing to `bot/{ BOT_UUID }/*` via 3rd party MQTT client (Such as [MQTT FX](http://www.mqttfx.org/)) is useful for debugging and monitoring.
2021

2122
# Installation
2223

2324
1. git clone THIS_REPO
2425
2. cd THIS_REPO
2526
3. npm install
2627
4. Setup and run the [Web API](https://github.com/FarmBot/Farmbot-Web-API) locally. We recommend running it on `http://localhost:3000`
27-
5. `WEB_API_URL=http://localhost:3000 node app/index.js`. See note below*.
28-
6. Websocket MQTT is now available via `ws://localhost:3002` and `wss://localhost:443`. Raw MQTT (TCP connections) are available via `mqtt://localhost:1883`.
28+
5. `WEB_API_URL=http://localhost:3000 npm start`. See note below*.
29+
6. Websocket MQTT is now available via `ws://localhost:3002` and `wss://localhost:443`. Raw MQTT (TCP connections) are available via `mqtt://localhost:1883`.
2930

3031
\* The assumption is that you are running a [Web API](https://github.com/FarmBot/Farmbot-Web-API) instance on `localhost:3000`. If you are using a different API server, please change `WEB_API_URL` accordingly.
3132

@@ -52,4 +53,4 @@ See `DEPLOYMENT.md`.
5253

5354
# Want to Help?
5455

55-
[Low Hanging Fruit](https://github.com/FarmBot/mqtt-gateway/search?q=TODO&utf8=%E2%9C%93)
56+
See [TODO items in the codebase](https://github.com/FarmBot/mqtt-gateway/search?q=TODO&utf8=%E2%9C%93) or ask how you can help via an issue.

0 commit comments

Comments
 (0)