@mschaeffler/node-red-bthome 1.4.0 → 1.4.3
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/bthome.js +13 -12
- package/package.json +1 -1
package/bthome.js
CHANGED
|
@@ -183,23 +183,23 @@ module.exports = function(RED) {
|
|
|
183
183
|
}
|
|
184
184
|
break;
|
|
185
185
|
case 0x04:
|
|
186
|
-
setData( "pressure", rawdata.getUInt24()
|
|
186
|
+
setData( "pressure", rawdata.getUInt24() / 100 );
|
|
187
187
|
break;
|
|
188
188
|
case 0x05:
|
|
189
|
-
setData( "lux", rawdata.getUInt24()
|
|
189
|
+
setData( "lux", rawdata.getUInt24() / 100 );
|
|
190
190
|
break;
|
|
191
191
|
case 0x08:
|
|
192
|
-
setData( "dewpoint", rawdata.getInt16()
|
|
192
|
+
setData( "dewpoint", rawdata.getInt16() /100 );
|
|
193
193
|
break;
|
|
194
194
|
case 0x0C:
|
|
195
195
|
if( node.batteryState )
|
|
196
196
|
{
|
|
197
|
-
setData( "voltage", rawdata.getUInt16()
|
|
197
|
+
setData( "voltage", rawdata.getUInt16() / 1000 );
|
|
198
198
|
delete item.voltage;
|
|
199
199
|
}
|
|
200
200
|
else
|
|
201
201
|
{
|
|
202
|
-
item.voltage = rawdata.getUInt16()
|
|
202
|
+
item.voltage = rawdata.getUInt16() / 1000;
|
|
203
203
|
delete item.data?.voltage;
|
|
204
204
|
}
|
|
205
205
|
break;
|
|
@@ -236,7 +236,7 @@ module.exports = function(RED) {
|
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
238
|
case 0x3F:
|
|
239
|
-
setData( "tilt", rawdata.getInt16()
|
|
239
|
+
setData( "tilt", rawdata.getInt16() / 10 );
|
|
240
240
|
break;
|
|
241
241
|
case 0x40:
|
|
242
242
|
{
|
|
@@ -245,22 +245,22 @@ module.exports = function(RED) {
|
|
|
245
245
|
break;
|
|
246
246
|
}
|
|
247
247
|
case 0x44:
|
|
248
|
-
setData( "wind", rawdata.getUInt16()
|
|
248
|
+
setData( "wind", rawdata.getUInt16() / 100 );
|
|
249
249
|
break;
|
|
250
250
|
case 0x45:
|
|
251
|
-
setData( "temperature", rawdata.getInt16()
|
|
251
|
+
setData( "temperature", rawdata.getInt16() / 10 );
|
|
252
252
|
break;
|
|
253
253
|
case 0x46:
|
|
254
|
-
setData( "uv", rawdata.getUInt8()
|
|
254
|
+
setData( "uv", rawdata.getUInt8() / 10 );
|
|
255
255
|
break;
|
|
256
256
|
case 0x59:
|
|
257
257
|
setData( "count", rawdata.getInt8() );
|
|
258
258
|
break;
|
|
259
259
|
case 0x5E:
|
|
260
|
-
setData( "direction", rawdata.getUInt16()
|
|
260
|
+
setData( "direction", rawdata.getUInt16() / 100 );
|
|
261
261
|
break;
|
|
262
262
|
case 0x5F:
|
|
263
|
-
setData( "precipitation", rawdata.getUInt16()
|
|
263
|
+
setData( "precipitation", rawdata.getUInt16() / 10 );
|
|
264
264
|
break;
|
|
265
265
|
case 0x60:
|
|
266
266
|
setData( "channel", rawdata.getUInt8() + 1 );
|
|
@@ -297,7 +297,8 @@ module.exports = function(RED) {
|
|
|
297
297
|
|
|
298
298
|
function checkPid()
|
|
299
299
|
{
|
|
300
|
-
if( pid < item.pid &&
|
|
300
|
+
if( pid < item.pid &&
|
|
301
|
+
!( pid <= 16 || ( pid <= 50 && item.pid >= 200 ) ) )
|
|
301
302
|
{
|
|
302
303
|
// veraltete Nachricht und nicht reboot
|
|
303
304
|
node.statistics.old++;
|