JSPM

  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q60474F
  • License MIT

RTL_433 based sensor for Homebridge

Package Exports

  • homebridge-rtl
  • homebridge-rtl/src/sensor.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (homebridge-rtl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

homebridge-rtl

NPM Downloads

Homebridge plugin to display information from 433 Mhz sensors, like the Skylink HA-434TL motion sensor or the AcuRite Digital Wireless Fridge and Freezer Thermometer temperature sensor. This plugin uses the RTL_433 package to listen to the sensor in-conjunction with a sdr device to receive the signals from the sensor. In my setup I use this RTL_SDR to receive the radio signal from the sensor.

Supported Sensors

For sensors, I'm using these

Contributor added sensors:

Features

  • Supported sensors include Motion, Contact, Temperature and Humidity
  • Also shows "not responding" if the sensor stops sending data
  • For temperature and humidity sensors, has ability to create alarms if the current value exceeds a alarm value

I have tested this on both a Mac and a RPI3

Installation

  1. Install Homebridge using sudo npm install -g homebridge
  2. Install this plugin sudo npm install -g homebridge-rtl
  3. Install RTL_433 following the instructions here
  4. Configure homebridge

Configuration

  • platform: "rtl_433"
  • rtl433Path: by default this is "/usr/local/bin/"; for windows, the directory rtl433 exe is located. End this with a .
  • rtl433Bin: by default this is "rtl_433"; for windows, this is the exe.
  • killCommand: by default this is "pkill"; for windows, this is taskkill /IM, however, the service may not have sufficient privileges to do this. " " for no command.
  • name: "Front Porch" - Name of device for display in the Home App
  • id: id number of device - To find the ID of your device, run homebridge in DEBUG mode, and it will log the message received from all rtl_433 devices. See below for examples
  • type: Type of sensor device. Supported sensors are motion, temperature, humidity, and contact
  • alarm: Optional, Create a fake contact sensor called name + Alarm. Value is temperature in Celsius that if exceeded will trigger contact sensor.
  • humidity: Optional, For devices of type temperature that emits also humidity set to true and humidity will shows in HomeKit/Eve app in the sensor.

Example configuration:

"platforms": [{
    "platform": "rtl_433",
    "devices": [
      {
      "id": "1e3e8",
      "name": "Front Porch",
      "type": "motion"
      },
      {
      "id": "92",
      "name": "Outside temperature",
      "type": "temperature"
      },
      {
      "id": "834551",
      "name": "Front Door Sensor",
      "type": "contact"
      }
    ]
  }]

Example windows configuration:

"platforms": [{
    "platform": "rtl_433",
    "rtl433Path": "c:\\temp\\",
    "rtp433Bin": "rtl_433_64bit_static.exe",
    "killCommand": " ",
    "devices": [
      {
      "id": "1e3e8",
      "name": "Front Porch",
      "type": "motion"
      },
      {
      "id": "92",
      "name": "Outside temperature",
      "type": "temperature"
      },
      {
      "id": "834551",
      "name": "Front Door Sensor",
      "type": "contact"
      }
    ]
  }]

Sample log file entries from homebridge to determine sensor ID

  • Motion sensor log entries
Message {"time" : "2019-04-03 09:43:05", "model" : "Skylink HA-434TL motion sensor", "motion" : "false", "id" : "1e3e8", "raw" : "5e3e8"}

id is 1e3e8

Message {"time" : "2022-03-23 20:11:54.643434", "protocol" : 68, "model" : "Kerui-Security", "id" : 840811, "cmd" : 10, "motion" : 1, "state" : "motion" }

id is 840811
  • Temperature sensor log entries
[rtl_433] FYI: Message from unknown device ID 21650
[rtl_433] Message {"time" : "2021-02-02 10:22:30", "model" : "Acurite 986 Sensor", "id" : 21650, "channel" : "1R", "temperature_C" : 20.556, "battery" : "OK", "status" : 0}
[rtl_433] FYI: Message from unknown device ID 21650
[rtl_433] Message {"time" : "2021-02-02 10:22:30", "model" : "Acurite 986 Sensor", "id" : 21650, "channel" : "1R", "temperature_C" : 20.556, "battery" : "OK", "status" : 0}

id is 21650

If the device does not transmit an ID value, will default to channel

Message {"time" : "2020-03-14 11:34:22", "model" : "Philips outdoor temperature sensor", "channel" : 1, "temperature_C" : 1.500, "battery" : "LOW"}

id is the channel 1
Message {"time" : "2020-03-14 14:40:41", "model" : "Acurite tower sensor", "id" : 15424, "sensor_id" : 15424, "channel" : "A", "temperature_C" : 3.600, "humidity" : 60, "battery_low" : 0}

id is 15424
Message {"time" : "2022-03-23 21:28:05.748872", "protocol" : 38, "model" : "Generic-Temperature", "id" : 92, "battery_ok" : 1, "temperature_C" : 6.100 }

id is 92 the channel 1 for tiny AVIDSEN Weather station
Message {"time" : "2022-03-29 21:32:16.707696", "protocol" : 19, "model" : "Nexus-TH", "id" : 36, "channel" : 1, "battery_ok" : 1, "temperature_C" : 11.800, "humidity" : 77 }
Message {"time" : "2022-03-29 21:32:35.938421", "protocol" : 19, "model" : "Nexus-TH", "id" : 31, "channel" : 2, "battery_ok" : 1, "temperature_C" : 12.800, "humidity" : 66 }
Message {"time" : "2022-03-29 21:32:47.165018", "protocol" : 19, "model" : "Nexus-TH", "id" : 198, "channel" : 3, "battery_ok" : 1, "temperature_C" : 20.900, "humidity" : 45 }

id are 36, 31 and 198 (Bresser Temeo Hygro Quadro)
  • Contact Sensor log entries (Door or Window Open/Close)
Message {"time" : "2022-03-23 20:12:15.579712", "protocol" : 68, "model" : "Kerui-Security", "id" : 843552, "cmd" : 14, "opened" : 1, "state" : "open" }
Message {"time" : "2022-03-23 20:12:18.993887", "protocol" : 68, "model" : "Kerui-Security", "id" : 843552, "cmd" : 7, "opened" : 0, "state" : "close" }

id is 843552

Credits

  • merbanan - RTL_433 Sensor decoder
  • simont77 - History Service
  • matopeto - Humidity Sensor Support