meshtastic 0.0.84 → 0.0.85
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/Gemfile +1 -1
- data/lib/meshtastic/mqtt.rb +8 -8
- data/lib/meshtastic/version.rb +1 -1
- data/meshtastic.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42efdc0a59eb1689c3af8632b8191e6dc8d51b9f77002b55d4d19ca24e4bede3
|
4
|
+
data.tar.gz: 922d1701b6c2a21ecae7d722980630af3b811516df17db57e4611367a1576fec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9dcb14d2c91bd9f89edef65450b2f2f638efd61a4803ff801753f4d15a153c572f22686ed093c51c4f12d291553a115dbde568398dda46401554383ca0c0e80
|
7
|
+
data.tar.gz: a12152be4af332268f73072201b391711ad4762730fae08845f26d3947feea8a63dcb527bfb1c734e64a6ba80a4ea38dec7bc1a2a4b804a9c3e1d3cf09348935
|
data/Gemfile
CHANGED
data/lib/meshtastic/mqtt.rb
CHANGED
@@ -19,7 +19,8 @@ module Meshtastic
|
|
19
19
|
# host: 'optional - mqtt host (default: mqtt.meshtastic.org)',
|
20
20
|
# port: 'optional - mqtt port (defaults: 1883)',
|
21
21
|
# username: 'optional - mqtt username (default: meshdev)',
|
22
|
-
# password: 'optional - (default: large4cats)'
|
22
|
+
# password: 'optional - (default: large4cats)',
|
23
|
+
# client_id: 'optional - client ID (default: random 8-byte hex string)'
|
23
24
|
# )
|
24
25
|
|
25
26
|
public_class_method def self.connect(opts = {})
|
@@ -28,17 +29,15 @@ module Meshtastic
|
|
28
29
|
port = opts[:port] ||= 1883
|
29
30
|
username = opts[:username] ||= 'meshdev'
|
30
31
|
password = opts[:password] ||= 'large4cats'
|
32
|
+
client_id = opts[:client_id] ||= SecureRandom.random_bytes(8).unpack1('H*')
|
31
33
|
|
32
|
-
|
34
|
+
MQTTClient.connect(
|
33
35
|
host: host,
|
34
36
|
port: port,
|
35
37
|
username: username,
|
36
|
-
password: password
|
38
|
+
password: password,
|
39
|
+
client_id: client_id
|
37
40
|
)
|
38
|
-
|
39
|
-
mqtt_obj.client_id = SecureRandom.random_bytes(8).unpack1('H*')
|
40
|
-
|
41
|
-
mqtt_obj
|
42
41
|
rescue StandardError => e
|
43
42
|
raise e
|
44
43
|
end
|
@@ -416,7 +415,8 @@ module Meshtastic
|
|
416
415
|
host: 'optional - mqtt host (default: mqtt.meshtastic.org)',
|
417
416
|
port: 'optional - mqtt port (defaults: 1883)',
|
418
417
|
username: 'optional - mqtt username (default: meshdev)',
|
419
|
-
password: 'optional - (default: large4cats)'
|
418
|
+
password: 'optional - (default: large4cats)',
|
419
|
+
client_id: 'optional - client ID (default: random 8-byte hex string)'
|
420
420
|
)
|
421
421
|
|
422
422
|
#{self}.subscribe(
|
data/lib/meshtastic/version.rb
CHANGED
data/meshtastic.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meshtastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.85
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-31 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bundler
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
requirements:
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 1.71.
|
130
|
+
version: 1.71.1
|
131
131
|
type: :runtime
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: 1.71.
|
137
|
+
version: 1.71.1
|
138
138
|
- !ruby/object:Gem::Dependency
|
139
139
|
name: rubocop-rake
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|