bt-sensors-plugin-sk 1.2.4-4 → 1.2.5-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/BTSensor.js +4 -1
- package/README.md +15 -8
- package/bt-sensors-plugin-sk copy.json +170 -0
- package/diff.txt +2860 -0
- package/index.js +31 -15
- package/package.json +1 -1
- package/public/847.js +1 -1
- package/sensor_classes/MopekaTankSensor.js +5 -5
- package/sensor_classes/RuuviTag.js +5 -5
- package/sensor_classes/Victron/VictronSensor.js +29 -8
- package/src/components/PluginConfigurationPanel.js +86 -155
package/BTSensor.js
CHANGED
|
@@ -899,7 +899,7 @@ class BTSensor extends EventEmitter {
|
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
initPaths(deviceConfig, id){
|
|
902
|
-
const source =
|
|
902
|
+
const source = this.getName()
|
|
903
903
|
Object.keys(this.getPaths()).forEach((tag)=>{
|
|
904
904
|
const pathMeta=this.getPath(tag)
|
|
905
905
|
const path = deviceConfig.paths[tag];
|
|
@@ -922,6 +922,9 @@ class BTSensor extends EventEmitter {
|
|
|
922
922
|
return (Date.now()-this?._lastContact??Date.now())/1000
|
|
923
923
|
}
|
|
924
924
|
|
|
925
|
+
prepareConfig(config){
|
|
926
|
+
config.params.sensorClass=this.constructor.name
|
|
927
|
+
}
|
|
925
928
|
|
|
926
929
|
}
|
|
927
930
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
# Bluetooth Sensors for [Signal K](http://www.signalk.org)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## WHAT'S NEW
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# Version 1.2.5-1
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Reverted change from 1.2.5 to path's source field
|
|
8
|
+
- Victron Sensor model ID and name improvements to constistency for VE Smart Networking enabled devices
|
|
9
|
+
- Improved initial startup responsiveness
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
# Version 1.2.5
|
|
12
|
+
|
|
13
|
+
- On initial startup, plugin saves default configuration. Fixing the "missing" configured devices after restart.
|
|
14
|
+
- Mopeka Tank Sensor configuration fix
|
|
15
|
+
- Added number of found devices in a domain in the configuration screen's domain tab
|
|
10
16
|
|
|
11
17
|
# Version 1.2.4-4
|
|
12
18
|
|
|
@@ -174,10 +180,6 @@ Finally, restart SK. Plugin should appear in your server plugins list.<br>
|
|
|
174
180
|
|
|
175
181
|
## KNOWN ISSUES
|
|
176
182
|
|
|
177
|
-
### Problems saving the configuration after installing plugin for first time
|
|
178
|
-
|
|
179
|
-
Your device config after you've saved it will appear to be "missing" after restarting. It's in fact saved in the plugin config directory. All you have to do is Submit the main configuration then enable and optionally disable Debug. This, believe it or not, ensures that the config is marked as enabled. You should see your data now and upon restart.
|
|
180
|
-
|
|
181
183
|
### Connected Devices on Raspberry Pi platform (4/4b/5/CM400/CM500)
|
|
182
184
|
|
|
183
185
|
Onboard Raspberry Pi WiFi can cause interference with the onboard Bluetooth resulting in lost connections to GATT connected devices (Renogy, JBD, etc. )
|
|
@@ -200,6 +202,11 @@ Poorly shielded USB 3.0 and HDMI (5ghz) can interfere with BT transmission (2.4g
|
|
|
200
202
|
- There's no way that I know of to remove a SK Path without restarting the server. So if any active paths are changed by the plugin, you'll still see them hanging around in the data browser growing stale until you restart the server.
|
|
201
203
|
- RPi 3/4/5/CM400s when running an Access Point on the on board Wifi can cause a problem connecting to devices through the onboard BT. The only known fix is to disable the onboard Bluetooth and use a USB BT adapter. Alternatively, you can use a USB WiFi adapter. NOTE: This only applies to _connected_ devices like Renogy devices, LiTime batteries etc.
|
|
202
204
|
|
|
205
|
+
### Problems saving the configuration after installing plugin for first time (fixed as of Version 1.2.5)
|
|
206
|
+
|
|
207
|
+
Device config after being saved will appear to be "missing" after restarting. The config is in fact saved in the plugin config directory. All you have to do is Submit the main configuration then enable and optionally disable Debug. This, believe it or not, ensures that the config is marked as enabled. You should see your data now and upon restart.
|
|
208
|
+
|
|
209
|
+
|
|
203
210
|
## CONFIGURATION
|
|
204
211
|
|
|
205
212
|
After installing and restarting Signalk you should see a "BT Sensors Plugin" option in the Signalk->Server->Plugin Config page.<br><br>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configuration": {
|
|
3
|
+
"discoveryInterval": 10,
|
|
4
|
+
"peripherals": [
|
|
5
|
+
{
|
|
6
|
+
"active": true,
|
|
7
|
+
"discoveryTimeout": 30,
|
|
8
|
+
"params": {
|
|
9
|
+
"name": "ATC_9FF77E",
|
|
10
|
+
"zone": "inside.cabin",
|
|
11
|
+
"parser": "ATC-LE",
|
|
12
|
+
"sensorClass": "ATC"
|
|
13
|
+
},
|
|
14
|
+
"paths": {
|
|
15
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
16
|
+
"batteryStrength": "sensors.{macAndName}.battery.strength",
|
|
17
|
+
"voltage": "sensors.{macAndName}.battery.voltage",
|
|
18
|
+
"temp": "environment.{zone}.temperature",
|
|
19
|
+
"humidity": "environment.{zone}.humidity"
|
|
20
|
+
},
|
|
21
|
+
"mac_address": "A4:C1:38:9F:F7:7E"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"active": true,
|
|
25
|
+
"discoveryTimeout": 30,
|
|
26
|
+
"params": {
|
|
27
|
+
"name": "tps",
|
|
28
|
+
"zone": "inside.refrigerator",
|
|
29
|
+
"sensorClass": "Inkbird"
|
|
30
|
+
},
|
|
31
|
+
"paths": {
|
|
32
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
33
|
+
"temp": "environment.{zone}.temperature",
|
|
34
|
+
"battery": "sensors.{macAndName}.battery.strength"
|
|
35
|
+
},
|
|
36
|
+
"mac_address": "49:22:05:17:2B:AE"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"active": true,
|
|
40
|
+
"discoveryTimeout": 30,
|
|
41
|
+
"params": {
|
|
42
|
+
"name": "Ruuvi BC7E",
|
|
43
|
+
"zone": "inside.navdesk",
|
|
44
|
+
"sensorClass": "RuuviTag"
|
|
45
|
+
},
|
|
46
|
+
"paths": {
|
|
47
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
48
|
+
"temp": "environment.{zone}.temperature",
|
|
49
|
+
"humidity": "environment.{zone}.humidity",
|
|
50
|
+
"pressure": "environment.{zone}.pressure",
|
|
51
|
+
"accX": "sensors.{macAndName}.accX",
|
|
52
|
+
"accY": "sensors.{macAndName}.accY",
|
|
53
|
+
"accZ": "sensors.{macAndName}.accZ",
|
|
54
|
+
"battV": "sensors.{macAndName}.battery.voltage",
|
|
55
|
+
"mc": "sensors.{macAndName}.movementCounter",
|
|
56
|
+
"msc": "sensors.{macAndName}.measurementSequenceCounter"
|
|
57
|
+
},
|
|
58
|
+
"mac_address": "F9:B0:6E:63:BC:7E"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"active": true,
|
|
62
|
+
"discoveryTimeout": 30,
|
|
63
|
+
"params": {
|
|
64
|
+
"name": "SBMO-003Z-db1b",
|
|
65
|
+
"zone": "inside",
|
|
66
|
+
"sensorClass": "ShellySBMO003Z"
|
|
67
|
+
},
|
|
68
|
+
"paths": {
|
|
69
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
70
|
+
"motion": "environment.{zone}.motion",
|
|
71
|
+
"illuminance": "environment.{zone}.illuminance",
|
|
72
|
+
"battery": "sensors.{macAndName}.battery.strength",
|
|
73
|
+
"button": "sensors.{macAndName}.button"
|
|
74
|
+
},
|
|
75
|
+
"mac_address": "E8:E0:7E:97:DB:1B"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"active": true,
|
|
79
|
+
"discoveryTimeout": 30,
|
|
80
|
+
"params": {
|
|
81
|
+
"name": "LYWSD03MMC",
|
|
82
|
+
"zone": "inside.vberth",
|
|
83
|
+
"encryptionKey": "3985f4ebc032f276cc316f1f6ecea085",
|
|
84
|
+
"sensorClass": "XiaomiMiBeacon"
|
|
85
|
+
},
|
|
86
|
+
"paths": {
|
|
87
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
88
|
+
"temp": "environment.{zone}.temperature",
|
|
89
|
+
"humidity": "environment.{zone}.humidity",
|
|
90
|
+
"batteryStrength": "sensors.{macAndName}.battery.strength",
|
|
91
|
+
"voltage": "sensors.{macAndName}.battery.voltage"
|
|
92
|
+
},
|
|
93
|
+
"gattParams": {
|
|
94
|
+
"useGATT": false
|
|
95
|
+
},
|
|
96
|
+
"mac_address": "A4:C1:38:3E:7E:94"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"active": true,
|
|
100
|
+
"discoveryTimeout": 30,
|
|
101
|
+
"params": {
|
|
102
|
+
"name": "SmartShunt HQ2204C2GHD",
|
|
103
|
+
"batteryID": "house",
|
|
104
|
+
"encryptionKey": "8cce8529307cf9dd0c85611c4fef42d9",
|
|
105
|
+
"sensorClass": "VictronBatteryMonitor"
|
|
106
|
+
},
|
|
107
|
+
"paths": {
|
|
108
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
109
|
+
"current": "electrical.batteries.{batteryID}.current",
|
|
110
|
+
"power": "electrical.batteries.{batteryID}.power",
|
|
111
|
+
"voltage": "electrical.batteries.{batteryID}.voltage",
|
|
112
|
+
"alarm": "electrical.batteries.{batteryID}.alarm",
|
|
113
|
+
"consumed": "electrical.batteries.{batteryID}.capacity.ampHoursConsumed",
|
|
114
|
+
"soc": "electrical.batteries.{batteryID}.capacity.stateOfCharge",
|
|
115
|
+
"ttg": "electrical.batteries.{batteryID}.capacity.timeRemaining",
|
|
116
|
+
"starterVoltage": "electrical.batteries.secondary.voltage"
|
|
117
|
+
},
|
|
118
|
+
"gattParams": {
|
|
119
|
+
"useGATT": false
|
|
120
|
+
},
|
|
121
|
+
"mac_address": "D4:50:46:39:38:C5"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"active": true,
|
|
125
|
+
"discoveryTimeout": 90,
|
|
126
|
+
"params": {
|
|
127
|
+
"name": "aft propane tank",
|
|
128
|
+
"medium": "PROPANE",
|
|
129
|
+
"tankHeight": "325",
|
|
130
|
+
"id": "propane",
|
|
131
|
+
"sensorClass": "MopekaTankSensor"
|
|
132
|
+
},
|
|
133
|
+
"paths": {
|
|
134
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
135
|
+
"battVolt": "sensors.{macAndName}.battery.voltage",
|
|
136
|
+
"battStrength": "sensors.{macAndName}.battery.strength",
|
|
137
|
+
"temp": "tanks.{id}.temperature",
|
|
138
|
+
"tankLevel": "tanks.{id}.currentLevel",
|
|
139
|
+
"readingQuality": "sensors.{macAndName}.readingQuality",
|
|
140
|
+
"accX": "sensors.{macAndName}.accelerationXAxis",
|
|
141
|
+
"accY": "sensors.{macAndName}.accelerationYAxis"
|
|
142
|
+
},
|
|
143
|
+
"mac_address": "D4:40:59:BE:2A:8C"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"active": true,
|
|
147
|
+
"discoveryTimeout": 30,
|
|
148
|
+
"params": {
|
|
149
|
+
"name": "SBHT-003C",
|
|
150
|
+
"zone": "outside.deck",
|
|
151
|
+
"sensorClass": "ShellySBHT003C"
|
|
152
|
+
},
|
|
153
|
+
"paths": {
|
|
154
|
+
"RSSI": "sensors.{macAndName}.RSSI",
|
|
155
|
+
"battery": "sensors.{macAndName}.battery.strength",
|
|
156
|
+
"temp": "environment.{zone}.temperature",
|
|
157
|
+
"humidity": "environment.{zone}.humidity",
|
|
158
|
+
"button": "sensors.{macAndName}.button"
|
|
159
|
+
},
|
|
160
|
+
"mac_address": "7C:C6:B6:AF:49:5F"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"adapter": "hci0",
|
|
164
|
+
"transport": "le",
|
|
165
|
+
"duplicateData": false,
|
|
166
|
+
"discoveryTimeout": 30
|
|
167
|
+
},
|
|
168
|
+
"enabled": true,
|
|
169
|
+
"enableDebug": false
|
|
170
|
+
}
|