meshtastic 0.0.93 → 0.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -2
- data/lib/meshtastic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46a33e93e154c3ed4c22aec4e254a23e2e6694f69262a70e9990c2f4f44e34fb
|
4
|
+
data.tar.gz: 8a6f2f3215f52fa4ddbf9149b60383124a8119de431acf5a5a76482b2dab6202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a98ccb2b75b32a87fb5194e48aa93360f04b9c672a146da0d1dfeccf31b625131254e1326b7027d5d982252739e8c1abdd75c1e97e975c404248d9dff6a728c
|
7
|
+
data.tar.gz: 900a7dbd08e07f9fe778c9b517de277a83a7f43c033917778cd6295ef2b7fa4bc06c5abf7597585547530a202780114301128c431f4fa86e1d45b95ebc61bf82
|
data/README.md
CHANGED
@@ -56,15 +56,34 @@ Sending a message over MQTT:
|
|
56
56
|
```ruby
|
57
57
|
require 'meshtastic'
|
58
58
|
mqtt_obj = Meshastic::MQTT.connect
|
59
|
+
client_id = "!#{mqtt_obj.client_id}"
|
59
60
|
Meshtastic::MQTT.send_text(
|
60
61
|
mqtt_obj: mqtt_obj,
|
61
|
-
from:
|
62
|
-
|
62
|
+
from: client_id,
|
63
|
+
to: '!ffffffff',
|
64
|
+
topic: "msh/US/2/e/LongFast/#{client_id}",
|
65
|
+
channel: 93,
|
63
66
|
text: 'Hello, World!',
|
64
67
|
psks: { LongFast: 'AQ==' }
|
65
68
|
)
|
66
69
|
```
|
67
70
|
|
71
|
+
One of the "gotchas" when sending messages is ensuring you're sending over the proper channel. The best way to determine which channel you should use is by sending a test message from within the meshtastic app and then viewing the MQTT message similar to the following:
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
require 'meshtastic'
|
75
|
+
mqtt_obj = Meshastic::MQTT.connect
|
76
|
+
Meshtastic::MQTT.subscribe(
|
77
|
+
mqtt_obj: mqtt_obj,
|
78
|
+
region: 'US',
|
79
|
+
channel: '2/e/LongFast/#',
|
80
|
+
psks: { LongFast: 'AQ==' },
|
81
|
+
filter: '!YOUR_CLIENT_ID'
|
82
|
+
) do |message|
|
83
|
+
puts message.inspect
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
68
87
|
## Contributing
|
69
88
|
|
70
89
|
Bug reports and pull requests are welcome on GitHub at https://github.com/0dayinc/meshtastic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/0dayinc/meshtastic/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/meshtastic/version.rb
CHANGED