@meri-imperiumi/signalk-mob-notifier 1.1.3 → 1.1.5

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.
@@ -9,8 +9,8 @@ jobs:
9
9
  build:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v3.0.2
13
- - uses: actions/setup-node@v3.1.1
12
+ - uses: actions/checkout@v5
13
+ - uses: actions/setup-node@v6
14
14
  with:
15
15
  node-version: 22
16
16
  - run: npm install
@@ -20,8 +20,8 @@ jobs:
20
20
  needs: build
21
21
  runs-on: ubuntu-latest
22
22
  steps:
23
- - uses: actions/checkout@v3.0.2
24
- - uses: actions/setup-node@v3.1.1
23
+ - uses: actions/checkout@v5
24
+ - uses: actions/setup-node@v6
25
25
  with:
26
26
  node-version: 22
27
27
  registry-url: https://registry.npmjs.org/
package/README.md CHANGED
@@ -11,6 +11,10 @@ Please note that this plugin aims to aid with noticing and locating crew overboa
11
11
 
12
12
  ## Changes
13
13
 
14
+ * 1.1.5 (2025-11-15)
15
+ - Bump release
16
+ * 1.1.4 (2025-11-12)
17
+ - Fix reading MOB vessel data structure
14
18
  * 1.1.3 (2025-11-02)
15
19
  - Fix detection of beacon type (MOB/SART/EPIRB)
16
20
  * 1.1.2 (2025-11-01)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meri-imperiumi/signalk-mob-notifier",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Create Signal K notifications for discovered AIS MOB, EPIRB, and SART beacons",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {
package/plugin/index.js CHANGED
@@ -44,8 +44,8 @@ module.exports = (app) => {
44
44
  interval = setInterval(() => {
45
45
  // Check context for MOBs
46
46
  const mobs = Object.keys(app.signalk.root.vessels)
47
- .filter((context) => {
48
- const mmsi = context.split(':').at(-1);
47
+ .map((ctx) => ctx.split(':').at(-1))
48
+ .filter((mmsi) => {
49
49
  if (mmsi.indexOf('972') === 0) {
50
50
  // MOB beacon seen!
51
51
  return true;
@@ -120,9 +120,10 @@ module.exports = (app) => {
120
120
  return {};
121
121
  };
122
122
  const ownPosition = getCoordinates(app.getSelfPath('navigation.position'));
123
- const mob = app.getPath(`vessels.urn:mrn:imo:mmsi:${mmsi}`);
123
+ const mobContext = `urn:mrn:imo:mmsi:${mmsi}`;
124
+ const mob = app.signalk.root.vessels[mobContext];
124
125
  let mobPosition = {};
125
- if (mob.navigation && mob.navigation.position) {
126
+ if (mob && mob.navigation && mob.navigation.position) {
126
127
  mobPosition = getCoordinates(mob.navigation.position);
127
128
  }
128
129
  if (ownPosition