Détail du package

rfxcom

rfxcom864MIT2.6.2

Evented communication with RFXtrx433 ====================================

rfxcom, domotic, home automation, RFXtrx433

readme

Evented communication with RFXtrx433

To install

  npm install rfxcom

Depends on serialport ^11.0.0, date-format ^4.0.0, and queue ^6.0.0

Note

Functions Security1.switchOnLight() & Security1.switchOffLight() are now deprecated; use the replacements Security1.switchLightOn() & Security1.switchLightOff() instead. The function parameters are unchanged.

To Use

var rfxcom = require('rfxcom'),
    pg = require('pg').native,
    conString = "pg://user:password@localhost/user",
    client = new pg.Client(conString);

var rfxtrx = new rfxcom.RfxCom("/dev/ttyUSB0", {debug: true});

/*
 * This reports security updates from X10 security devices.
 */
rfxtrx.on("security1", function (evt) {
  if (evt.deviceStatus === rfxcom.security.MOTION) {
    console.log("Device %s %s detected motion.", evt.subtype, evt.id);
  } else if (evt.deviceStatus === rfxcom.security.NOMOTION) {
    console.log("Device %s %s reported motion stopped.", evt.subtype, evt.id);
  }
});

rfxtrx.on("elec2", function (evt) {
  // Requires a PostgreSQL table
  // CREATE TABLE energy (recorded_time timestamp DEFAULT NOW(),
  //                      device_id VARCHAR, current_watts FLOAT)
  client.query("INSERT INTO energy(device_id, current_watts) values($1, $2)",
                [evt.id, evt.currentWatts]);
});

rfxtrx.initialise(function () {
    console.log("Device initialised");
});

Sending Commands

Prototype transmitter objects are provided for almost all packet types (see the RFXCOM manual for details). The only packet types which can be transmitted but are not currently supported are:

  • 0x21, Security2
  • 0x61, ASYNC port configuration (RFXtrx433XL only)
  • 0x62, ASYNC port data (RFXtrx433XL only)
  • 0x72, FS20 (868 MHz devices only)

Each transmitter has a constructor, which must be called with an RfxCom object as the first parameter, the subtype as the second parameter, and an options object as an optional third parameter. The subtypes are exported from index.js and can be accessed as shown in the examples below. Each transmitter has functions to send the appropriate commands. File DeviceCommands.md contains a quick reference to all these transmitter objects.

Commands can only be sent when the RFXtrx433 is connected (see below). Commands are held in a queue, and will be sent as soon as the RFXtrx433 can accept them. No commands are sent (and no messages received) until the initial handshake with the RFXtrx433 is complete. If the RFXtrx433 is disconnected the queue is cleared, losing any command messages it may contain.

LightwaveRf

LightwaveRf devices use the Lighting5 transmitter:

var rfxcom = require('rfxcom');

var rfxtrx = new rfxcom.RfxCom("/dev/ttyUSB0", {debug: true}),
    lightwaverf = new rfxcom.Lighting5(rfxtrx, rfxcom.lighting5.LIGHTWAVERF);

rfxtrx.initialise(function () {
  console.log("Device initialised");
  lightwaverf.switchOn("0xF09AC8/1", {mood: 0x03});
  lightwaverf.switchOn("0xF09AC8/2", {level: 0x10});
});

It has been tested with both LightwaveRf lights, and the relay switch.

LightwaveRf lights get their identity from the remote used to pair, if you don't have a remote, or if you want to specify the address manually, you can pair the device by putting the device into pairing mode and turning on a chosen device id, for example lightwaverf.switchOn("0xFFFFFF/1").

The device ids don't have to be unique, but it's advisable.

HomeEasy (EU)

HomeEasy devices use the Lighting2 transmitter object. There are two types of HomeEasy: the ones marketed in UK are of type 'AC', while those in the Netherlands and elsewhere are of type 'HOMEEASY_EU'.

    var rfxtrx = new rfxcom.RfxCom("/dev/ttyUSB0", {debug: true}),
        lighting2 = new rfxcom.Lighting2(rfxtrx, rfxcom.lighting2.HOMEEASY_EU);

    lighting2.switchOn("0x19AC8AA/1");
    lighting2.switchOff("0x19AC8AA/1");

Rfy (Somfy) Blinds

There is a specialised Rfy transmitter object. This supports three subtypes: 'RFY', 'RFYEXT' and 'ASA', one of which must be supplied to the Rfy constructor. RFY support requires an RFXtrx433E, RFXtrx433XL, or RFX433. The 'RFY' and 'RFYEXT' subtypes can control venetian blinds, but the command modes differ between EU and US supplied blinds motors. The mode is specified by passing an options parameter to the constructor. The valid modes are 'EU' and 'US'. The default is 'EU'. You can change the mode subsequently by calling the setOption() method with a new options parameter.

    var rfxtrx = new rfxcom.RfxCom("/dev/ttyUSB0", {debug: true}),
           rfy = new rfxcom.Rfy(rfxtrx, rfxcom.rfy.RFY, {venetianBlindsMode: "US"});

    rfy.venetianOpen("0x10203/1");
    // All commands can take an optional callback
    rfy.down("0x10203/1", function(err, res, sequenceNumber) {
                if (!err) console.log('complete');
            });
    // The ID can be supplied as an array with address & unitcode elements (strings)
    rfy.doCommand(["0x10203", "1"], "down");
    // The eraseAll() and listRemotes() commands DO NOT take an ID parameter, all the others do
    rfy.listRemotes();
    rfy.eraseAll(callback);

Supported commands include standard operations such as up(), down(), and stop(), as well as the programming commands: program(), erase(), eraseAll(), and listRemotes(). All other commands can be accessed using the doCommand() method - see the Rfy entry in DeviceCommands.md for the complete list of available commands.

To 'pair' the RFX as a new remote control with a Somfy blind motor, press and hold 'program' on the existing Somfy remote controller until the blind responds with a 'jog' motion. Then send a program() command to the RFXtrx433E, with the ID parameter set to an address/unit code combination of your choice - this needs to be unique within the RFXtrx433E's list, but is otherwise arbitrary. Limits for the address are 0x1 to 0xFFFFF; limits for the unitcode are 0x0 to 0x4 for RFY subtype devices, 0x0 to 0xf for RFYEXT devices, and 0x1 to 0x5 for ASA devices.

To list all the remotes (of either RFY or ASA subtype) send a listRemotes() command; to erase a single entry from the list, send erase(ID) where ID is the address/unitcode of the entry to erase; or eraseAll() to clear the list.

Transmitter

The Transmitter class serves as a prototype for all the other transmitters. However, you can also create an instance of Transmitter and use it to send any arbitrary packet (e.g. one of an unsupported type). The packet will be correctly formatted as the RFXtrx expects; it will be queued to avoid overruning the RFXtrx; and the response of the RFXtrx to the packet will be emitted as a "response" event. When creating a Transmitter, use null as the subtype.

    var rfxtrx = new rfxcom.RfxCom("/dev/ttyUSB0", {debug: true}),
        transmitter = new rfxcom.Transmitter(rfxtrx, null);
    // Send a blinds1 packet (type 0x19) with subtype BLINDS_T6 (0x06) and appropriate data bytes
    transmitter.sendRaw(0x19, 0x06, [0x12, 0x34, 0x56, 0x73, 0x01, 0x00]);

RfxCom system events

System events are used to track conection & disconnection of, and communication with, the RFXtrx433 itself, and to provide low-level access to received data (including unsupported packet types)

"connecting"

Emitted when the RFXcom has successfully opened the serial port.

"connectfailed"

Emitted if the RFXcom was unable to open the serial port.

"ready"

Emitted when the RFXtrx433 is ready to accept data (after a delay to prevent it from entering the bootloader).

"disconnect"

Emitted if the RFXtrx433 has been disconnected from the USB port

"response"

Emitted when a command response message is received from the RFXtrx 433, or RfxCom times out waiting for a response. It passes three parameters:

  • A textual description of the response, as a string
  • The sequence number of the message responded to
  • A response code number:
    • 0: ACK - transmit OK
    • 1: ACK - transmit delayed
    • 2: NAK - transmitter did not lock onto frequency
    • 3: NAK - AC address not allowed
    • 4: Command unknown or not supported by this device
    • 5: Unknown RFY remote ID
    • 6: Timed out waiting for response

"rfyremoteslist"

Emitted in response to the Rfy command listRemotes() - this queries the RFXtrx433E for the list of currently stored simulated RFY remote controls. The list is given as an array, which may be of zero length, of objects describing each simulated remote control:

  • remoteNumber: index number of this entry in the RFXtrx433E's internal list
  • remoteType: "RFY" or "ASA",
  • deviceId: Address/unitcode as a hexadecimal string, e.g. "0x123/2"
  • idBytes: Address as an array of 3 bytes, e.g. [0x00, 0x01, 0x23]
  • unitCode: Unit code as a byte, e.g. 0x02

This event is emitted approximately 12s after the listRemotes() command is given, as the only way to detect the end of the list is to wait for the response timeout - the RFXtrx433E does not send an 'end of list' packet.

"status"

Emitted when a "status" message is received from the RFXtrx 433 - usually in reply to a receiver control command (packet type 0x00)

"receiverstarted"

Emitted when the RFXtrx responds to a 'start receiver' command (not applicable for old versions of the firmware)

"end"

Emitted when the serial port "ends".

"drain"

Emitted when the serial port emits a "drain" event.

"receive"

Emitted when any packet message is received from the RFXtrx 433, and passes the raw bytes that were received, as an array of bytes. This event is emitted before the received data event for the packet type (if one is defined).

RfxCom received data events - sensors

The events are mostly named from the message identifiers used in the RFXtrx documentation. Some (but not all) protocols must be enabled to be received. This can be done using RFXmngr.exe, or the enable() function of the rfxcom object. Each event passes an object whose properties contain the received sensor data, along with signal strength and battery level (if available).

"security1"

Emitted when an X10 or similar security device reports a status change.

"thermostat1"

Emitted when a message is received from a DigiMax thermostat.

"bbq1"

Emitted when a message is received from a Maverick ET-732 BBQ temperature sensor.

"temperaturerain1"

Emitted when a message is received from an Alecto temperature/rainfall weather sensor.

"temperature1"

Emitted when a message is received from a temperature sensor (inside/outside air temperature; pool water temperature).

"humidity1"

Emitted when data arrives from humidity sensing devices

"temperaturehumidity1"

Emitted when a message is received from Oregon Scientific and other temperature/humidity sensors.

"temphumbaro1"

Emitted when a message is received from an Oregon Scientific temperature/humidity/barometric pressure sensor.

"rain1"

Emitted when data arrives from rainfall sensing devices. See note below about the DeviceParameter API when using Davis rain sensors

"wind1"

Emitted when data arrives from wind speed & direction sensors

"uv1"

Emiied when data arrives from ultraviolet radiation sensors

"datetime"

Emitted when a time message arrives from a radio clock

"elec1" - "elec5"

Emitted when data is received from OWL or REVOLT electricity monitoring devices.

"weight1"

Emitted when a message is received from a weighing scale device.

"cartelectronic"

Emitted when data is received from a Cartelectronic smart-meter transmitter.

"rfxsensor"

Emitted when a message is received from an RFXCOM rfxsensor device.

"rfxmeter"

Emitted whan a message is received from an RFXCOM rfxmeter device.

"waterlevel"

Emitted when a message is received from a TS_FT002 water level (depth) sensor

"lightning"

Emitted when a message is received from an Ecowitt WH57 lightning sesnsor

"weather"

Emitted when a message is received from a remote multi-function weather station

"solar"

Emitted when a message is received from a remote insolation sensor

RfxCom received data events - remote controls

These events are emitted when data arrives from a 'remote control' device, which may be a pushbutton unit or a dedicated remote control device such as a PIR light switch. The events are named from the message identifiers used in the RFXtrx documentation. Most protocols must be enabled to be received. however not every protocol that can be transmitted can be received. Each event passes an object whose properties contain the received command, along with signal strength and battery level (if available).

"lighting1"

Emitted when a message is received from X10, ARC, Energenie or similar lighting remote control devices.

"lighting2"

Emitted when a message is received from AC/HomeEasy type remote control devices.

"lighting4"

Emitted when a message is received from devices using the PT2262 family chipset.

"lighting5"

Emitted when a message is received from LightwaveRF/Siemens type remote control devices.

"lighting6"

Emitted when a message is received from Blyss lighting remote control devices.

"chime1"

Emitted when data arrives from Byron or similar doorbell pushbutton

"activlink"

Emitted when a message is received from a doorbell pushbutton (or PIR sensor) using the Honeywell ActivLink 868MHz protocol

"blinds1"

Emitted when a message arrives from a compatible type 1 blinds remote controller (only a few subtypes can be received)

"blinds2"

Emitted when a message arrives from a type 2 blinds remote controller (BREL/DOOYA)

"fan"

Emitted when a message arrives from a supported type of fan remote control (not Hunter fans - see below)

"hunterfan"

Emitted when a message arrives from a Hunter fan remote control

"funkbus"

Emitted when a message arrives from a FunkBus 'Gira' or 'Insta' remote control

"edisio"

Emitted when a message arrives from an Edisio system remote control or wall switch

"camera1"

Emitted when a message is received from an X10 Ninja Robocam camera mount remote control.

"remote"

Emitted when a message is received from ATI or X10 universal remote controls (old type RFXtrx433 only).

"thermostat3"

Emitted when a message is received from a Mertik-Maxitrol thermostat remote control.

Connecting and disconnecting

The function rfxtrx.initialise() will attempt to connect to the RFXtrx433 hardware. If this succeeds, a 'connecting' event is emitted, followed about 5.5 seconds later by a 'ready' event. Finally (for recent device firmware versions) a 'receiverstarted' event is emitted. If the device is not present (wrong device path, or device not plugged in) a 'connectfailed' event is emitted. If the the hardware is subsequently unplugged, a 'disconnect' event is emitted (this can also happen before either the 'connecting' or 'ready' events are emitted).

If either the connection fails or the RFXtrx433 is unplugged, a subsequent call to initialise() will attempt to reconnect. Your 'disconnect'/'connectfailed' handler may make repeated attempts to reconnect, but must allow an interval of at least rfxcom.initialiseWaitTime milliseconds between each attempt. While disconnected, any data sent by a call to a command object is silently discarded, however the various received data event handlers are preserved.

Note:

Some variants of Linux will create a differently-named device file if the RFtxr433 is disconnected and then reconnected, even if it is reconnected to the same USB port. For example, /dev/ttyUSB0 may become /dev/ttyUSB1. While a suitably-crafted UDEV rule can prevent this happening, it may be easier to use the equivalent alias device file in /dev/serial/by-id/ when creating the RfxCom object. This should look something like /dev/serial/by-id/usb_RFXCOM_RFXtrx433_12345678-if00-port0.

DeviceParameter API

The DeviceParameter API allows one or more arbitrary {name, value} parameter pairs to be associated with the messages received from a specific device, specified by packet type, subtype, and id (or address). These parameters can then be retrieved by received data packet handlers as required.

To set a parameter on the RfxCom object rfxtrx:

rfxtrx.setDeviceParameter(packetName, subtypeName, id, parameter, value)

To retrieve a parameter:

rfxtrx.getDeviceParameter(packetType, subtype, id, parameter, defaultValue)

The setter uses packet & subtype names, but the getter uses numbers, as these are more easily accessed by the packet data handlers. The defaultValue is returned if no matching parameter has been set.

The Davis rainfall sensors (subtype RAIN8) may be fitted with either Metric or US Customary cartridges, which have different volumes. The message received from the sensor does not indicate which cartridge is fitted. To obtain correctly calibrated data, the RfxCom object has to be told which is fitted, for each Davis sensor it receives.

To set up for a US Customary cartridge (0.01 inch):

rfxtrx.setDeviceParameter("rain1", "RAIN8", 0xb600, "cartridgeVolume", 0.01);

To set up for a metric cartridge (0.2mm):

rfxtrx.setDeviceParameter("rain1", "RAIN8", "0xb600", "cartridgeVolume", 0.2);

(The default setting for RAIN8 sensors is the metric cartridge)

At the time of writing, no other devices make use of this API.

Utility scripts

There are two scripts to help you get started talking to your RFXtrx433, and to set its configuration:

  • find-rfxcom - searches all serial ports for RFXCOM devices, and prints information about each device it finds.
  • set-protocols - changes and optionally saves to non-volatile memory the set of protocols that a device will receive and decode.

These scripts must be run from the directory containing the package.json file, normally node_modules/rfxcom, unless the package has been installed globally.

npm run find-rfxcom will print status information for each device as shown:

Scanning for RFXCOM devices...
Devices found at:
  /dev/tty.usbserial-A1R1A6A
    433.92MHz transceiver hardware version 1.3, firmware version 1017 Ext
    Enabled protocols:  AC,LIGHTING4,OREGON
    Disabled protocols: ARC,ATI,BLINDST0,BLINDST1,BLYSS,BYRONSX,FINEOFFSET,FS20,HIDEKI,HOMECONFORT,HOMEEASY,IMAGINTRONIX,KEELOQ,LACROSSE,LIGHTWAVERF,MEIANTECH,MERTIK,PROGUARD,RSL,RUBICSON,UNDECODED,VISONIC,X10

You will need to pass the device port - in this case /dev/tty.usbserial-A1R1A6A - to rfxcom to control the device. set-protocols also uses the device port to locate the RFXCOM device to program.

npm run set-protocols -- --list device_port will print the same information as find-rfxcom, for the specified device.

npm run set-protocols -- --save device_port will save the current set of enabled protocols to non-volatile memory (use with caution, as the number of write cycles is limited)

npm run set-protocols -- [--enable protocol_list] [--disable protocol_list] [--save] device_port will enable the protocols in the list of protocols to enable, and disable the the protocols in the list of protocols to disable. If the --save switch is present, the new protocol settings will be saved to non-volatile memory immediately.

A protocol list is a comma-separated list of protocol names, in the format returned by find-rfxcom shown above. Protocols which are currently enabled, and which do not appear in the list of protocols to disable, will remain enabled. If a protocol appears in both the --enable and --disable lists, its current status will remain unchanged.

changelog

Version 2.6.1

Bug fix: correct the format of transmitted ActivLink packet Add range checking to ActivLink.chime()

Version 2.6.0

Support for firmware versions up to 1048 & 2022

  • Add new packet types & subtypes to version 9.39 SDK
  • Add support for new RFX433 and RFX868 devices
  • Each receiver type now has its own list of enabled receive protocols
  • Add ActivLink packet type from SDK 9.40
  • Major improvements to generating the command (string) property of receive events: this now matches the SDK text for all subtypes

Various minor bug fixes. Update serialport to 11.0.1

Version 2.5.0

Support for RFX firmware 1045 (with longer chime1 packet)

  • Add support for raw data transmission
  • Add unit code to BLINDS_T11
  • Add BLINDS_T19 & BLINDS_T20
  • Add Thermostat5 transmitter
  • Add Blinds2 (bidirectional blinds) transmitter
  • Add support for waterlevel packet

Various minor bug fixes. Update test framework to Jasmine 4.4.x

Version 2.4.0

Add Blinds1.intermediatePosition() function. Silence warnings about missing AsyncConfig & AsyncData classes from NodeJS

Version 2.3.1

Now use call-throughs rather than synonyms to implement switchOnLight() & switchOffLight(), as a work-around for a NodeJS v10 compiler bug. Revert to serialport ^8.0.8

Version 2.3.0

Add functions switchLightOn() & switchLightOff() to security1, to replace the now deprecated switchOnLight() & switchOffLight()

Version 2.2.0

Support for RFX firmware 1043

  • Add support BLINDS_T17 (Gaposa) & BLINDS_T18 (Cherubini)
  • Add Lucci Air DC speed control command (speed 1 to 6)
  • Add Mertik G6R-H4TD (DRU) run-up and run-down commands

Fix various bugs in handling BLINDS addresses (ID & unitCode)

Version 2.1.0

Support for RFX firmware 1040

  • Add support for newly added subtypes in multiple packet types
  • Add support for Edisio & HunterFan packet types
  • Add support for Weather & Solar packet types
  • Add fan receive handler

Update to latest Serialport (>8.0.0) and Queue (>6.0.0). Debug log timestamps now include milliseconds. Correct the errors in the code samples in Readme.MD

Bug fixes:

  • Correct the handling of RSSI in weight packet receive handler
  • Correct the allowable address ranges in several places
  • Fix handling of device type number in FunkBus receive handler

Version 2.0.2

Change the way security1 device addreses are processed in the receive handler, to ensure they are compatible with the transmitter.

Version 2.0.1

Workarounds for newly-introduced serialport bugs

Version 2.0.0

Full support for Pro 1 & Pro 2 firmware

  • Add support for many additional packet subtypes
  • Add support for Funkbus packet type (TX & RX)
  • Enable changing receiver frequency, if supported by the firmware
  • Add definitions for new hardware types & versions
  • Status event includes received noise level, where available
  • Support new LIVOLO_APPLIANCE packet format if firmware version > 1025 (room number is ignored when using the new format)
  • Add DeviceParameter API, to support Davis rain gauges (subtype RAIN8)

Change to use Serialport 7.1.1 & Queue 5.0.0

Breaking change:

  • The cartelectronic packet type event data format has been totally changed, based on information from the manufacturer.

Version 1.4.1

Add initial support for Pro 1 & Pro 2 firmware

Version 1.4.0

Change to use Serialport version 6 (changes to underlying API)

Version 1.3.0

  • Add timestamp to debug messages.
  • Thermostat1 receive events now provide both numeric & string representations of mode and status. Thermostat1 transmitter now accepts both numbers & strings.

Version 1.2.0

Added deviceNames object & additional type parmeter to received packet events - enables access to the device name (as found in the SDK) for every subtype of every received packet.

Version 1.1.0

Added support for an optional room number to increaseLevel() & decreaseLevel() for all lighting transmitters supporting these functions. Only the LIVOLO_APPLIANCE Lighting5 subtype makes any use of it, and will throw an error if it is missing.

Version 1.0.0

First production release

Added (almost) complete transmit & receive support for all packet types supported by 433 MHz hardware and firmware version 1020, with the exception of:

  • 0x1C, Edisio (868 MHz)
  • 0x21, Security2
  • 0x53, Barometric sensors (currently unused)
  • 0x5E, Gas sensors (currently unused)
  • 0x5F, Water sensors (currently unused)
  • 0x72, FS20 (868 MHz)
  • 0x7F, Raw transmit

Other enhancements:

  • Added extra subtypes and commands to lighting5 (though there are still one or two missing)
  • Added a sendRaw() method to Transmitter to allow any packet type to be sent (including the 0x7F raw packet, if required)
  • Improved unit tests (unit tests are no longer installed by npm)
  • For firmware versions that support it, the RF transmitter power is reported in the status event
  • Transmitters for all packet types now accept an (optional) options parameter. Currently only Lighting4 and Rfy make use of it
  • Added a "receiverstarted" event
  • Added scripts to find all RFXCOM devices attached to a computer (find-rfxcom), and to manage the enabled receive protocols (set-protocols)

Breaking changes:

  • Curtain1 constructor now requires a subtype
  • Lighting5 switchOn() method no longer accepts a parameter to set moods & levels - use setMood() & setLevel() instead
  • Rfy venetian blinds commands are no longer duplicated in EU & US variants, e.g. venetianOpenEU() & venetianOpenUS are relaced by venetianOpen(). An options parameter to the Rfy constructor sets which variant is used, e.g. {venetianBlindsMode: "EU"}
  • Receive data events now correspond strictly one-to-one with received packet types. Previously, some of the 'sensor' events corresponded with subtypes. For example, the thb1 and thb2 events from the two different subtypes of the temperature, humidity and barometric pressure sensing devices (packet type 0x54) are replaced by a single temphumbaro event.
  • Adopted the use of camelCase for all event properties, so that unitcode is now unitCode, and housecode is now houseCode

Version 0.16.0

  • Added support for AOKE relay (lighting5)

Version 0.15.0

  • Added support for Maverick ET-732 BBQ thermometer

Version 0.14.0

  • Added support for Rfy devices (Somfy blinds)

Version 0.13.0

  • Added support for Blinds1 devices. Tested only for T0/Rollertrol.

Version 0.12.0

  • Added a command message transmit queue to avoid buffer overruns in the RFXtrx433

Version 0.11.1

  • Improve decoding of status packets from firmware versions 1001 and above
  • Send 'start receiver' command when connecting, and check the response

Version 0.11.0

  • Added transmission of chime1 type packets

Version 0.10.1

  • Fixed a bug in the received message parsing which could cause messages to be lost, and/or throw an unhandled exception.

Version 0.10.0

  • Added support for additional weather sensors and energy monitoring devices
  • Added support for Byron SX doorbells (receive-only) BREAKING CHANGES:
  • In elec2 and elec3 events, property name "currentWatts" is replaced by "power" (the value is unchanged)
  • In elec2 and elec3 events, property name "totalWatts" is replaced by "energy" and the value is no longer rounded

Version 0.9.0

  • Added support for Lighting3, Lighting4, and Lighting6 device packet types
  • Added error-checking for supported commands, address codes, and parameter values

Version 0.8.0

  • Handle dynamic removal/replacement of the RFXtrx. Added new events 'connecting', 'disconnected', and 'connectfailed'. Added new properties .connected, .initialising and .initialiseWaitTime
  • Bump to serialport 2.x

Version 0.7.9

  • Emit end event when serial port 'ends' (device is removed from USB port) contributed by @freakent.
  • Bump to serialport ~1.4.

Version 0.7.7

  • Change tbX messages to tbhX messages and fix typo in battery level determination.

Version 0.7.6

  • Handle the rfxmeter and tempbaro messages.

Version 0.7.5

  • Implement support for rfxmeter and tempbaro sensors from bwired-nl.

Version 0.7.4

  • Support for serialport 1.3.0 which requires a callback for flush this fixes bigkevmcd/node-rfxcom#26.

Version 0.7.3

  • Fix bug in emitting "received" events.

Version 0.7.2

  • Added additional event "received" with the raw data that was received from the device contributed by @iangregory.
  • Added save() method to the rfxcom object, allowing saving the configured protocols to the NVRAM of the rfxtrx433, the SDK cautions against using this too often as there is a limited number of writes (10K).

Version 0.7.1

  • Add additional protocol defines for use when configuring the device, contributed by @njh.

Version 0.7.0

  • Changes the format of the lighting2 event, the subtype will correspond to the values in rfxcom.lighting2.

Version 0.6.1

  • Send a "level" command when we are trying to set the level.

Version 0.6.0

  • Bumped serialport version to be compatible with Node 0.10.x.

Version 0.5.1

  • Removed dependency on underscore.js.

Version 0.5.0

  • Split the various classes out into separate files.
  • Split the tests appropriately.
  • Rename the LightwaveRf prototype to Lighting5. backwards incompatible
  • Made the new Lighting5 prototype accept different types.
  • Removed RfxCom.lightOn and RfxCom.lightOff because these were LightwaveRf specific.

Version 0.4.4

  • Added support for lighting1 received messages contributed by stianeikeland.

Version 0.4.3

  • Added Lighting2 class, which can control devices controlled by the lighting2 message.

Version 0.4.2

  • Fix the tamper detection for security1 devices to report status and tamper separately.

Version 0.4.1

  • Added support for lighting2 received messages.
  • Renamed signalStrength to rssi in keeping with the RFX TRX SDK document.

Version 0.4.0

  • Fixed initialise to also run .open() which means you can bootstrap the device with one line.

Version 0.3.1

  • Added .initialise to the RfxCom prototype, which handles bootstrapping the device.

Version 0.3.0

  • Change the LightwaveRf device identifier format to 0x010203/1 which means that it is possible to define device as strings e.g. FRONT_LIGHT = "0x010203/1".

Version 0.2.3

  • Add support for TH1-9 temperature and humidity sensors.

Version 0.2.2

  • Add support for TEMP1-9 type sensors.

Version 0.2.1

  • Fix bug in handler lookup and improve testing of data handler.

Version 0.2.0

  • Update security1Handler event to make the types constants, and better split the battery-level and signal strength elements.

Version 0.1.1

  • Updated the Readme.md to illustrate more use.
  • Renamed the current_watts and total_watts to currentWatts and totalWatts.

Version 0.1.0

  • API CHANGE emitted events are now a JavaScript object.
  • New constants for security status messages e.g. security.MOTION.
  • Refactored sending messages to the serialport through a sendMessage - still need to update the LightwaveRf prototype.
  • Improved the test coverage.

Version 0.0.3

  • Added LightwaveRf prototype for specialisation of LightwaveRf control.
    • This adds support for dimming and moodlighting control with LightwaveRF.
  • Tidied up JavaScript formatting.
  • Added start of rfxcom.security constants.
  • Support for configuring the interface protocols.