0.0.16 • Published 1 year ago

homebridge-ble-thermobeacon v0.0.16

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Homebridge plugin for Brifit/ORIA thermometers

CI npm version Libraries.io dependency status for GitHub repo npm

Installation

Run npm install -g homebridge-ble-thermobeacon

Enable the plugin in the homebridge config.json:

{
  // ...
  "platforms": [
    {
      "platform": "PrometheusExporter",


      // Debugging enabled
      //
      // Default: false
      "debug": "<boolean>",


      // Publish all button press states as locks
      //
      // Pressed button is presented as unlocked, otherwise locked. Can help identify
      // the beacon
      //
      // Default: false
      "buttonAsLock": "<boolean>",


      // List of devices
      //
      // Default: []
      [
        {
          // Address
          //
          // Bluetooth address of the thermometer. MAC address on Linux, UUID on Mac
          "address": "<string>",


          // Name
          //
          // Specify a name for the thermometer in Homebridge
          "name": "<string>",


          // Publish button press state as lock
          //
          // Per device settings to publish button pressed state as a lock
          "buttonAsLock": "<boolean>"
        }
        //, { ... }
      ]
    }
  ]
}

Configuration

On Linux, the CAP_NET_RAW capability is required for BLE to work as a non-root user.

Systemd

If you are running homebridge with systemd (and you really should), you need to add CAP_NET_RAW as an ambient capability. Either edit the homebridge.service file directly or (preferably) place an override in /etc/systemd/system/homebridge.service.d.

Create the folder:

mkdir /etc/systemd/system/homebridge.service.d

Place this drop-in configuration in the folder, e.g. /etc/systemd/system/homebridge.service.d/bluetooth.conf:

[Service]
AmbientCapabilities=CAP_NET_RAW

Run systemctl daemon-reload to refresh systemd’s unit database and then run systemd-delta --type=extended to check if the drop-in worked as expected.

You should see something like this in the output:

…
[EXTENDED]   /lib/systemd/system/homebridge.service → /etc/systemd/system/homebridge.service.d/bluetooth.conf
…

Restart homebridge afterwards by running systemctl restart homebridge.

Acknowledgements

This project could not have happened without previous work. Many thanks!

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.11-alpha.0

1 year ago

0.0.10-alpha.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago