@meri-imperiumi/signalk-meshtastic 1.1.0 → 1.1.2

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.
package/README.md CHANGED
@@ -21,6 +21,8 @@ Many different kinds of Meshtastic devices are available, from basic microcontro
21
21
  > - Boat Node rebroadcasts the message.
22
22
  > - Parents’ node, unable to hear the kids directly, receives it through Boat Node.
23
23
 
24
+ There's also an [introduction to signalk-meshtastic](https://signalk.org/2025/signalk-meshtastic/) on the Signal K website.
25
+
24
26
  ## Status
25
27
 
26
28
  In production use on several boats.
@@ -89,6 +91,12 @@ Metrics used:
89
91
 
90
92
  ## Changes
91
93
 
94
+ * 1.1.2 (2025-09-25)
95
+ - Added support for the new roles from Meshtastic 2.7 (`ROUTER_LATE` and `CLIENT_BASE`)
96
+ - Fixed issue with sending a bell with alerts that have sound enabled
97
+ * 1.1.1 (2025-09-18)
98
+ - Fixed empty response text message to digital switching actions
99
+ - Added support for the proposed Signal K MOB position specification
92
100
  * 1.1.0 (2025-09-11)
93
101
  - Added support for Serial transport with the Meshtastic device
94
102
  * 1.0.0 (2025-09-11)
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "@meri-imperiumi/signalk-meshtastic",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Signal K plugin for interfacing with the Meshtastic LoRa mesh network",
5
5
  "scripts": {
6
6
  "test": "eslint ."
7
7
  },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git://github.com/meri-imperiumi/signalk-meshtastic.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/meri-imperiumi/signalk-meshtastic/issues"
14
+ },
15
+ "homepage": "https://github.com/meri-imperiumi/signalk-meshtastic#readme",
8
16
  "keywords": [
9
17
  "meshtastic",
10
18
  "signalk-node-server-plugin",
@@ -24,8 +24,6 @@ module.exports = {
24
24
  return;
25
25
  }
26
26
  resolve();
27
- device.sendText(res.message, msg.from, true, false)
28
- .catch((e) => app.error(`Failed to send message: ${e.message}`));
29
27
  });
30
28
  })
31
29
  .then(() => device.sendText(`OK, ${light} is ${switching[2]}`, msg.from, true, false));
package/plugin/index.js CHANGED
@@ -146,6 +146,14 @@ function nodeToSignalK(app, node, nodeInfo, settings) {
146
146
  role = 'tak_tracker';
147
147
  break;
148
148
  }
149
+ case 11: {
150
+ role = 'router_late';
151
+ break;
152
+ }
153
+ case 12: {
154
+ role = 'client_base';
155
+ break;
156
+ }
149
157
  default: {
150
158
  break;
151
159
  }
@@ -454,7 +462,7 @@ module.exports = (app) => {
454
462
  {
455
463
  state: 'warn',
456
464
  lower: 0,
457
- upper: 2,
465
+ upper: 5,
458
466
  message: 'Not connected to device',
459
467
  },
460
468
  {
@@ -823,7 +831,7 @@ module.exports = (app) => {
823
831
  return;
824
832
  }
825
833
  let bell = '';
826
- if (v.value.method && v.value.method.indexOf('sound')) {
834
+ if (v.value.method && v.value.method.indexOf('sound') !== -1) {
827
835
  // Trigger audible bell on receiving Meshtastic devices
828
836
  bell = '\u0007 ';
829
837
  }
@@ -839,18 +847,38 @@ module.exports = (app) => {
839
847
  .catch((e) => app.error(`Failed to send alert: ${e.message}`));
840
848
  if (v.path.indexOf('notifications.mob.') === 0) {
841
849
  // This is a notification about a MOB beacon, create waypoint
842
- const mmsi = v.path.split('.').at(-1);
843
- const mobVessel = app.signalk.root.vessels[`vessels.urn:mrn:imo:mmsi:${mmsi}`];
844
- if (!mobVessel || !mobVessel.navigation.position) {
850
+ let mobPosition;
851
+ let mobVessel = {
852
+ name: 'MOB beacon',
853
+ mmsi: '9712234567',
854
+ };
855
+ if (v.value.data && v.value.data.mmsi) {
856
+ mobVessel.mmsi = v.value.data.mmsi;
857
+ }
858
+ if (v.value.position) {
859
+ // signalk-mob-notifier and freeboard-sk include position in the notification
860
+ mobPosition = v.value.position;
861
+ } else {
862
+ // See if the MOB can be found from Signal K tree
863
+ const mmsi = v.path.split('.').at(-1);
864
+ mobVessel = app.signalk.root.vessels[`vessels.urn:mrn:imo:mmsi:${mmsi}`];
865
+ if (mobVessel && mobVessel.navigation.position) {
866
+ mobPosition = mobVessel.navigation.position;
867
+ if (mobPosition.value) {
868
+ mobPosition = mobPosition.value;
869
+ }
870
+ }
871
+ }
872
+ if (!mobPosition || !mobPosition.latitude) {
845
873
  return;
846
874
  }
847
875
  const setWaypointMessage = create(Protobuf.Mesh.WaypointSchema, {
848
- id: mmsi,
849
- latitudeI: Math.floor(mobVessel.navigation.position.value.latitude / 1e-7),
850
- longitudeI: Math.floor(mobVessel.navigation.position.value.longitude / 1e-7),
876
+ id: mobVessel.mmsi,
877
+ latitudeI: Math.floor(mobPosition.latitude / 1e-7),
878
+ longitudeI: Math.floor(mobPosition.longitude / 1e-7),
851
879
  expire: Math.floor((new Date().getTime() / 1000) + (1 * 60 * 60)),
852
- name: mobVessel.name || `Beacon ${mmsi}`,
853
- description: `AIS beacon ${mmsi}`,
880
+ name: mobVessel.name || `Beacon ${mobVessel.mmsi}`,
881
+ description: `MOB beacon ${mobVessel.mmsi}`,
854
882
  icon: vesselIcon(mobVessel),
855
883
  });
856
884
  device.sendWaypoint(setWaypointMessage, 'broadcast', 0)