bt-sensors-plugin-sk 1.3.6-3 → 1.3.6-beta5
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 +22 -16
- package/README.md +7 -0
- package/package.json +1 -1
- package/plugin_defaults.json +1 -2
- package/public/124.js +1 -0
- package/public/159.js +1 -1
- package/public/540.js +1 -1
- package/public/598.js +8 -0
- package/public/{834.js.LICENSE.txt → 598.js.LICENSE.txt} +2 -0
- package/public/images/bm6.webp +0 -0
- package/public/main.js +1 -1
- package/public/remoteEntry.js +1 -1
- package/sensor_classes/BMBatteryMonitor.js +221 -0
- package/sensor_classes/Beacon/AbstractBeaconMixin.js +27 -9
- package/sensor_classes/FeasyComBeacon.js +1 -1
- package/sensor_classes/GobiusCTankMeter.js +15 -0
- package/sensor_classes/JBDBMS.js +357 -220
- package/sensor_classes/TestData/Jikong.json +36 -0
- package/sensor_classes/Victron/VictronSensor.js +7 -1
- package/sensor_classes/testxiaomi.js +45 -0
- package/src/components/BeaconRenderer.js +261 -0
- package/temp.html +0 -0
- package/testxiaomi.js +27 -0
- package/.vscode/settings.json +0 -2
- package/Screenshot 2025-06-12 at 9.33.57/342/200/257AM.png +0 -0
- package/bt-sensors-plugin-sk copy.json +0 -170
- package/bt-sensors-plugin-sk.json.bak +0 -121
- package/development/TestData/Jikong.json +0 -14
- package/diff.txt +0 -2860
- package/public/143.js +0 -1
- package/public/834.js +0 -14
- package/test.txt +0 -805
- package/testGATT.js +0 -24
- package/vsl_patch_17_06_25.patch +0 -13
|
@@ -16,19 +16,25 @@ const VictronIdentifier = require('./VictronIdentifier.js');
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
static async getDataPacket(device, md){
|
|
19
|
+
static async getDataPacket(device, md, timeout=60000) {
|
|
20
20
|
if (md && md[this.ManufacturerID]?.value[0]==0x10)
|
|
21
21
|
return md[this.ManufacturerID].value
|
|
22
22
|
|
|
23
23
|
device.helper._prepare()
|
|
24
24
|
|
|
25
25
|
return new Promise((resolve, reject) => {
|
|
26
|
+
const timeoutID = setTimeout(() => {
|
|
27
|
+
device.helper.removeListeners()
|
|
28
|
+
reject(new Error("Timeout waiting for Victron Manufacturer Data"))
|
|
29
|
+
}, timeout);
|
|
30
|
+
|
|
26
31
|
device.helper.on("PropertiesChanged",
|
|
27
32
|
(props)=> {
|
|
28
33
|
if (Object.hasOwn(props,'ManufacturerData')){
|
|
29
34
|
const md = props['ManufacturerData'].value
|
|
30
35
|
if(md[this.ManufacturerID].value[0]==0x10) {
|
|
31
36
|
device.helper.removeListeners()
|
|
37
|
+
clearTimeout(timeoutID);
|
|
32
38
|
resolve(md[this.ManufacturerID].value)
|
|
33
39
|
}
|
|
34
40
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
function test() {
|
|
3
|
+
const crypto = require("crypto");
|
|
4
|
+
var mac = Buffer.from("A4:C1:38:BA:24:B2".replaceAll(":", ""), "hex");
|
|
5
|
+
var data = Buffer.from(
|
|
6
|
+
"48 59 32 28 2d 81 d0 40 5f 2a 97 38 08 00 00 c9 bd c9 8b".replaceAll(
|
|
7
|
+
" ",
|
|
8
|
+
""
|
|
9
|
+
),
|
|
10
|
+
"hex"
|
|
11
|
+
);
|
|
12
|
+
var encryptionKey = Buffer.from("1828296d746bb1abefbf31de8c86fc1e", "hex");
|
|
13
|
+
i = 5;
|
|
14
|
+
const frameControl = data.readUInt16LE(0);
|
|
15
|
+
const isEncrypted = (frameControl >> 3) & 1;
|
|
16
|
+
const encryptionVersion = frameControl >> 12;
|
|
17
|
+
const mesh = (frameControl >> 7) & 1; // mesh device
|
|
18
|
+
const authMode = (frameControl >> 10) & 3;
|
|
19
|
+
const solicited = (frameControl >> 9) & 1;
|
|
20
|
+
const registered = (frameControl >> 8) & 1;
|
|
21
|
+
const objectInclude = (frameControl >> 6) & 1; // object/payload data present
|
|
22
|
+
const capabilityInclude = (frameControl >> 5) & 1; // capability byte present
|
|
23
|
+
const macInclude = (frameControl >> 4) & 1; // MAC address included in payload
|
|
24
|
+
const requestTiming = frameControl & 1;
|
|
25
|
+
|
|
26
|
+
if (capabilityInclude) i++;
|
|
27
|
+
debugger
|
|
28
|
+
const encryptedPayload = data.subarray(i, -7);
|
|
29
|
+
const nonce = Buffer.concat([
|
|
30
|
+
mac.reverse(),
|
|
31
|
+
data.subarray(2, 5),
|
|
32
|
+
data.subarray(-7, -4),
|
|
33
|
+
]);
|
|
34
|
+
const cipher = crypto.createDecipheriv(
|
|
35
|
+
"aes-128-ccm",
|
|
36
|
+
Buffer.from(encryptionKey, "hex"),
|
|
37
|
+
nonce,
|
|
38
|
+
{ authTagLength: 4 }
|
|
39
|
+
);
|
|
40
|
+
cipher.setAAD(Buffer.from("11", "hex"), {
|
|
41
|
+
plaintextLength: encryptedPayload.length,
|
|
42
|
+
});
|
|
43
|
+
cipher.setAuthTag(data.subarray(-4));
|
|
44
|
+
return cipher.update(encryptedPayload);
|
|
45
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
const RadialRing = ({
|
|
3
|
+
size = 400,
|
|
4
|
+
radius = 200,
|
|
5
|
+
centerOffset = {x:0, y:0},
|
|
6
|
+
offsets = { inner: 0.6, middle: 0.8 },
|
|
7
|
+
colors = { primary: "#ff0000", accent: "#ff0000" }, pulse=false
|
|
8
|
+
}) => {
|
|
9
|
+
|
|
10
|
+
const cx = size / 2;
|
|
11
|
+
const cy = size / 2
|
|
12
|
+
const pulsar=`
|
|
13
|
+
@keyframes pulse {
|
|
14
|
+
0% {
|
|
15
|
+
transform: scale(.5);
|
|
16
|
+
opacity: 0.8;
|
|
17
|
+
}
|
|
18
|
+
100% {
|
|
19
|
+
transform: scale(1);
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
const ringStyle = {
|
|
25
|
+
transformOrigin: 'center',
|
|
26
|
+
animation: pulse ? `pulse 2s ease-out infinite` : 'none',
|
|
27
|
+
};
|
|
28
|
+
return (
|
|
29
|
+
<div>
|
|
30
|
+
<style>{pulsar}</style>
|
|
31
|
+
<svg
|
|
32
|
+
viewBox={`${0} ${0} ${size} ${size}`}
|
|
33
|
+
>
|
|
34
|
+
<defs>
|
|
35
|
+
<radialGradient id="ringGradient">
|
|
36
|
+
<stop offset={offsets.inner} stopColor={colors.primary} stopOpacity={0}/>
|
|
37
|
+
<stop offset={offsets.middle} stopColor={colors.accent} stopOpacity={1}/>
|
|
38
|
+
<stop offset={1} stopColor={colors.primary} stopOpacity={0}/>
|
|
39
|
+
</radialGradient>
|
|
40
|
+
</defs>
|
|
41
|
+
<g
|
|
42
|
+
transform={`translate(${centerOffset.x}, ${-1*centerOffset.y})`}>
|
|
43
|
+
|
|
44
|
+
<circle cx={cx} cy={cy} r={radius} fill="url(#ringGradient)" style={ringStyle} />
|
|
45
|
+
</g>
|
|
46
|
+
</svg>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const FuzzyDistance = ({ distance = 10, accuracy = 0.75, size = 200, centerOffset={x:0, y:0}, scale=100, pulse=false }) => {
|
|
52
|
+
const ptom = size / scale;
|
|
53
|
+
const delta = (((1 - (accuracy>=1?.96:accuracy)) * distance))
|
|
54
|
+
const r = (distance + delta)*ptom;
|
|
55
|
+
const innerR = (distance - delta)*ptom;
|
|
56
|
+
|
|
57
|
+
const offset0 = innerR/r
|
|
58
|
+
const offset1 = (1 + (innerR / r)) / 2;
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<RadialRing
|
|
62
|
+
pulse={pulse}
|
|
63
|
+
radius={r}
|
|
64
|
+
centerOffset={{x:centerOffset.x*ptom, y: centerOffset.y*ptom}}
|
|
65
|
+
offsets={{ inner: offset0, middle: offset1 }}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
const Boat = ({
|
|
72
|
+
lengthMeters = 5,
|
|
73
|
+
widthMeters = 2,
|
|
74
|
+
offset = { x: 0, y: 0 }
|
|
75
|
+
}) => {
|
|
76
|
+
// We use a constant internal coordinate system (e.g., 1 unit = 1 meter)
|
|
77
|
+
// The viewBox will handle the scaling to the actual pixel size
|
|
78
|
+
const halfW = widthMeters / 2;
|
|
79
|
+
const halfL = lengthMeters / 2;
|
|
80
|
+
const padding = 0 ; // 1 meter of padding around the boat
|
|
81
|
+
|
|
82
|
+
// Calculate the viewBox to ensure the boat and the dot are always visible
|
|
83
|
+
const minX = -Math.max(halfW, Math.abs(offset.x)) - padding;
|
|
84
|
+
const minY = -Math.max(halfL, Math.abs(offset.y)) - padding;
|
|
85
|
+
const width = (Math.max(halfW, Math.abs(offset.x)) + padding) * 2;
|
|
86
|
+
const height = (Math.max(halfL, Math.abs(offset.y)) + padding) * 2;
|
|
87
|
+
|
|
88
|
+
// Path data using SVG Command syntax:
|
|
89
|
+
// M = MoveTo, C = Cubic Bezier, L = LineTo, Z = ClosePath
|
|
90
|
+
const hullPath = `
|
|
91
|
+
M 0 ${-halfL}
|
|
92
|
+
C ${halfW * 1.2} ${-halfL * 0.5}, ${halfW} ${halfL * 0.5}, ${halfW * 0.8} ${halfL}
|
|
93
|
+
L ${-halfW * 0.8} ${halfL}
|
|
94
|
+
C ${-halfW} ${halfL * 0.5}, ${-halfW * 1.2} ${-halfL * 0.5}, 0 ${-halfL}
|
|
95
|
+
Z
|
|
96
|
+
`;
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<svg
|
|
101
|
+
viewBox={`${minX} ${minY} ${width} ${height}`}
|
|
102
|
+
style={{ width: '100%', height: '100%' }}
|
|
103
|
+
>
|
|
104
|
+
{/* The Boat Hull */}
|
|
105
|
+
<path
|
|
106
|
+
d={hullPath}
|
|
107
|
+
fill="white"
|
|
108
|
+
stroke="#333"
|
|
109
|
+
strokeWidth={widthMeters * 0.02}
|
|
110
|
+
strokeLinejoin="round"
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<g
|
|
114
|
+
transform={`translate(${offset.x}, ${-1*offset.y})`}
|
|
115
|
+
stroke="#211d3a77"
|
|
116
|
+
strokeWidth={widthMeters * 0.015}
|
|
117
|
+
>
|
|
118
|
+
{/* Horizontal line */}
|
|
119
|
+
<line x1="-0.3" y1="0" x2="0.3" y2="0" />
|
|
120
|
+
{/* Vertical line */}
|
|
121
|
+
<line x1="0" y1="-0.3" x2="0" y2="0.3" />
|
|
122
|
+
</g>
|
|
123
|
+
</svg>
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
function formatMilliseconds(ms) {
|
|
127
|
+
const seconds = Math.floor((ms / 1000) % 60);
|
|
128
|
+
const minutes = Math.floor((ms / (1000 * 60)) % 60);
|
|
129
|
+
const hours = Math.floor((ms / (1000 * 60 * 60)) % 24);
|
|
130
|
+
const days = Math.floor(ms / (1000 * 60 * 60 * 24));
|
|
131
|
+
|
|
132
|
+
// Format with leading zeros
|
|
133
|
+
return `${days}${days>0?'d':''} ${days>0|hours>0?String(hours).padStart(2, '0')+'h':''} ${hours>0|minutes>0?String(minutes).padStart(2, '0')+'m':''} ${String(seconds).padStart(2, '0')}s`;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Calculates the nautical distance between two points on Earth.
|
|
138
|
+
* @param {number} lat1 - Latitude of first point
|
|
139
|
+
* @param {number} lon1 - Longitude of first point
|
|
140
|
+
* @param {number} lat2 - Latitude of second point
|
|
141
|
+
* @param {number} lon2 - Longitude of second point
|
|
142
|
+
* @returns {number} Distance in Nautical Miles (NM)
|
|
143
|
+
*//**
|
|
144
|
+
* Calculates the nautical distance between two points on Earth.
|
|
145
|
+
* @param {number} lat1 - Latitude of first point
|
|
146
|
+
* @param {number} lon1 - Longitude of first point
|
|
147
|
+
* @param {number} lat2 - Latitude of second point
|
|
148
|
+
* @param {number} lon2 - Longitude of second point
|
|
149
|
+
* @returns {number} Distance in Nautical Miles (NM)
|
|
150
|
+
*/
|
|
151
|
+
function calculateNauticalDistance(lat1, lon1, lat2, lon2) {
|
|
152
|
+
const R = 3440.065; // Earth's radius in Nautical Miles
|
|
153
|
+
const dLat = (lat2 - lat1) * (Math.PI / 180);
|
|
154
|
+
const dLon = (lon2 - lon1) * (Math.PI / 180);
|
|
155
|
+
|
|
156
|
+
const a =
|
|
157
|
+
Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
|
158
|
+
Math.cos(lat1 * (Math.PI / 180)) *
|
|
159
|
+
Math.cos(lat2 * (Math.PI / 180)) *
|
|
160
|
+
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
|
161
|
+
|
|
162
|
+
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
163
|
+
const d = R * c; // Distance in NM
|
|
164
|
+
|
|
165
|
+
return d;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function getLatLonOffset(lat1, lon1, lat2, lon2) {
|
|
169
|
+
const R = 6371000; // Earth radius in meters
|
|
170
|
+
const toRad = (deg) => (deg * Math.PI) / 180;
|
|
171
|
+
|
|
172
|
+
// 1. Calculate the difference in Radians
|
|
173
|
+
const dLat = toRad(lat2 - lat1);
|
|
174
|
+
const dLon = toRad(lon2 - lon1);
|
|
175
|
+
const latAvg = toRad((lat1 + lat2) / 2);
|
|
176
|
+
|
|
177
|
+
// 2. Apply the projection
|
|
178
|
+
const dy = toRad(lat2 - lat1) * R;
|
|
179
|
+
const dx = dLon * R * Math.cos(latAvg);
|
|
180
|
+
|
|
181
|
+
return { x: dx, y: dy };
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function getBearing(lat1, lon1, lat2, lon2) {
|
|
185
|
+
// Convert degrees to radians
|
|
186
|
+
const toRadians = (degrees) => (degrees * Math.PI) / 180;
|
|
187
|
+
const toDegrees = (radians) => (radians * 180) / Math.PI;
|
|
188
|
+
|
|
189
|
+
const startLat = toRadians(lat1);
|
|
190
|
+
const startLng = toRadians(lon1);
|
|
191
|
+
const destLat = toRadians(lat2);
|
|
192
|
+
const destLng = toRadians(lon2);
|
|
193
|
+
|
|
194
|
+
const y = Math.sin(destLng - startLng) * Math.cos(destLat);
|
|
195
|
+
const x = Math.cos(startLat) * Math.sin(destLat) -
|
|
196
|
+
Math.sin(startLat) * Math.cos(destLat) * Math.cos(destLng - startLng);
|
|
197
|
+
|
|
198
|
+
let bearing = Math.atan2(y, x);
|
|
199
|
+
bearing = toDegrees(bearing);
|
|
200
|
+
|
|
201
|
+
// Normalize to 0-360 degrees
|
|
202
|
+
return (bearing + 360) % 360;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const BeaconRenderer = ({value, centerOffset={x:0,y:0}, size}) => {
|
|
206
|
+
const [index, setIndex] = useState(0);
|
|
207
|
+
const [distanceTo, setDistanceTo ] = useState(calculateNauticalDistance(value.latitude, value.longitude, value[index].latitude, value[index].longitude ))
|
|
208
|
+
|
|
209
|
+
const latLonOffset = getLatLonOffset( value.log[index].latitude, value.log[index].longitude, value.latitude, value.longitude )
|
|
210
|
+
|
|
211
|
+
const minSize=Math.max(Math.abs(latLonOffset.x*1.5),Math.abs(latLonOffset.y*1.5))
|
|
212
|
+
const spriteScale=minSize<beam?0.9:scale/2
|
|
213
|
+
const ptom = size/(loa/scale)
|
|
214
|
+
console.log(scale, value.loa/(1/scale), ptom, latLonOffset.x*ptom, latLonOffset.y*ptom)
|
|
215
|
+
return (
|
|
216
|
+
<div>
|
|
217
|
+
|
|
218
|
+
<div style={{ width: size, height: size, background: '#42b9f5', border: '1px solid #ccc', position:'absolute' }}>
|
|
219
|
+
<div style={{ transform: [
|
|
220
|
+
`translateX(${latLonOffset.x*ptom/2}px)
|
|
221
|
+
translateY(${latLonOffset.y*ptom/2}px)`]
|
|
222
|
+
}}>
|
|
223
|
+
<div style={{ zIndex:1, width: size, height: size, position: 'absolute',
|
|
224
|
+
transform: [`scale(${spriteScale})
|
|
225
|
+
rotate(${value.heading}rad)`]}}>
|
|
226
|
+
<Boat lengthMeters={value.loa} widthMeters={value.beam} offset={centerOffset} />
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
<div style={{ transform: [`scale(${spriteScale})`], width: size, height: size, position: 'absolute', zIndex:2}}>
|
|
230
|
+
<FuzzyDistance pulse={distanceTo*1852>(value.loa/2)} scale={(value.loa)} accuracy={value.log[index].distances.accuracy} distance={value.log[index].distances.avgDistance} centerOffset={centerOffset} size={size}/>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div style={{ color:"black", fontSize: `${size/22}px`}}>
|
|
234
|
+
<div style={{ position: 'absolute', top:10, left: 10}}>
|
|
235
|
+
|
|
236
|
+
{value.log[0].latitude}, {value.log[0].longitude} <p/>
|
|
237
|
+
{formatMilliseconds(timeNow-new Date(value.log[index].timestamp).valueOf())}
|
|
238
|
+
</div>
|
|
239
|
+
<div style={{ position: 'absolute', bottom:10, left:10 }}>
|
|
240
|
+
{distanceTo>.25?distanceTo.toFixed(2)+'nm':(distanceTo*1852).toFixed(2)+'m'} {getBearing(value.latitude, value.longitude, value.log[index].latitude, value.log[index].longitude ).toFixed(2)}°
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
<div style={{ color:"black", position: 'absolute', bottom:10, right:40 }}>
|
|
244
|
+
<button
|
|
245
|
+
onClick={() => {setIndex(index==0?value.log.length-1:index - 1)}}
|
|
246
|
+
>
|
|
247
|
+
◀
|
|
248
|
+
</button>
|
|
249
|
+
</div>
|
|
250
|
+
<div style={{ color:"black", position: 'absolute', bottom:10, right: 10}}>
|
|
251
|
+
<button
|
|
252
|
+
onClick={() => {setIndex(index==value.log.length-1?0:index + 1)}}
|
|
253
|
+
>
|
|
254
|
+
►
|
|
255
|
+
</button>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
);
|
|
260
|
+
};
|
|
261
|
+
export default BeaconRenderer
|
package/temp.html
ADDED
|
File without changes
|
package/testxiaomi.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
const crypto = require("crypto");
|
|
3
|
+
|
|
4
|
+
var mac = Buffer.from("A4:C1:38:BA:24:B2".replaceAll(" ",""), "hex")
|
|
5
|
+
var data=Buffer.from("48 59 32 28 a5 d9 cb 57 68 00 e9 5e 0a 00 00 9b 06 e9 7f".replaceAll(" ", ""),"hex")
|
|
6
|
+
var encryptionKey = Buffer.from("1828296d746bb1abefbf31de8c86fc1e","hex")
|
|
7
|
+
i = 5
|
|
8
|
+
const frameControl = data.readUInt16LE(0)
|
|
9
|
+
const isEncrypted = (frameControl >> 3) & 1
|
|
10
|
+
const encryptionVersion = frameControl >> 12
|
|
11
|
+
const mesh = (frameControl >> 7) & 1; // mesh device
|
|
12
|
+
const authMode = (frameControl >> 10) & 3;
|
|
13
|
+
const solicited = (frameControl >> 9) & 1;
|
|
14
|
+
const registered = (frameControl >> 8) & 1;
|
|
15
|
+
const objectInclude = (frameControl >> 6) & 1; // object/payload data present
|
|
16
|
+
const capabilityInclude = (frameControl >> 5) & 1; // capability byte present
|
|
17
|
+
const macInclude = (frameControl >> 4) & 1; // MAC address included in payload
|
|
18
|
+
const requestTiming = frameControl & 1;
|
|
19
|
+
|
|
20
|
+
if (capabilityInclude) i++
|
|
21
|
+
|
|
22
|
+
const encryptedPayload = data.subarray(i,-7);
|
|
23
|
+
const nonce = Buffer.concat([mac.reverse(), data.subarray(2, 5), data.subarray(-7,-4)]);
|
|
24
|
+
const cipher = crypto.createDecipheriv('aes-128-ccm', Buffer.from(encryptionKey,"hex"), nonce, { authTagLength: 4});
|
|
25
|
+
cipher.setAAD(Buffer.from('11', 'hex'), { plaintextLength: encryptedPayload.length });
|
|
26
|
+
cipher.setAuthTag(data.subarray(-4))
|
|
27
|
+
return cipher.update(encryptedPayload)
|
package/.vscode/settings.json
DELETED
|
Binary file
|
|
@@ -1,170 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"configuration": {
|
|
3
|
-
"discoveryTimeout": 30,
|
|
4
|
-
"discoveryInterval": 0,
|
|
5
|
-
"peripherals": [
|
|
6
|
-
{
|
|
7
|
-
"active": true,
|
|
8
|
-
"mac_address": "D4:50:46:39:38:C5",
|
|
9
|
-
"discoveryTimeout": 30,
|
|
10
|
-
"params": {
|
|
11
|
-
"name": "Victron Smart Shunt",
|
|
12
|
-
"encryptionKey": "8cce8529307cf9dd0c85611c4fef42d9"
|
|
13
|
-
},
|
|
14
|
-
"paths": {
|
|
15
|
-
"RSSI": "sensors.smartshunt.rssi",
|
|
16
|
-
"current": "electrical.battery.house.current",
|
|
17
|
-
"power": "electrical.battery.house.power",
|
|
18
|
-
"voltage": "electrical.battery.house.voltage",
|
|
19
|
-
"alarm": "electrical.battery.house.alarm",
|
|
20
|
-
"consumed": "electrical.battery.house.consumedAh",
|
|
21
|
-
"soc": "electrical.battery.house.soc",
|
|
22
|
-
"ttg": "electrical.battery.house.ttg",
|
|
23
|
-
"starterVoltage": "electrical.battery.starter.voltage",
|
|
24
|
-
"__state__": "sensors.smartshunt.state"
|
|
25
|
-
},
|
|
26
|
-
"gattParams": {
|
|
27
|
-
"useGATT": false
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"active": true,
|
|
32
|
-
"mac_address": "F9:B0:6E:63:BC:7E",
|
|
33
|
-
"discoveryTimeout": 30,
|
|
34
|
-
"params": {
|
|
35
|
-
"name": "Ruuvi sensor for cabin"
|
|
36
|
-
},
|
|
37
|
-
"paths": {
|
|
38
|
-
"RSSI": "sensors.ruuviBC7E.rssi",
|
|
39
|
-
"temp": "environment.cabin.temperature",
|
|
40
|
-
"humidity": "environment.cabin.humidity",
|
|
41
|
-
"pressure": "environment.cabin.pressure",
|
|
42
|
-
"battV": "sensors.ruuviBC7E.voltage",
|
|
43
|
-
"mc": "sensors.ruuviBC7E.movementCounter",
|
|
44
|
-
"battery": "sensors.temperature.reefer.batterystrength",
|
|
45
|
-
"__state__": "sensors.ruuviBC7E.state"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"active": true,
|
|
50
|
-
"mac_address": "49:22:05:17:2B:AE",
|
|
51
|
-
"discoveryTimeout": 120,
|
|
52
|
-
"params": {
|
|
53
|
-
"name": "Inkbird temperature sensor"
|
|
54
|
-
},
|
|
55
|
-
"paths": {
|
|
56
|
-
"RSSI": "sensors.inkbird-th2.rssi",
|
|
57
|
-
"temp": "environment.refrigerator.temperature",
|
|
58
|
-
"battery": "sensors.inkbird-th2.battery",
|
|
59
|
-
"__state__": "sensors.inkbird-th2.state"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"active": true,
|
|
64
|
-
"mac_address": "A4:C1:38:9F:F7:7E",
|
|
65
|
-
"discoveryTimeout": 300,
|
|
66
|
-
"params": {
|
|
67
|
-
"name": "ATC Temp/Humidity sensor for Deck",
|
|
68
|
-
"parser": "ATC-LE"
|
|
69
|
-
},
|
|
70
|
-
"paths": {
|
|
71
|
-
"RSSI": "sensors.ATC_9FF77E.rssi",
|
|
72
|
-
"temp": "environment.deck.temperature",
|
|
73
|
-
"humidity": "environment.deck.humidity",
|
|
74
|
-
"voltage": "sensors.ATC_9FF77E.voltage",
|
|
75
|
-
"batteryStrength": "sensors.ATC_9FF77E.batteryStrength",
|
|
76
|
-
"__state__": "sensors.ATC_9FF77E.state"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"active": true,
|
|
81
|
-
"mac_address": "D4:40:59:BE:2A:8C",
|
|
82
|
-
"discoveryTimeout": 30,
|
|
83
|
-
"params": {
|
|
84
|
-
"medium": "PROPANE",
|
|
85
|
-
"tankHeight": "304.8",
|
|
86
|
-
"name": "Galley propane level"
|
|
87
|
-
},
|
|
88
|
-
"paths": {
|
|
89
|
-
"RSSI": "sensors.mopeka-59be8c.rssi",
|
|
90
|
-
"battVolt": "sensors.mopeka-59be8c.battery.voltage",
|
|
91
|
-
"battStrength": "sensors.mopeka-59be8c.battery.strength",
|
|
92
|
-
"temp": "sensors.mopeka-59be8c.temperature",
|
|
93
|
-
"tankLevel": "sensors.mopeka-59be8c.tankLevel",
|
|
94
|
-
"readingQuality": "sensors.mopeka-59be8c.quality",
|
|
95
|
-
"__state__": "sensors.mopeka-59be8c.state"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"active": true,
|
|
100
|
-
"mac_address": "A4:C1:38:3E:7E:94",
|
|
101
|
-
"discoveryTimeout": 30,
|
|
102
|
-
"params": {
|
|
103
|
-
"encryptionKey": "3985f4ebc032f276cc316f1f6ecea085",
|
|
104
|
-
"__state__": "sensors.xiaomi.state"
|
|
105
|
-
},
|
|
106
|
-
"paths": {
|
|
107
|
-
"RSSI": "sensors.xiaomi.rssi",
|
|
108
|
-
"temp": "sensors.xiaomi.temp",
|
|
109
|
-
"humidity": "sensors.xiaomi.humidity",
|
|
110
|
-
"voltage": "sensors.xiaomi.voltage",
|
|
111
|
-
"__state__": "sensors.xiaomi.state"
|
|
112
|
-
},
|
|
113
|
-
"gattParams": {
|
|
114
|
-
"useGATT": false
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
"enabled": true,
|
|
120
|
-
"enableDebug": true
|
|
121
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"delay":100,
|
|
3
|
-
"data":
|
|
4
|
-
{
|
|
5
|
-
"0x96": [
|
|
6
|
-
"55 aa eb 90 10 e0 ac d0 00 00 28 a0 00 00 5a a0 00 00 42 e0 00 00 78 d0 00 00 50 00 00 00 79 d0 00 00 50 a0 00 00 7a d0 00 00 16 d0 00 00 ba 90 00 00 20 bf 20 00 30 00 00 00 3c 00 00 00 20 bf 20 00 2c 10 00 00 3c 00 00 00 1e 00 00 00 d0 70 00 00 bc 20 00 00 58 20 00 00 bc 20 00 00 58 20 00 00 9c ff ff ff 00 00 00 00 20 30 00 00 bc 20 00 00 40 00 00 00 10 00 00 00 10 00 00 00 10 00 00 00 f0 ba 40 00 50 ","00 00 00 5c d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 20 a1 70 00 90 18 f6 00 18 fe ff ff ff 1f a9 6f e0 00 dd e2 00 7b" ],
|
|
7
|
-
"0x97":[
|
|
8
|
-
"55 aa eb 90 00 3 c4 4a 4b 5f 42 32 41 38 53 32 30 50 00 0 00 0 00 00 00 31 31 2e 58 57 00 00 00 31 31 2e 32 36 31 00 00 68 96 c1 03 18 00 00 00 48 42 31 5f 42 34 00 00 00 00 00 00 00 00 00 00 31 32 33 34 00 00 00 00 00 00 00 00 00 00 00 00 32 33 30 38 31 34 00 00 33 30 32 32 38 34 34 32 36 37 00 30 30 30 30 00 49 6e 70 75 74 20 55 73 65 72 64 61 74 61 00 00 31 32 33 33 32 31 00 00 00 00",
|
|
9
|
-
"00 00 00 00 00 00 49 6e 70 75 74 20 55 73 65 72 64 61 74 61 00 00",
|
|
10
|
-
"7c f8 ff ff 1f 0d 00 00 00 00 00 00 90 0f 00 00 00 00 c0 d8 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
|
|
11
|
-
"00 00 00 00 00 00 00 00 00 fe 2f 00 00 00 00 00 00 00 00 00 00 bf"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|