meshtastic 0.0.18 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/meshtastic/mqtt.rb +11 -5
- data/lib/meshtastic/version.rb +1 -1
- data/lib/meshtastic.rb +0 -3
- 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: 118b74d5c53f38d6fcf05335c4fb5fb70a0caa6d8b46938a3d74769553a0bae8
|
4
|
+
data.tar.gz: 155ea6cecde9a3d2adade6cbe033598c074cfe45c71ad11122fde2e3427602ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57cdde07d35c227e8135df98e225d62d0bf1c789db487356ea17d262a2d658d2f4139d92edfce9f1b8d66c3d048712c78be0d9ef29bf09ade051237d294c861c
|
7
|
+
data.tar.gz: 031e774028e1823a2624f7827565edeb93f2e36bfc58e005c3d8ebb8c6d9df869d609f2cd9eb9e6b326aeaf70f31d8c3ddc0c71f11949e7c17df19cc19aa5719
|
data/README.md
CHANGED
@@ -30,7 +30,10 @@ At the moment the only module available is `Meshtastic::MQTT`. To view MQTT mes
|
|
30
30
|
require 'meshtastic'
|
31
31
|
Meshtastic::MQTT.help
|
32
32
|
mqtt_obj = Meshastic::MQTT.connect
|
33
|
-
Meshtastic::MQTT.subscribe(
|
33
|
+
Meshtastic::MQTT.subscribe(
|
34
|
+
mqtt_obj: mqtt_obj,
|
35
|
+
filter: 'NODEINFO_APP, LongFast'
|
36
|
+
)
|
34
37
|
```
|
35
38
|
|
36
39
|
## Contributing
|
data/lib/meshtastic/mqtt.rb
CHANGED
@@ -50,7 +50,7 @@ module Meshtastic
|
|
50
50
|
# psk: 'optional - channel pre-shared key (default: AQ==)',
|
51
51
|
# qos: 'optional - quality of service (default: 0)',
|
52
52
|
# json: 'optional - JSON output (default: false)',
|
53
|
-
# filter: 'optional - comma-delimited string(s) to
|
53
|
+
# filter: 'optional - comma-delimited string(s) to filter on in payload (default: nil)'
|
54
54
|
# )
|
55
55
|
|
56
56
|
public_class_method def self.subscribe(opts = {})
|
@@ -64,7 +64,6 @@ module Meshtastic
|
|
64
64
|
|
65
65
|
# TODO: Find JSON URI for this
|
66
66
|
root_topic = "msh/#{region}/2/json" if json
|
67
|
-
# root_topic = "msh/#{region}/2/e" unless json
|
68
67
|
root_topic = "msh/#{region}/2/c" unless json
|
69
68
|
mqtt_obj.subscribe("#{root_topic}/#{channel}/#", qos)
|
70
69
|
|
@@ -130,7 +129,7 @@ module Meshtastic
|
|
130
129
|
if disp
|
131
130
|
puts "\n"
|
132
131
|
puts '-' * 80
|
133
|
-
puts "
|
132
|
+
puts "*** DEBUGGING ***"
|
134
133
|
puts "Payload:\n#{payload}"
|
135
134
|
# puts "\nMap Report: #{map_report.inspect}"
|
136
135
|
puts "\nRaw Packet: #{raw_packet.inspect}"
|
@@ -143,7 +142,7 @@ module Meshtastic
|
|
143
142
|
rescue Google::Protobuf::ParseError
|
144
143
|
puts "\n"
|
145
144
|
puts '-' * 80
|
146
|
-
puts "
|
145
|
+
puts "*** DEBUGGING ***"
|
147
146
|
puts "Payload:\n#{payload}"
|
148
147
|
# puts "\nMap Report: #{map_report.inspect}"
|
149
148
|
puts "\nRaw Packet: #{raw_packet.inspect}"
|
@@ -216,7 +215,14 @@ module Meshtastic
|
|
216
215
|
region: 'optional - region (default: US)',
|
217
216
|
channel: 'optional - channel name (default: LongFast)',
|
218
217
|
psk: 'optional - channel pre-shared key (default: AQ==)',
|
219
|
-
qos: 'optional - quality of service (default: 0)'
|
218
|
+
qos: 'optional - quality of service (default: 0)',
|
219
|
+
json: 'optional - JSON output (default: false)',
|
220
|
+
filter: 'optional - comma-delimited string(s) to filter on in payload (default: nil)'
|
221
|
+
)
|
222
|
+
|
223
|
+
#{self}.gps_search(
|
224
|
+
lat: 'required - latitude float (e.g. 37.7749)',
|
225
|
+
lon: 'required - longitude float (e.g. -122.4194)',
|
220
226
|
)
|
221
227
|
|
222
228
|
mqtt_obj = #{self}.disconnect(
|
data/lib/meshtastic/version.rb
CHANGED
data/lib/meshtastic.rb
CHANGED
@@ -3,9 +3,6 @@
|
|
3
3
|
# Plugin used to interact with Meshtastic nodes
|
4
4
|
module Meshtastic
|
5
5
|
# Protocol Buffers for Meshtastic
|
6
|
-
# protobuf Modules commented out as a result of the following error:
|
7
|
-
# undefined method `proto3_optional' for an instance of
|
8
|
-
# Google::Protobuf::Internal::MessageBuilderContext (NoMethodError)
|
9
6
|
require 'meshtastic/admin_pb'
|
10
7
|
require 'nanopb_pb'
|
11
8
|
require 'meshtastic/apponly_pb'
|