meshtastic 0.0.95 → 0.0.96
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 +2 -2
- data/lib/meshtastic/mqtt.rb +4 -4
- 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: d024646f0fcbc4713e36a22e8fdf48abb6ad7472c09b73ec884eb7057bef5d54
|
4
|
+
data.tar.gz: 42bc2f49751ec4a262c0a106682f2ddc16d1dd2fb72972c266397fd5f36117b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 342ae6d84dfc5321f8f95afaddf1127cfa95993480164d26c3fbc067e9503c4a26e547095bb42e8bfaa785a8e17941c758f1b70549110ddc132b38b05b7f81a5
|
7
|
+
data.tar.gz: 89b8383d56aa93a9209f50eb167b67c0be4bb65b8559408d289f42c127d0f18a2e382535f0bdc6af9b5da18f316f8479cebdb242c85921db0b77b9aa69344980
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ mqtt_obj = Meshastic::MQTT.connect
|
|
44
44
|
Meshtastic::MQTT.subscribe(
|
45
45
|
mqtt_obj: mqtt_obj,
|
46
46
|
region: 'US',
|
47
|
-
|
47
|
+
channel_topic: '2/e/LongFast/#',
|
48
48
|
psks: { LongFast: 'AQ==' }
|
49
49
|
) do |message|
|
50
50
|
puts message.inspect
|
@@ -76,7 +76,7 @@ mqtt_obj = Meshastic::MQTT.connect
|
|
76
76
|
Meshtastic::MQTT.subscribe(
|
77
77
|
mqtt_obj: mqtt_obj,
|
78
78
|
region: 'US',
|
79
|
-
|
79
|
+
channel_topic: '2/e/LongFast/#',
|
80
80
|
psks: { LongFast: 'AQ==' },
|
81
81
|
filter: '!YOUR_CLIENT_ID'
|
82
82
|
) do |message|
|
data/lib/meshtastic/mqtt.rb
CHANGED
@@ -48,7 +48,7 @@ module Meshtastic
|
|
48
48
|
# mqtt_obj: 'required - mqtt_obj returned from #connect method'
|
49
49
|
# root_topic: 'optional - root topic (default: msh)',
|
50
50
|
# region: 'optional - region e.g. 'US/VA', etc (default: US)',
|
51
|
-
#
|
51
|
+
# channel_topic: 'optional - channel ID path e.g. "2/stat/#" (default: "2/e/LongFast/#")',
|
52
52
|
# psks: 'optional - hash of :channel_id => psk key value pairs (default: { LongFast: "AQ==" })',
|
53
53
|
# qos: 'optional - quality of service (default: 0)',
|
54
54
|
# filter: 'optional - comma-delimited string(s) to filter on in message (default: nil)',
|
@@ -60,7 +60,7 @@ module Meshtastic
|
|
60
60
|
mqtt_obj = opts[:mqtt_obj]
|
61
61
|
root_topic = opts[:root_topic] ||= 'msh'
|
62
62
|
region = opts[:region] ||= 'US'
|
63
|
-
|
63
|
+
channel_topic = opts[:channel_topic] ||= '2/e/LongFast/#'
|
64
64
|
# TODO: Support Array of PSKs and attempt each until decrypted
|
65
65
|
|
66
66
|
public_psk = '1PG7OiApB1nwvP+rz05pAQ=='
|
@@ -77,7 +77,7 @@ module Meshtastic
|
|
77
77
|
include_raw = opts[:include_raw] ||= false
|
78
78
|
|
79
79
|
# NOTE: Use MQTT Explorer for topic discovery
|
80
|
-
full_topic = "#{root_topic}/#{region}/#{
|
80
|
+
full_topic = "#{root_topic}/#{region}/#{channel_topic}"
|
81
81
|
full_topic = "#{root_topic}/#{region}" if region == '#'
|
82
82
|
puts "Subscribing to: #{full_topic}"
|
83
83
|
mqtt_obj.subscribe(full_topic, qos)
|
@@ -276,7 +276,7 @@ module Meshtastic
|
|
276
276
|
mqtt_obj: 'required - mqtt_obj object returned from #connect method',
|
277
277
|
root_topic: 'optional - root topic (default: msh)',
|
278
278
|
region: 'optional - region e.g. 'US/VA', etc (default: US)',
|
279
|
-
|
279
|
+
channel_topic: 'optional - channel ID path e.g. '2/stat/#' (default: '2/e/LongFast/#')',
|
280
280
|
psks: 'optional - hash of :channel_id => psk key value pairs (default: { LongFast: 'AQ==' })',
|
281
281
|
qos: 'optional - quality of service (default: 0)',
|
282
282
|
json: 'optional - JSON output (default: false)',
|
data/lib/meshtastic/version.rb
CHANGED