@noforeignland/signalk-to-noforeignland 1.0.1-beta.5 → 1.1.0-beta.11
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/CHANGELOG.md +15 -6
- package/PROJECT_STRUCTURE.md +357 -0
- package/README.md +15 -6
- package/cleanup-old-plugin.js +111 -19
- package/doc/beta_install_cerbo.md +127 -0
- package/doc/beta_install_rpi.md +64 -0
- package/index.js +210 -868
- package/lib/ConfigManager.js +216 -0
- package/lib/DataPathEmitter.js +93 -0
- package/lib/DirectoryUtils.js +38 -0
- package/lib/HealthMonitor.js +91 -0
- package/lib/PluginCleanup.js +259 -0
- package/lib/TrackLogger.js +306 -0
- package/lib/TrackMigration.js +110 -0
- package/lib/TrackSender.js +219 -0
- package/package.json +3 -2
- package/doc/beta_install.md +0 -60
- package/doc/dev +0 -13
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
How-to install the latest beta or dev tree (unstable) on your device?
|
|
2
|
+
|
|
3
|
+
This guide assumes you have a default install with default folders.
|
|
4
|
+
This is written for a Victron Cerbo GX jump to the section you need want to go to.
|
|
5
|
+
It is recommended to enable the Debug Log for this plugin in Server -> Plugin Config before updating.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Pre-requirements
|
|
9
|
+
On the Cerbo GUI enable SSH access and set a afmin password
|
|
10
|
+
Windows User: Download putty (for ssh) and Winscp (for secure fie copy)
|
|
11
|
+
|
|
12
|
+
## On GUI v1:
|
|
13
|
+
1. Click "Menu" (bottom right)
|
|
14
|
+
2. Settings > General
|
|
15
|
+
3. Set root password
|
|
16
|
+
4. Enable "SSH on LAN"
|
|
17
|
+
|
|
18
|
+
## On GUI v2:
|
|
19
|
+
1. Settings -> General
|
|
20
|
+
2. Set root password
|
|
21
|
+
3. Enable "SSH on LAN"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Backup old data
|
|
25
|
+
|
|
26
|
+
## BEST + SLOW: Full signalk copy to local computer
|
|
27
|
+
1. Connect your Cerbo with WinSCP
|
|
28
|
+
2. Copy the folder "/data/conf/signalk" to your local PC
|
|
29
|
+
|
|
30
|
+
## Alternative Cerbo has a SD Card connected:
|
|
31
|
+
1. ssh to the Cerbo
|
|
32
|
+
```
|
|
33
|
+
df -h
|
|
34
|
+
# showns for me that /dev/mmcblk0p1 has 29GB free and is mounted to /run/media/mmcblk0p1
|
|
35
|
+
# This is a SD card that is manually inserted.
|
|
36
|
+
|
|
37
|
+
mount
|
|
38
|
+
# confirms this for me with output:
|
|
39
|
+
# /dev/mmcblk0p1 on /run/media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
|
|
40
|
+
|
|
41
|
+
cp -r /data/conf/signalk /run/media/mmcblk0p1/signalk-backup
|
|
42
|
+
# copies the files for you, it will take some time, as the CPU and IO are not the fastest
|
|
43
|
+
|
|
44
|
+
ls –la /run/media/mmcblk0p1/signalk-backup
|
|
45
|
+
# Verify that folder and files exist.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# npmjs beta on Cerbo
|
|
50
|
+
|
|
51
|
+
## Install latest beta
|
|
52
|
+
1. SSH to the Cerbo:
|
|
53
|
+
```
|
|
54
|
+
cd /data/conf/signalk
|
|
55
|
+
|
|
56
|
+
npm i @noforeignland/signalk-to-noforeignland@beta
|
|
57
|
+
|
|
58
|
+
# reset owner properly, else package belongs to root
|
|
59
|
+
chown -R signalk:signalk /data/conf/signalk/*
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
2. Restart Server & Check logs
|
|
64
|
+
```
|
|
65
|
+
svc -t /service/signalk-server
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Install specific beta version f.e. 1.0.1-beta.5
|
|
70
|
+
1. SSH to the Cerbo:
|
|
71
|
+
```
|
|
72
|
+
cd /data/conf/signalk
|
|
73
|
+
|
|
74
|
+
# Here use the beta version you want to install
|
|
75
|
+
npm i @noforeignland/signalk-to-noforeignland@1.0.1-beta.5
|
|
76
|
+
|
|
77
|
+
# reset owner properly, else package belongs to root
|
|
78
|
+
chown -R signalk:signalk /data/conf/signalk/*
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
2. Restart Server & Check logs
|
|
82
|
+
```
|
|
83
|
+
svc -t /service/signalk-server
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# dev tree (unstable) install - NOT RECOMMENDED
|
|
88
|
+
|
|
89
|
+
1. Backup as above
|
|
90
|
+
|
|
91
|
+
2. Get new files from repo (main for latest)
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
cd ~
|
|
95
|
+
mkdir dev
|
|
96
|
+
cd dev
|
|
97
|
+
wget https://github.com/noforeignland/nfl-signalk/archive/refs/heads/main.zip
|
|
98
|
+
unzip main.zip
|
|
99
|
+
cd nfl-signalk-main/
|
|
100
|
+
npm pack
|
|
101
|
+
|
|
102
|
+
cd /data/conf/signalk
|
|
103
|
+
npm install ~/dev/nfl-signalk-main/<your_npm_pack.tgz>
|
|
104
|
+
|
|
105
|
+
# reset owner properly, else package belongs to root
|
|
106
|
+
chown -R signalk:signalk /data/conf/signalk/*
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Restart Server & Check logs
|
|
111
|
+
```
|
|
112
|
+
svc -t /service/signalk-server
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
# Manual Fixes
|
|
116
|
+
|
|
117
|
+
## WARNING: found multiple copies of plugin with id signalk-to-noforeignland at /data/conf/signalk/node_modules/ and /data/conf/signalk/node_modules/
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
cd /data/conf/signalk && npm uninstall signalk-to-noforeignland signalk-to-nfl
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
and than
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
svc -t /service/signalk-server
|
|
127
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
How-to install the latest beta or dev tree (unstable) on your device?
|
|
2
|
+
|
|
3
|
+
This guide assumes you have a default install with default folders.
|
|
4
|
+
This is written for a RPI, jump to the section you need want to go to.
|
|
5
|
+
It is recommended to enable the Debug Log for this plugin in Server -> Plugin Config before updating.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Backup old data
|
|
9
|
+
```
|
|
10
|
+
cp -a ~/.signalk ~/signalk-backup
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
# npmjs beta on RPI
|
|
14
|
+
|
|
15
|
+
## Install latest beta
|
|
16
|
+
```
|
|
17
|
+
cd ~.signalk
|
|
18
|
+
|
|
19
|
+
npm i @noforeignland/signalk-to-noforeignland@beta
|
|
20
|
+
|
|
21
|
+
sudo systemctl restart signalk.service && sudo journalctl -u signalk.service -f
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Install a specific beta
|
|
25
|
+
```
|
|
26
|
+
cd ~.signalk
|
|
27
|
+
|
|
28
|
+
# Here use the beta version you want to install
|
|
29
|
+
npm i @noforeignland/signalk-to-noforeignland@1.0.1-beta.5
|
|
30
|
+
|
|
31
|
+
sudo systemctl restart signalk.service && sudo journalctl -u signalk.service -f
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
--------------------------
|
|
35
|
+
|
|
36
|
+
# dev tree (unstable) - NOT RECOMMENDED
|
|
37
|
+
1. Backup old data
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
cd ~
|
|
41
|
+
cp -a .signalk/ signalk-backup
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
2. Get new files from repo (main for latest)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
cd ~
|
|
48
|
+
mkdir dev
|
|
49
|
+
cd dev
|
|
50
|
+
wget https://github.com/noforeignland/nfl-signalk/archive/refs/heads/main.zip
|
|
51
|
+
unzip main.zip
|
|
52
|
+
cd nfl-signalk-main/
|
|
53
|
+
npm pack
|
|
54
|
+
|
|
55
|
+
cd ~/.signalk
|
|
56
|
+
npm install ~/dev/nfl-signalk-main/<your_npm_pack.tgz>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. Restart Server & Check logs
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
sudo systemctl restart signalk.service && sudo journalctl -u signalk.service -f
|
|
63
|
+
```
|
|
64
|
+
|