meshtastic 0.0.37 → 0.0.39
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/lib/meshtastic/mqtt.rb +4 -7
- 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: aa504f8ade89178504929945de8d426f8a33d59f823148916fccc0f4760fdb6d
|
|
4
|
+
data.tar.gz: e0972850468fd4b91badf6295890328c8f469fd0cdf98e17b45ad40617c76dae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3910c79e13dc8a84eb5df0e80b96596746f147f417af3f273e33cbed4ea7ee4e1563fd602eedbc97e60d3a7a2b5a41751ac66a67e6437d3027c111c084c5285
|
|
7
|
+
data.tar.gz: aaf6deaf8e117a42b9b56503cd15a6c1ade82ce2a0db4101cffcf0d685a8951cbf2b251c8b764e23ea483ba04e1f9a3987162bf345ddd4f52d96545b07e449e2
|
data/lib/meshtastic/mqtt.rb
CHANGED
|
@@ -47,7 +47,7 @@ module Meshtastic
|
|
|
47
47
|
# mqtt_obj: 'required - mqtt_obj returned from #connect method'
|
|
48
48
|
# root_topic: 'optional - root topic (default: msh)',
|
|
49
49
|
# region: 'optional - region e.g. 'US/VA', etc (default: US)',
|
|
50
|
-
# channel: 'optional - channel name (default: "2/
|
|
50
|
+
# channel: 'optional - channel name e.g. "2/stat/#" (default: "2/e/LongFast/#")',
|
|
51
51
|
# psk: 'optional - channel pre-shared key (default: AQ==)',
|
|
52
52
|
# qos: 'optional - quality of service (default: 0)',
|
|
53
53
|
# filter: 'optional - comma-delimited string(s) to filter on in message (default: nil)',
|
|
@@ -124,9 +124,6 @@ module Meshtastic
|
|
|
124
124
|
|
|
125
125
|
decrypted = cipher.update(encrypted_message) + cipher.final
|
|
126
126
|
message[:decrypted] = decrypted
|
|
127
|
-
# decoded_packet = Meshtastic::ServiceEnvelope.decode(decrypted)
|
|
128
|
-
# puts "Decoded Decrypted Packet: #{decoded_packet.display.to_h}"
|
|
129
|
-
# Vvv Decode the decrypted message vvV
|
|
130
127
|
end
|
|
131
128
|
|
|
132
129
|
if message[:decoded]
|
|
@@ -228,7 +225,7 @@ module Meshtastic
|
|
|
228
225
|
JSON::GeneratorError,
|
|
229
226
|
ArgumentError => e
|
|
230
227
|
|
|
231
|
-
message[:decrypted] = e.message if
|
|
228
|
+
message[:decrypted] = e.message if e.message.include?('key must be')
|
|
232
229
|
decoded_payload_hash[:packet] = message
|
|
233
230
|
unless block_given?
|
|
234
231
|
message[:stdout] = 'inspect'
|
|
@@ -320,8 +317,8 @@ module Meshtastic
|
|
|
320
317
|
#{self}.subscribe(
|
|
321
318
|
mqtt_obj: 'required - mqtt_obj object returned from #connect method',
|
|
322
319
|
root_topic: 'optional - root topic (default: msh)',
|
|
323
|
-
region: 'optional - region (default: US)',
|
|
324
|
-
channel: 'optional - channel name (default: LongFast)',
|
|
320
|
+
region: 'optional - region e.g. 'US/VA', etc (default: US)',
|
|
321
|
+
channel: 'optional - channel name e.g. '2/stat/#' (default: '2/e/LongFast/#')',
|
|
325
322
|
psk: 'optional - channel pre-shared key (default: AQ==)',
|
|
326
323
|
qos: 'optional - quality of service (default: 0)',
|
|
327
324
|
json: 'optional - JSON output (default: false)',
|
data/lib/meshtastic/version.rb
CHANGED