@meri-imperiumi/signalk-meshtastic 1.1.0 → 1.1.1

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,9 @@ Metrics used:
89
91
 
90
92
  ## Changes
91
93
 
94
+ * 1.1.1 (2025-09-18)
95
+ - Fixed empty response text message to digital switching actions
96
+ - Added support for the proposed Signal K MOB position specification
92
97
  * 1.1.0 (2025-09-11)
93
98
  - Added support for Serial transport with the Meshtastic device
94
99
  * 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.1",
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
@@ -839,18 +839,36 @@ module.exports = (app) => {
839
839
  .catch((e) => app.error(`Failed to send alert: ${e.message}`));
840
840
  if (v.path.indexOf('notifications.mob.') === 0) {
841
841
  // 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) {
842
+ let mobPosition;
843
+ let mmsi = 9712234567;
844
+ let mobVessel = {
845
+ name: 'MOB beacon',
846
+ mmsi,
847
+ };
848
+ if (v.value.data && v.value.data.position) {
849
+ // There is a proposal to include position in the notification
850
+ mobPosition = v.value.data.position;
851
+ if (v.value.data.mmsi) {
852
+ mobVessel.mmsi = mmsi;
853
+ }
854
+ } else {
855
+ // See if the MOB can be found from Signal K tree
856
+ mmsi = v.path.split('.').at(-1);
857
+ mobVessel = app.signalk.root.vessels[`vessels.urn:mrn:imo:mmsi:${mmsi}`];
858
+ if (mobVessel && mobVessel.navigation.position) {
859
+ mobPosition = mobVessel.navigation.position;
860
+ }
861
+ }
862
+ if (!mobPosition) {
845
863
  return;
846
864
  }
847
865
  const setWaypointMessage = create(Protobuf.Mesh.WaypointSchema, {
848
866
  id: mmsi,
849
- latitudeI: Math.floor(mobVessel.navigation.position.value.latitude / 1e-7),
850
- longitudeI: Math.floor(mobVessel.navigation.position.value.longitude / 1e-7),
867
+ latitudeI: Math.floor(mobPosition.latitude / 1e-7),
868
+ longitudeI: Math.floor(mobPosition.longitude / 1e-7),
851
869
  expire: Math.floor((new Date().getTime() / 1000) + (1 * 60 * 60)),
852
- name: mobVessel.name || `Beacon ${mmsi}`,
853
- description: `AIS beacon ${mmsi}`,
870
+ name: mobVessel.name || `Beacon ${mobVessel.mmsi}`,
871
+ description: `MOB beacon ${mobVessel.mmsi}`,
854
872
  icon: vesselIcon(mobVessel),
855
873
  });
856
874
  device.sendWaypoint(setWaypointMessage, 'broadcast', 0)