@meri-imperiumi/signalk-meshtastic 1.0.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 +13 -5
- package/package.json +11 -2
- package/plugin/commands/switching.js +0 -2
- package/plugin/index.js +37 -7
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ This plugin enables vessels running [Signal K](https://signalk.org) to interact
|
|
|
5
5
|
|
|
6
6
|
If desired, telemetry and position information can also be shared between multiple Meshtastic-using vessels, making it effectively a "pseudo-AIS" system.
|
|
7
7
|
|
|
8
|
-

|
|
9
9
|
|
|
10
10
|
Being a mesh network, there is no need for external telecommunications infrastructure or monthly payments. This means communication between Meshtastic devices onboard and on shore can work just as well in the Finnish Archipelago Sea as in the Tuamotus. In more densely populated places communications may benefit from other Meshtastic users relaying the messages, making it possible to communicate with the boat across a city.
|
|
11
11
|
|
|
@@ -21,13 +21,15 @@ 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.
|
|
27
29
|
|
|
28
30
|
## Features
|
|
29
31
|
|
|
30
|
-
* Connect to a Meshtastic node
|
|
32
|
+
* Connect to a Meshtastic node via HTTP, TCP, or Serial
|
|
31
33
|
* Keep a persistent database of all seen Meshtastic nodes
|
|
32
34
|
* Update Meshtastic node position from Signal K GNSS position
|
|
33
35
|
* Send Signal K alerts as Meshtastic text messages to crew
|
|
@@ -48,7 +50,8 @@ In production use on several boats.
|
|
|
48
50
|
## Requirements
|
|
49
51
|
|
|
50
52
|
* This plugin running inside your Signal K installation
|
|
51
|
-
* One [Meshtastic device](https://meshtastic.org/docs/hardware/devices/) running and connected to the same network (typically boat WiFi) as Signal K. This should be an [ESP32 based](https://meshtastic.org/docs/hardware/devices/heltec-automation/lora32/?heltec=v3) device for WiFi connectivity
|
|
53
|
+
* One [Meshtastic device](https://meshtastic.org/docs/hardware/devices/) running and connected to the same network (typically boat WiFi) as Signal K. This should be an [ESP32 based](https://meshtastic.org/docs/hardware/devices/heltec-automation/lora32/?heltec=v3) device for WiFi connectivity.<br>
|
|
54
|
+
If using Serial connection, it can also be a nRF52 device
|
|
52
55
|
* At least one additional Meshtastic device for the crew ashore. [Seeed T1000-e](https://meshtastic.org/docs/hardware/devices/seeed-studio/sensecap/card-tracker/) is a great option, but any battery-powered Meshtastic device will work. Having a device for each crew member is even better. In busy areas these should be set to [`CLIENT_MUTE` role](https://meshtastic.org/blog/choosing-the-right-device-role/)
|
|
53
56
|
* Optionally, a Meshtastic GPS tracker device installed in the dinghy
|
|
54
57
|
* Optionally, a [Meshtastic mast-top repeater](https://www.printables.com/model/1396221-meshtastic-boat-module-masthead) for greatly increased communications range
|
|
@@ -66,13 +69,13 @@ LoRa is line-of-sight communications quite similarly to VHF. Communications rang
|
|
|
66
69
|
* Wait for some minutes for the plugin to see nearby Meshtastic nodes
|
|
67
70
|
* Configure plugin and set appropriate roles for the crew and dinghy tracker Meshtastic devices
|
|
68
71
|
|
|
69
|
-

|
|
70
73
|
|
|
71
74
|
## Telemetry sent to Meshtastic
|
|
72
75
|
|
|
73
76
|
If enabled, your "boat node" will transmit the following telemetry to Meshtastic. This enables tracking various important metrics about your boat also remotely. They are visible in the device details in your Meshtastic app:
|
|
74
77
|
|
|
75
|
-

|
|
76
79
|
|
|
77
80
|
Metrics used:
|
|
78
81
|
|
|
@@ -88,5 +91,10 @@ Metrics used:
|
|
|
88
91
|
|
|
89
92
|
## Changes
|
|
90
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
|
|
97
|
+
* 1.1.0 (2025-09-11)
|
|
98
|
+
- Added support for Serial transport with the Meshtastic device
|
|
91
99
|
* 1.0.0 (2025-09-11)
|
|
92
100
|
- Initial release with HTTP and TCP transports
|
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meri-imperiumi/signalk-meshtastic",
|
|
3
|
-
"version": "1.
|
|
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",
|
|
@@ -22,7 +30,8 @@
|
|
|
22
30
|
"@bufbuild/protobuf": "^2.6.0",
|
|
23
31
|
"@meshtastic/core": "^2.6.7",
|
|
24
32
|
"@meshtastic/transport-http": "^0.2.5",
|
|
25
|
-
"@meshtastic/transport-node": "^0.0.2"
|
|
33
|
+
"@meshtastic/transport-node": "^0.0.2",
|
|
34
|
+
"@meshtastic/transport-node-serial": "^0.0.2"
|
|
26
35
|
},
|
|
27
36
|
"devDependencies": {
|
|
28
37
|
"eslint": "^8.57.1",
|
|
@@ -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
|
@@ -9,6 +9,7 @@ const { vesselIcon } = require('./waypoint');
|
|
|
9
9
|
let MeshDevice;
|
|
10
10
|
let TransportHTTP;
|
|
11
11
|
let TransportNode;
|
|
12
|
+
let TransportNodeSerial;
|
|
12
13
|
let create;
|
|
13
14
|
let toBinary;
|
|
14
15
|
let Protobuf;
|
|
@@ -221,6 +222,10 @@ module.exports = (app) => {
|
|
|
221
222
|
})
|
|
222
223
|
.then((lib) => {
|
|
223
224
|
TransportNode = lib.TransportNode;
|
|
225
|
+
return import('@meshtastic/transport-node-serial');
|
|
226
|
+
})
|
|
227
|
+
.then((lib) => {
|
|
228
|
+
TransportNodeSerial = lib.TransportNodeSerial;
|
|
224
229
|
return import('@bufbuild/protobuf');
|
|
225
230
|
})
|
|
226
231
|
.then((lib) => {
|
|
@@ -490,6 +495,9 @@ module.exports = (app) => {
|
|
|
490
495
|
if (settings.device && settings.device.transport === 'http') {
|
|
491
496
|
return TransportHTTP.create(settings.device.address);
|
|
492
497
|
}
|
|
498
|
+
if (settings.device && settings.device.transport === 'serial') {
|
|
499
|
+
return TransportNodeSerial.create(settings.device.address);
|
|
500
|
+
}
|
|
493
501
|
return TransportNode.create(settings.device.address);
|
|
494
502
|
})
|
|
495
503
|
.then((transport) => {
|
|
@@ -831,18 +839,36 @@ module.exports = (app) => {
|
|
|
831
839
|
.catch((e) => app.error(`Failed to send alert: ${e.message}`));
|
|
832
840
|
if (v.path.indexOf('notifications.mob.') === 0) {
|
|
833
841
|
// This is a notification about a MOB beacon, create waypoint
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
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) {
|
|
837
863
|
return;
|
|
838
864
|
}
|
|
839
865
|
const setWaypointMessage = create(Protobuf.Mesh.WaypointSchema, {
|
|
840
866
|
id: mmsi,
|
|
841
|
-
latitudeI: Math.floor(
|
|
842
|
-
longitudeI: Math.floor(
|
|
867
|
+
latitudeI: Math.floor(mobPosition.latitude / 1e-7),
|
|
868
|
+
longitudeI: Math.floor(mobPosition.longitude / 1e-7),
|
|
843
869
|
expire: Math.floor((new Date().getTime() / 1000) + (1 * 60 * 60)),
|
|
844
|
-
name: mobVessel.name || `Beacon ${mmsi}`,
|
|
845
|
-
description: `
|
|
870
|
+
name: mobVessel.name || `Beacon ${mobVessel.mmsi}`,
|
|
871
|
+
description: `MOB beacon ${mobVessel.mmsi}`,
|
|
846
872
|
icon: vesselIcon(mobVessel),
|
|
847
873
|
});
|
|
848
874
|
device.sendWaypoint(setWaypointMessage, 'broadcast', 0)
|
|
@@ -941,6 +967,10 @@ module.exports = (app) => {
|
|
|
941
967
|
const: 'http',
|
|
942
968
|
title: 'HTTP (nodes connected to same network, typically ESP32)',
|
|
943
969
|
},
|
|
970
|
+
{
|
|
971
|
+
const: 'serial',
|
|
972
|
+
title: 'Serial port (use full path to serial device as "address")',
|
|
973
|
+
},
|
|
944
974
|
],
|
|
945
975
|
},
|
|
946
976
|
address: {
|