meshtastic 0.0.106 → 0.0.107
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 +5 -0
- 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: bc78ac0ce2c27096b57b58c11993e47e8f4e6ae59c1bf0a15d0876d9faf88e09
|
4
|
+
data.tar.gz: 4b29b68ddae9caeea2c9db3125e1a84a8b0599e7e253301f4db475fa90403e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0485bace95ee2a6c585418b7d06e442adf3040ddff57c619b7889582fa83efa4561c2881016abd66996c108aad50aecd60f786f5d546c4ed15f858e95a48d1fa'
|
7
|
+
data.tar.gz: 746dbf6074a38c21bc3cf8e28ad983d4861005e8de9bd9edfe4440c4de3de854cd662a26a8adbc20246c24e30f12fed9d6682c240ffa3de37e12ab078a80c48a
|
data/lib/meshtastic/mqtt.rb
CHANGED
@@ -18,6 +18,7 @@ module Meshtastic
|
|
18
18
|
# mqtt_obj = Meshtastic::MQQT.connect(
|
19
19
|
# host: 'optional - mqtt host (default: mqtt.meshtastic.org)',
|
20
20
|
# port: 'optional - mqtt port (defaults: 1883)',
|
21
|
+
# tls: 'optional - use TLS (default: false)',
|
21
22
|
# username: 'optional - mqtt username (default: meshdev)',
|
22
23
|
# password: 'optional - (default: large4cats)',
|
23
24
|
# client_id: 'optional - client ID (default: random 4-byte hex string)',
|
@@ -29,6 +30,8 @@ module Meshtastic
|
|
29
30
|
# Publicly available MQTT server / credentials by default
|
30
31
|
host = opts[:host] ||= 'mqtt.meshtastic.org'
|
31
32
|
port = opts[:port] ||= 1883
|
33
|
+
tls = true if opts[:tls]
|
34
|
+
tls = false unless opts[:tls]
|
32
35
|
username = opts[:username] ||= 'meshdev'
|
33
36
|
password = opts[:password] ||= 'large4cats'
|
34
37
|
client_id = opts[:client_id] ||= SecureRandom.random_bytes(4).unpack1('H*').to_s
|
@@ -40,6 +43,7 @@ module Meshtastic
|
|
40
43
|
mqtt_obj = MQTTClient.connect(
|
41
44
|
host: host,
|
42
45
|
port: port,
|
46
|
+
tls: tls,
|
43
47
|
username: username,
|
44
48
|
password: password,
|
45
49
|
client_id: client_id
|
@@ -279,6 +283,7 @@ module Meshtastic
|
|
279
283
|
mqtt_obj = #{self}.connect(
|
280
284
|
host: 'optional - mqtt host (default: mqtt.meshtastic.org)',
|
281
285
|
port: 'optional - mqtt port (defaults: 1883)',
|
286
|
+
tls: 'optional - use TLS (default: false)',
|
282
287
|
username: 'optional - mqtt username (default: meshdev)',
|
283
288
|
password: 'optional - (default: large4cats)',
|
284
289
|
client_id: 'optional - client ID (default: random 4-byte hex string)',
|
data/lib/meshtastic/version.rb
CHANGED