compress the images (#1538)
Some checks are pending
CI / quality (push) Waiting to run
CI / build (push) Waiting to run

This commit is contained in:
rcarteraz 2024-10-28 18:10:46 -07:00 committed by GitHub
parent a013702d88
commit 66ffda7702
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 33 additions and 32 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

View file

@ -58,7 +58,6 @@ Default Very Long Slow
<img src="/img/records/MartinR7-message-trace.webp" alt="Trace" />
#### Previous Ground Record: 254km
- **Range:** 254km (158 miles)
@ -117,11 +116,11 @@ Default Long_Fast
- **Firmware Version:** 1.2
- **Antenna:** [868MHz Vertical 6dBi](https://ivent.co.nz/product/category/1000/868mhz%20vertical%206dbi%20antenna/38606)
![Topographical Map](https://canada1.discourse-cdn.com/free1/uploads/meshtastic/optimized/2X/a/a0a26e4d40a5b9ccba9185eb70e2eaf66f0b0587_2_1380x888.jpeg)
![Topographical Map](/img/records/topographical_map.webp)
![Node A](https://canada1.discourse-cdn.com/free1/uploads/meshtastic/optimized/2X/9/99ec4bcc18b21f4e95ac1bcc0592b608c9c4f567_2_1332x1000.jpeg)
![Node A](/img/records/node_a.webp)
![Node B](https://canada1.discourse-cdn.com/free1/uploads/meshtastic/optimized/2X/1/1c8bd5fc41f7bab925404b657a9c481882de9313_2_1332x1000.jpeg)
![Node B](/img/records/node_b.webp)
<h5>Resources Used</h5>- http://www.heywhatsthat.com

View file

@ -12,7 +12,7 @@ The serial module config options are: Enabled, Echo, Mode, Receive GPIO, Transmi
This is an interface to talk to and control your Meshtastic device over a serial port. The module can be set to different [modes](#mode), each fulfilling a different use-case.
![image](https://user-images.githubusercontent.com/9000580/205529843-962c3187-8411-452c-b729-42c58b1571f5.png)
![image](/img/modules/Serial/jet.webp)
<object
data="https://www.youtube.com/embed/HdOiGKBtapw?autohide=1&autoplay=0"

View file

@ -52,7 +52,7 @@ The RAK5005 (without the -O) is not compatible.
<img
alt="RAK19001-O Connectors"
src="/img/hardware/rak5005-0_connectors.png"
src="/img/hardware/rak5005-0_connectors.web"
style={{ zoom: "50%" }}
/>
@ -100,7 +100,7 @@ Further information on the RAK19007 can be found on the [RAK Documentation Cente
<img
alt="RAK19007 Connectors"
src="/img/hardware/rak19007_connectors.png"
src="/img/hardware/rak19007_connectors.webp"
style={{ zoom: "50%" }}
/>
@ -148,7 +148,7 @@ Further information on the RAK19003 can be found on the [RAK Documentation Cente
<img
alt="RAK19003 Connectors"
src="/img/hardware/rak19003_connectors.png"
src="/img/hardware/rak19003_connectors.webp"
style={{ zoom: "50%" }}
/>
@ -204,7 +204,7 @@ Further information on the RAK19001 can be found on the [RAK Documentation Cente
<img
alt="RAK19001 Connectors"
src="/img/hardware/rak19001_connectors.png"
src="/img/hardware/rak19001_connectors.webp"
style={{ zoom: "50%" }}
/>

View file

@ -7,31 +7,30 @@ sidebar_position: 3
## Using MQTT with Node-RED
Node-RED is a free cross-platform programming tool for wiring together hardware, APIs, and online services developed originally by IBM for IOT. It is widely used for home automation by many non-professional programmers and runs well on Pi's. Node-RED has many plug-in modules written by the community.
Node-RED is a free cross-platform programming tool for wiring together hardware, APIs, and online services developed originally by IBM for IOT. It is widely used for home automation by many non-professional programmers and runs well on Pi's. Node-RED has many plug-in modules written by the community.
I will use this platform as a practical example on how to interface with the MQTT features of Meshtastic. Everything can be done from GUI's without using command line.
### Enabling MQTT
Use http://client.meshtastic.org/ , the python CLI, or an Apple or Android app to connect to your device and adjust these settings.
1. Settings--> Radio Config--> Network
1. Settings--> Radio Config--> Network
- On the node that will act as the gateway between the mesh and MQTT enable a network connection (i.e. Wifi, Ethernet).
- Save
- On the node that will act as the gateway between the mesh and MQTT enable a network connection (i.e. Wifi, Ethernet).
- Save
2. Settings--> Module Config--> MQTT config
2. Settings--> Module Config--> MQTT config
- Configure the MQTT gateway's network configuration.
- Verify Encryption Enabled is OFF.
- (optional) Turn JSON Output Enabled ON.
- Save
3. Channel Editor
- Go to Channel Editor and enable Uplink and Downlink on the channels you wish to publish to MQTT.
- Save
- Save
### Using Node-RED with Meshtastic
There are three common approaches:
1. Using JSON-encoded messages
@ -39,6 +38,7 @@ There are three common approaches:
3. Using protobuf-encoded messages with a protobuf decode node and the Meshtastic protobuf definitions
The JSON output only publishes the following subset of the messages on a Meshtastic network:
- Text Message
- Telemetry
- Device Metrics
@ -54,11 +54,12 @@ The JSON output only publishes the following subset of the messages on a Meshtas
> Protobufs are mesh native.
#### 1. Using JSON-encoded messages
:::note
:::note
JSON is not supported on the nRF52 platform.
:::
Make sure that option *JSON Output Enabled* is set in MQTT module options and you have a channel called "mqtt".
Make sure that option _JSON Output Enabled_ is set in MQTT module options and you have a channel called "mqtt".
Below is a valid JSON envelope for information sent by MQTT to a device for broadcast onto the mesh. The `to` field is optional and can be omitted for broadcast. The `channel` field is also optional and can be omitted to send to the primary channel.
@ -71,7 +72,9 @@ Below is a valid JSON envelope for information sent by MQTT to a device for broa
"payload": text or a json object go here
}
```
#### 2. Using protobuf-encoded messages with the Meshtastic decode node
Install Node-Red plug-in:
https://flows.nodered.org/node/@meshtastic/node-red-contrib-meshtastic
@ -80,10 +83,9 @@ More info is in the plug-in source repository.
There is an example flow using this mechanism available
https://github.com/scruplelesswizard/meshtastic-node-red
#### 3. Using protobuf-encoded messages with a protobuf decode node and the Meshtastic protobuf definitions
If you don't want to depend on JSON decoding on the device, you can decode the protobuf messages off-device. To do that you will need to get the .proto files from https://github.com/meshtastic/protobufs. They function as a schema and are required for decoding in Node-RED. Save the files where the node-RED application can access them and note the file path of the "mqtt.proto" file.
If you don't want to depend on JSON decoding on the device, you can decode the protobuf messages off-device. To do that you will need to get the .proto files from https://github.com/meshtastic/protobufs. They function as a schema and are required for decoding in Node-RED. Save the files where the node-RED application can access them and note the file path of the "mqtt.proto" file.
Install Node-RED plug-ins to your Node-RED application for an embedded MQTT server and a protobuf decoder.
https://flows.nodered.org/node/node-red-contrib-aedes
@ -91,20 +93,20 @@ https://flows.nodered.org/node/node-red-contrib-protobuf
Drag, drop, and wire the nodes like this. For this example, I ran Node-RED on a Windows machine. Note that file paths might be specified differently on different platforms. MQTT server wild cards are usually the same. A "+" is a single level wildcard for a specific topic level. A "#" is a multiple level wildcard that can be used at the end of a topic filter. The debug messages shown are what happens when the inject button sends a JSON message with a topic designed to be picked up by the specified Meshtastic device and then having it rebroadcast the message.
[<img src="/documents/mqtt/NodeRedTwo.jpg" style={{zoom:'50%'}} />](/documents/mqtt/NodeRedTwo.jpg)
[<img src="/documents/mqtt/NodeRedThree.jpg" style={{zoom:'50%'}} />](/documents/mqtt/NodeRedThree.jpg)
[<img src="/documents/mqtt/NR_nodes.jpg" style={{zoom:'50%'}} />](/documents/mqtt/NR_nodes.jpg)
[<img src="/documents/mqtt/NodeRedTwo.webp" style={{zoom:'50%'}} />](/documents/mqtt/NodeRedTwo.webp)
[<img src="/documents/mqtt/NodeRedThree.webp" style={{zoom:'50%'}} />](/documents/mqtt/NodeRedThree.webp)
[<img src="/documents/mqtt/NR_nodes.webp" style={{zoom:'50%'}} />](/documents/mqtt/NR_nodes.webp)
The aedes broker must be set up on the same flow as the other nodes. By activating the Publish debug node, you can see all the published messages.
[<img src="/documents/mqtt/Broker1.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Broker1.jpg)
[<img src="/documents/mqtt/Broker1.webp" style={{zoom:'50%'}} />](/documents/mqtt/Broker1.webp)
Receiving a json mqtt message is very simple.
[<img src="/documents/mqtt/Consume.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Consume.jpg)
[<img src="/documents/mqtt/Consume.webp" style={{zoom:'50%'}} />](/documents/mqtt/Consume.webp)
Injecting a json message to be sent by a device is also very simple. You do need the correct envelope.
[<img src="/documents/mqtt/Inject.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Inject.jpg)
[<img src="/documents/mqtt/Inject.webp" style={{zoom:'50%'}} />](/documents/mqtt/Inject.webp)
Forwarding a text message from one device, through a broker, to another broker/device/channel would look like this.
[<img src="/documents/mqtt/Forward.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Forward.jpg)
[<img src="/documents/mqtt/Forward.webp" style={{zoom:'50%'}} />](/documents/mqtt/Forward.webp)
If you want to decode text and position messages without json, it gets complicated:
[<img src="/documents/mqtt/DecodeNewest.jpg" style={{zoom:'50%'}} />](/documents/mqtt/DecodeNewest.jpg)
[<img src="/documents/mqtt/DecodeNewest.webp" style={{zoom:'50%'}} />](/documents/mqtt/DecodeNewest.webp)
If you are interested in my flow for this it is here:
```json
@ -669,10 +671,10 @@ If you are interested in my flow for this it is here:
(documents/mqtt/Flow.txt)
Node-red can rapidly (minutes vs days) put together some pretty impressive output when paired with meshtastic. Here is the output of that flow geofencing and mapping via mqtt data.
[<img src="/documents/mqtt/Mapping.jpg" style={{zoom:'50%'}} />](/documents/mqtt/Mapping.jpg)
[<img src="/documents/mqtt/Mapping.webp" style={{zoom:'50%'}} />](/documents/mqtt/Mapping.webp)
Advanced use, such as encoding Position and sending it to a device via MQTT without using JSON can get a little complicated. An example of how it can be done is below.
[<img src="/documents/mqtt/EncodingPosition.jpg" style={{zoom:'50%'}} />](/documents/mqtt/EncodingPosition.jpg)
[<img src="/documents/mqtt/EncodingPosition.webp" style={{zoom:'50%'}} />](/documents/mqtt/EncodingPosition.webp)
The flow is:
```json
@ -1001,4 +1003,4 @@ Sending a position to a device for broadcast to the mesh is much easier with JSO
```
An example of doing this in node-red:
[<img src="/documents/mqtt/PosJSON.jpg" style={{zoom:'50%'}} />](/documents/mqtt/PosJSON.jpg)
[<img src="/documents/mqtt/PosJSON.webp" style={{zoom:'50%'}} />](/documents/mqtt/PosJSON.webp)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB