Fork me on GitHub

pimatic-rflink by Riccardo Sirchia | github | npm

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"
    ]
    },
    

Plugin Config Options

RFLink config
OptionDescriptionDefault
driverOptions
object
Properties
serialport driver options
connectionTimeout
integer
Time in ms to wait for ready package or data to be received
10000
pingInterval
integer
Ping is requested at this interval when no other data hase been received
300000
reconnectInterval
integer
Time in ms between reconnect attempts, if undefined will increment gradually to maximum interval of 1 minute
debug
boolean
Log information for debugging, including received messages
true
rfdebug
boolean
Log raw RF packets
false
rfudebug
boolean
Log raw undecoded RF packets
false
qrfdebug
boolean
Log raw undecoded RF packets
false

Device Config Options

RFLink device config schemes

RFLinkSwitch

RFLinkSwitch config options
OptionDescriptionDefault
protocols
array of objects
The switch protocols to use.
[]
Elements
forceSend
boolean
Resend signal even if switch has the requested state already
true

RFLinkDimmer

RFLinkDimmer config options
OptionDescriptionDefault
protocols
array of objects
The dimmer protocols to use.
[]
Elements
forceSend
boolean
Resend signal even if switch has the requested state already
true

RFLinkContactSensor

RFLinkContactSensor config options
OptionDescriptionDefault
protocols
array of objects
The switch protocols to use.
[]
Elements
invert
boolean
Trigger on OFF signal. Useful for pir sensors that emit OFF instead of ON signal
false
autoReset
boolean
Reset the state after resetTime. Useful for pir sensors that emit a absent signal
true
resetTime
integer
Time after that the presence value is reset to absent.
10000

RFLinkPir

RFLinkPir config options
OptionDescriptionDefault
protocols
array of objects
The switch protocols to use.
[]
Elements
invert
boolean
Trigger on OFF signal. Useful for pir sensors that emit OFF instead of ON signal
false
autoReset
boolean
Reset the state after resetTime. Useful for pir sensors that don't emit a absent signal
true
resetTime
integer
Time after that the presence value is reset to absent.
10000

RFLinkData

RFLink config options
OptionDescriptionDefault
values
array of strings
[
  "temp",
  "hum"
]
protocols
array of objects
The data protocols to use.
[]
Elements
pimatic-rflink is written by Riccardo Sirchia