@adeunis/node-red-contrib-adeunis-codecs

Node-RED node for adeunis-codecs v1.5.x library

Usage no npm install needed!

<script type="module">
  import adeunisNodeRedContribAdeunisCodecs from 'https://cdn.skypack.dev/@adeunis/node-red-contrib-adeunis-codecs';
</script>

README

node-red-contrib-adeunis-codecs

A Node-RED node that uses adeunis-codecs library to decode hexadecimal payloads generated by adeunis devices

Install

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

Usage

A simple node that decodes payload from adeunis devices into a human-readable JSON output

Node input content:

  • productType:
    • analog => 'Analog device'
    • comfort => 'Comfort device'
    • comfort2 => 'Comfort 2 device'
    • drycontacts => 'Dry Contacts device'
    • drycontacts2 => 'Dry Contacts 2 device'
    • deltap => 'Delta P 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"
}

Changelog

Please check changelog page.