A Node-RED node that uses adeunis-codecs library to decode hexadecimal payloads generated by adeunis devices
Either use the Manage Palette option in the Node-RED Editor menu, or run the following command in your Node-RED user directory - typically ~/.node-red
npm i @adeunis/node-red-contrib-adeunis-codecs
A simple node that decodes payload from adeunis devices into a human-readable JSON output
Node input content:
-
productType
:-
analog
=> 'Analog device' -
analog2
=> 'Analog v2 device' -
breath
=> 'Breath device' -
comfort
=> 'Comfort device' -
comfort2
=> 'Comfort 2 device' -
comfortSerenity
=> 'Comfort Serenity device' -
drycontacts
=> 'Dry Contacts device' -
drycontacts2
=> 'Dry Contacts 2 device' -
deltap
=> 'Delta P device' -
modbus
=> 'Modbus device' -
motion
=> 'Motion device' -
pulse
=> 'Pulse device' -
pulse3
=> 'Pulse 3 device' -
pulse4
=> 'Pulse 4 device' -
pulse4nbiot
=> 'Pulse 4 NB-IoT device' -
repeater
=> 'Repeater device' -
temp
=> 'Temp device' -
temp3
=> 'Temp 3 device' -
temp4
=> 'Temp 4 device' -
ticCbeLinkyMono
=> 'TIC CBE/LINKY MONO device' -
ticCbeLinkyTri
=> 'TIC CBE/LINKY TRI device' -
ticPmePmi
=> 'TIC PME-PMI device'
-
-
payload
: hexadecimal string
Typical content that could be written in a node function:
msg.productType="analog";
msg.payload = "42500110000002100000";
return msg;
Node output content:
-
productType
: product type -
raw
: initial payload -
msg.payload
: decoded payload
Output example:
{
"_msgid": "2d511469.028d8c",
"topic": "",
"payload": {
"type": "0x42 Analog data",
"status": {
"frameCounter": 2,
"hardwareError": false,
"lowBattery": false,
"configurationDone": false,
"alarmChannelA": false,
"alarmChannelB": true
},
"channels": [{
"name": "channel A",
"unit": "V",
"value": 1.049
}, {
"name": "channel B",
"unit": "mA",
"value": 10.486
}]
},
"productType": "analog",
"raw": "42500110000002100000"
}
Please check changelog page.