Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pimatic-rflink with all npm packages installed. Try it out:

require("pimatic/package.json"); // pimatic is a peer dependency. var pimaticRflink = require("pimatic-rflink")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pimatic-rflink v0.7.2

pimatic plugin to use various 433 MHz devices, sensors and more with an RFLink gateway.

pimatic-rflink

Plugin for using various 433 Mhz devices and sensors with a connected RFLink Gateway.

This device supports many 433 MHz devices but this plugin is currently limited to only supports the following devices:

  • Switches
  • Dimmers
  • PIR sensors
  • Contact sensors
  • Generic data sensors for temperature, wind, barometric pressure and many more

Support for other devices may be added in the future.

Plugin configuration

You can load the plugin by editing your config.json to include:

{
  "plugin": "rflink",
  "driverOptions": {
    "serialDevice": "/dev/tty.usbmodem641"
  }
}

in the plugins section. For all configuration options see rflink-config-schema

Devices

Devices must be added manually to the device section of your pimatic config.

A list with all supported protocol names can be found here. For all configuration options see device-config-schema. To determine the device name, id and switch configuration, make sure the debug option on the driver is on (this is the default) and press the remote control button that controls the device. The debug logging will then show a line conting for example:

20;01;NewKaku;ID=005ef68a;SWITCH=1;CMD=ON;

The contents of this line should then be interpreted in protocol configuration options as follows

20;01;<name>;ID=<id>;SWITCH=<switch>;CMD=ON;

See below for complete device configuration examples

Switch example:

{
  "id": "rfswitch",
  "name": "RFSwitch",
  "class": "RFLinkSwitch",
  "protocols": [{
    "name": "NewKaku",
    "id": "005ef68a",
    "switch": "1"
  }]
}

A switch (and other devices) can be controlled or send to outlets with multiple protocols. Just add more protocols to the protocols array. You can also set if a protocol is used for sending or receiving. Default is true for both.

Multi protocol switch example:

{
  "id": "rfswitch",
  "name": "RFSwitch",
  "class": "RFLinkSwitch",
  "protocols": [
    {
      "name": "NewKaku",
      "id": "005ef68a",
      "switch": "1"
    },
    {
      "name": "Kaku",
      "id": "4b",
      "switch": "1",
      "send": false
    }
  ]
}

Dimmer device example:

{
  "id": "kitchenspots",
  "name": "Kitchen spots",
  "class": "RFLinkDimmer",
  "protocols": [{
    "name": "NewKaku",
    "id": "005ef68a",
    "switch": "1"
  }]
}

ContactSensor example:

{
  "id": "window",
  "name": "Window",
  "class": "RFLinkContactSensor",
  "autoReset": false,
  "invert": false,
  "protocols": [
    {
      "name": "NewKaku",
      "id": "00d199ee",
      "switch": "1"
    }
  ]
},

PIR sensor example:

{
  "id": "movement",
  "name": "Movement",
  "class": "RFLinkPir",
  "autoReset": false,
  "invert": false,
  "protocols": [
    {
      "name": "NewKaku",
      "id": "00d189ee",
      "switch": "1"
    }
  ]
},

Generic data sensor example:

Values represent the (lowercase) attributes as sent by the RFLink device. Currently, the following values are supported:

  • temp
  • hum
  • baro
  • hstatus
  • bforecast
  • uv
  • lux
  • bat
  • rain
  • rainrate
  • raintot
  • winsp
  • awinsp
  • wings
  • windir
  • winchil
  • wintmp
  • co2
  • sound
  • kwatt
  • watt
  • current
  • current2
  • current3
  • dist
  • meter
  • volt
{ 
  "id": "TemperatuurWoonkamer",
  "name": "Temperatuur Woonkamer", 
  "class": "RFLinkData", 
  "protocols": [
    {
      "name": "Xiron",
      "id": "C901" 
    }
  ],
  "values": [
    "temp",
    "hum"
  ]
},

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free