meshtastic 0.0.89 → 0.0.91

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cd7ce0fc064195313e73fd77dcf8361ec366ebef7b7a038ee0547e7b630f8f9
4
- data.tar.gz: 50f51b0081307df2e5754e04c41c050181bc2ecaadf40c5d1c892ad721a25f8c
3
+ metadata.gz: 0e62ba5c769c5766985370f23f32dd7f1544aa8c4e08a25c52b6e967d5e44d5b
4
+ data.tar.gz: 76fcf49d7f71cd7d3c5ce31eea1e9dff2d0f3c94c7b7bb4e3fb091361c2388fc
5
5
  SHA512:
6
- metadata.gz: d0a844a9ecc6d7f4f68640812160cf34e0c7b56190961efe1f8a8766c3e4e69e1f757cf912e060510fa00cc5b3a84fd8a3acbaafbed53675fa390f9c6d21fc93
7
- data.tar.gz: 7da14fe99bf4a34fc7f153c74da2e9f42066ef4fc20f18138cb0fe79b5e50bbcd997c6e46414e3b3547687a025efca6f21f294086f70cc6ffa1e6a658ea7f553
6
+ metadata.gz: fb49afb41a5429ff7b1b94a8271a54b8427a41ba1316896fef7c9f33716d463a9217abbb24c8c82d666d541fb4e7cac765ad924b7f857b6673800d327ad15985
7
+ data.tar.gz: 118627daf3d821e4865159ca1b601f01583ee5698277c748b44d272a50eebfb8495d58c2919c39896ffd285cb46e77e184b79a48b16f84a455bb9c7a2a4a6d5f
data/README.md CHANGED
@@ -41,11 +41,30 @@ This code will dump the contents of every message:
41
41
  ```ruby
42
42
  require 'meshtastic'
43
43
  mqtt_obj = Meshastic::MQTT.connect
44
- Meshtastic::MQTT.subscribe(mqtt_obj: mqtt_obj) do |message|
44
+ Meshtastic::MQTT.subscribe(
45
+ mqtt_obj: mqtt_obj,
46
+ region: 'US',
47
+ channel: '2/e/LongFast/#',
48
+ psks: { LongFast: 'AQ==' }
49
+ ) do |message|
45
50
  puts message.inspect
46
51
  end
47
52
  ```
48
53
 
54
+ Sending a message over MQTT:
55
+
56
+ ```ruby
57
+ require 'meshtastic'
58
+ mqtt_obj = Meshastic::MQTT.connect
59
+ Meshtastic::MQTT.send_text(
60
+ mqtt_obj: mqtt_obj,
61
+ from: '!00fa1f',
62
+ topic: 'msh/US/2/e/LongFast/!00fa1f',
63
+ text: 'Hello, World!',
64
+ psks: { LongFast: 'AQ==' }
65
+ )
66
+ ```
67
+
49
68
  ## Contributing
50
69
 
51
70
  Bug reports and pull requests are welcome on GitHub at https://github.com/0dayinc/meshtastic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/0dayinc/meshtastic/blob/master/CODE_OF_CONDUCT.md).
@@ -269,7 +269,7 @@ module Meshtastic
269
269
  port: 'optional - mqtt port (defaults: 1883)',
270
270
  username: 'optional - mqtt username (default: meshdev)',
271
271
  password: 'optional - (default: large4cats)',
272
- client_id: 'optional - client ID (default: random 8-byte hex string)'
272
+ client_id: 'optional - client ID (default: random 4-byte hex string)'
273
273
  )
274
274
 
275
275
  #{self}.subscribe(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.89'
4
+ VERSION = '0.0.91'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meshtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.89
4
+ version: 0.0.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.