meshtastic 0.0.93 → 0.0.94

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/lib/meshtastic/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03a5c087ca8a4a2f4b40f721cad92436fd3c9c5464972b4318a3229fa7e51b74
4
- data.tar.gz: d6f1f8b048dc77de929c417b1d4b5255a29873d2fb80e208e1a53819e17b04b8
3
+ metadata.gz: 46a33e93e154c3ed4c22aec4e254a23e2e6694f69262a70e9990c2f4f44e34fb
4
+ data.tar.gz: 8a6f2f3215f52fa4ddbf9149b60383124a8119de431acf5a5a76482b2dab6202
5
5
  SHA512:
6
- metadata.gz: da5fe6ff154d19a53cfdf52a2bacc8a097218b0c3f728667d581a376a0a73d03dec001753f315bbca6f86fb667334ba18df6423fba8245ffc3d53bd081bc6e7f
7
- data.tar.gz: 0a5f42612b652cc6cb862aafaa3ff0e822d003d0e266537bdc4e425666f170dd52891173e48b1dd4996653faa2c8b1eee85425d009fde9b21ddd8abba3bf6f5f
6
+ metadata.gz: 1a98ccb2b75b32a87fb5194e48aa93360f04b9c672a146da0d1dfeccf31b625131254e1326b7027d5d982252739e8c1abdd75c1e97e975c404248d9dff6a728c
7
+ data.tar.gz: 900a7dbd08e07f9fe778c9b517de277a83a7f43c033917778cd6295ef2b7fa4bc06c5abf7597585547530a202780114301128c431f4fa86e1d45b95ebc61bf82
data/README.md CHANGED
@@ -56,15 +56,34 @@ Sending a message over MQTT:
56
56
  ```ruby
57
57
  require 'meshtastic'
58
58
  mqtt_obj = Meshastic::MQTT.connect
59
+ client_id = "!#{mqtt_obj.client_id}"
59
60
  Meshtastic::MQTT.send_text(
60
61
  mqtt_obj: mqtt_obj,
61
- from: '!0fa17b',
62
- topic: 'msh/US/2/e/LongFast/!0fa17b',
62
+ from: client_id,
63
+ to: '!ffffffff',
64
+ topic: "msh/US/2/e/LongFast/#{client_id}",
65
+ channel: 93,
63
66
  text: 'Hello, World!',
64
67
  psks: { LongFast: 'AQ==' }
65
68
  )
66
69
  ```
67
70
 
71
+ One of the "gotchas" when sending messages is ensuring you're sending over the proper channel. The best way to determine which channel you should use is by sending a test message from within the meshtastic app and then viewing the MQTT message similar to the following:
72
+
73
+ ```ruby
74
+ require 'meshtastic'
75
+ mqtt_obj = Meshastic::MQTT.connect
76
+ Meshtastic::MQTT.subscribe(
77
+ mqtt_obj: mqtt_obj,
78
+ region: 'US',
79
+ channel: '2/e/LongFast/#',
80
+ psks: { LongFast: 'AQ==' },
81
+ filter: '!YOUR_CLIENT_ID'
82
+ ) do |message|
83
+ puts message.inspect
84
+ end
85
+ ```
86
+
68
87
  ## Contributing
69
88
 
70
89
  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).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.93'
4
+ VERSION = '0.0.94'
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.93
4
+ version: 0.0.94
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.