Update page 'Message Queue Endpoint'
This commit is contained in:
parent
8a89be8b1a
commit
9c15b247ee
@ -15,18 +15,8 @@ To follow along with the examples, you need:
|
|||||||
Generally the URN is composed of the company or brand name and a device serial number like so: `urn:dev:<company/brand-name>:<device-serial-number>`
|
Generally the URN is composed of the company or brand name and a device serial number like so: `urn:dev:<company/brand-name>:<device-serial-number>`
|
||||||
|
|
||||||
To run the python example code you also need to install the `paho-mqtt` and the `protobuf` modules.
|
To run the python example code you also need to install the `paho-mqtt` and the `protobuf` modules.
|
||||||
These can be installed with the following commands:
|
If you need help on installing this, please see the FAQ at the end.
|
||||||
|
|
||||||
**Windows command prompt:**
|
|
||||||
```
|
|
||||||
py -m pip install 'paho-mqtt==1.5.0'
|
|
||||||
py -m pip install 'protobuf==3.11.0'
|
|
||||||
```
|
|
||||||
**Linux terminal:**
|
|
||||||
```
|
|
||||||
python3 -m pip install 'paho-mqtt==1.5.0'
|
|
||||||
python3 -m pip install 'protobuf==3.11.0'
|
|
||||||
```
|
|
||||||
### Workflow
|
### Workflow
|
||||||
The general workflow for pushing data to the FarmMaps MQTT endpoint consists of:
|
The general workflow for pushing data to the FarmMaps MQTT endpoint consists of:
|
||||||
* Preparing your data as a protobuf message
|
* Preparing your data as a protobuf message
|
||||||
@ -89,3 +79,18 @@ To quote the Google Documentation:
|
|||||||
> You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.
|
> You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.
|
||||||
|
|
||||||
More information can be found in the [protobuf documentation](https://developers.google.com/protocol-buffers/docs/overview).
|
More information can be found in the [protobuf documentation](https://developers.google.com/protocol-buffers/docs/overview).
|
||||||
|
|
||||||
|
#### How do I install the required Python modules?
|
||||||
|
This tutorial requires the `paho-mqtt` and `protobuf` modules.
|
||||||
|
These can be installed with the following commands:
|
||||||
|
|
||||||
|
**Windows command prompt:**
|
||||||
|
```
|
||||||
|
py -m pip install 'paho-mqtt==1.5.0'
|
||||||
|
py -m pip install 'protobuf==3.11.0'
|
||||||
|
```
|
||||||
|
**Linux terminal:**
|
||||||
|
```
|
||||||
|
python3 -m pip install 'paho-mqtt==1.5.0'
|
||||||
|
python3 -m pip install 'protobuf==3.11.0'
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user