{"_id":"homebridge-bluetooth","_rev":"32-86e2044cf1262a9980700572cbf8870d","name":"homebridge-bluetooth","dist-tags":{"latest":"0.1.7"},"versions":{"0.0.0":{"name":"homebridge-bluetooth","version":"0.0.0","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"license":"MIT","_id":"homebridge-bluetooth@0.0.0","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"http:://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"01082bb16e147d77c1d0214a868998cead844a61","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.0.0.tgz","integrity":"sha512-H4fQIEdSkBOt6+g2LCn6N0cb/JcneEiyQWc+u8o3zuUW70/BL0ABLUgMQSRVkBBxenmFQmuQt7/qjtNrVYiojQ==","signatures":[{"sig":"MEUCIQCx3AzzevY1LENt8KMidRy/JL60HWs1E/F+b/MZOqo6HwIgOB/vgWUsRhp4aA8NfE7lHyvubFJA+RIFunezOzl0jao=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"01082bb16e147d77c1d0214a868998cead844a61","engines":{"node":">=0.12.0","homebridge":">=0.2.0"},"gitHead":"e4c96b3ad4c8bbedffaed942773ed29f789af53e","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"2.15.9","description":"Homebridge plugin to expose Bluetooth Low Energy peripherals as a HomeKit accessories. https://github.com/vojtamolda/homebridge-bluetooth.","directories":{},"_nodeVersion":"4.6.0","dependencies":{"noble":">=1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.0.0.tgz_1475166668491_0.11859871307387948","host":"packages-16-east.internal.npmjs.com"}},"0.1.0":{"name":"homebridge-bluetooth","version":"0.1.0","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.0","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"2093440dce403c84e0668b983041ea1660ce4119","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.0.tgz","integrity":"sha512-Xvt2WfmQt7yu4SBpY2I1Z+a+GMjasFqk4FQ/pZ9MMfjMQXlxt+XrWz5bv7vB7RUEejsONyIAWlJ+rgXsNgm8cA==","signatures":[{"sig":"MEYCIQCNddfvKL2XE2GpygcGCJQZ3IkglyujfTdDLtWEpyArPwIhAIwNuSrg+1m30ZURRxBl+K2a2KYrlcTKfBzn/BLw+1ap","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"2093440dce403c84e0668b983041ea1660ce4119","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"51c865ca4137f8887e11f735a4ebb7d18443cba0","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"2.14.4","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"0.10.40","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.0.tgz_1479098483159_0.19791654031723738","host":"packages-18-east.internal.npmjs.com"}},"0.1.1":{"name":"homebridge-bluetooth","version":"0.1.1","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.1","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"526bd67a0c1cb7a4093babceed02a0324afb2bf3","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.1.tgz","integrity":"sha512-Mt5JYZL2u03t+LLJ5RVBIANdmu8dfysP0UHKUWpdyQv8k+ne0jFFkKKiN3Tx6Ppk1Ds8BePn0K20JR5o9IgoHA==","signatures":[{"sig":"MEYCIQC87d6ii1wHfGFc6abBHDKOgbAm5iZMQV0607n29fPIUAIhAPy5ODUsuAK2ROC6Gn1lkFrZAXDeMFivof3BxtRf4/qM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"526bd67a0c1cb7a4093babceed02a0324afb2bf3","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"0526230094b22ac3a3f851b7f2af04079211e40e","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"2.14.4","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"0.10.40","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.1.tgz_1479174993447_0.6878116026055068","host":"packages-12-west.internal.npmjs.com"}},"0.1.2":{"name":"homebridge-bluetooth","version":"0.1.2","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.2","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"2a491e58820c3fe6e007933ce84dc589b3d9d90c","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.2.tgz","integrity":"sha512-W0Hbnw4GjIwP9l8QU5u7nn2LvEvd1m3C7c9Gvgw2kJhvv/jQU85fPVm+4E+Z6W9GN9T/WxPc4UfK5sY8PS67OA==","signatures":[{"sig":"MEUCIDsBQpchv63X749TQYiFtqdhdpnoCheay0hDQG6yS9SoAiEA2DThiGYpt1/FOdOIIJtcIUCI9jkj/lsmhhhzySBUIJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"2a491e58820c3fe6e007933ce84dc589b3d9d90c","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"71f263ea9d30f1b8b0d66cf2559845a2532dd43d","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"2.14.4","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"0.10.40","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.2.tgz_1479355480625_0.09220338170416653","host":"packages-12-west.internal.npmjs.com"}},"0.1.3":{"name":"homebridge-bluetooth","version":"0.1.3","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.3","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"319ad1a4454c8b378fb4d2671bb15f60e6a2659c","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.3.tgz","integrity":"sha512-LZywxjQEzqEcPsI4CAIzSCaXC5U3lPmE3XoIhF45478OI+EMQfg4R1PIjh5aJZqcFFHJbwSTvSWfVBwxX4ruXA==","signatures":[{"sig":"MEYCIQD1NJ59tMASJuZ/3rXOMjLIPjy2sN8ZqRcwIVr7yaRupQIhALcYDB4v2u6JnGbB6JDzHJwmAqa6a3ng5FC/ae/RsN1o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"319ad1a4454c8b378fb4d2671bb15f60e6a2659c","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"771a173e2721946c911d73955fed14a52bfd26b0","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"3.10.9","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"6.9.2","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.3.tgz_1481506239647_0.6677053915336728","host":"packages-18-east.internal.npmjs.com"}},"0.1.4":{"name":"homebridge-bluetooth","version":"0.1.4","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.4","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"fd14a9afe344a8ad14bfa2576cd11bf3e353f4bd","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.4.tgz","integrity":"sha512-zEORtQJybT95PEKMt1Qexje8cuzNC+JKV2oUPgaF5gFfHblFeHXpHq5GZmc61xnzZX3S8AG4yAzMqTHMO8/cSQ==","signatures":[{"sig":"MEUCIQDT6ti9Q7fiKmJ/ObhnILQ40J0lmiLhcPib5GeAzRVwHAIgR11Ng3qzNCTBJTs1IbwvZwM9u8dVs8ZhGKoeWNWXLIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"fd14a9afe344a8ad14bfa2576cd11bf3e353f4bd","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"f5032a9665ba4c4f0aaa82e0096eb03157e57c3c","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"3.10.9","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"6.9.2","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.4.tgz_1481766776573_0.40890375315211713","host":"packages-12-west.internal.npmjs.com"}},"0.1.5":{"name":"homebridge-bluetooth","version":"0.1.5","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.5","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"ffdcd84bcd0d112e0f43fdc3d80dfa25685aaba6","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.5.tgz","integrity":"sha512-qYfRD+mjRNeKOo8J11obrVjCgZ56lHLM/yYZfONxrNdqOlEzCovVuBdCl8i8vdI9nchZseLaGnHuNpgNLFWuCQ==","signatures":[{"sig":"MEUCIEeZJU1qJIy+DWs5shxwaXeuzOGHFR5ww3C5b4dbnAZIAiEAuje9Dve6Jiau/6h8ECDzjKeTsS2Yqht0QpK6GZ5Hotk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"ffdcd84bcd0d112e0f43fdc3d80dfa25685aaba6","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"2d44d2451587a8bed523b96881d0145790cc68de","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"3.10.9","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"6.9.2","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.5.tgz_1482001210802_0.15538402553647757","host":"packages-12-west.internal.npmjs.com"}},"0.1.6":{"name":"homebridge-bluetooth","version":"0.1.6","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.6","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"13c7de1f2cda6f778e927aa08ae657e886ad4786","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.6.tgz","integrity":"sha512-CcryjBi8IH3hX2KMSYfmFU3YdLWPozadEpuenJRgsWWxXIZ682qI2VtNkjrmS1yfx1ludqnmKtTLmhuIhfYJRQ==","signatures":[{"sig":"MEUCIQCmMybttcUL1g9lEmugCAaUmsR8BEPs5cGzLfv+8XK/YgIgaHrTns1wdZQhPZeKRBHgh4xxSmlUuGfRsa3B5Qm3tQU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"13c7de1f2cda6f778e927aa08ae657e886ad4786","engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"e390958122f7114246a71da1a917c65c1aa6f9e0","scripts":{},"_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"3.10.9","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"6.9.2","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth-0.1.6.tgz_1484428937747_0.7752328382339329","host":"packages-18-east.internal.npmjs.com"}},"0.1.7":{"name":"homebridge-bluetooth","version":"0.1.7","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"author":{"name":"Vojta Molda"},"license":"MIT","_id":"homebridge-bluetooth@0.1.7","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"dist":{"shasum":"c5f4ddec1e8392d276bab55a42d8a7dcefd22e75","tarball":"https://registry.npmjs.org/homebridge-bluetooth/-/homebridge-bluetooth-0.1.7.tgz","fileCount":9,"integrity":"sha512-LkulXJU6HBzbu0BlXeqFpvtL+H1HRW3opyYmiabKIenH48bCnNhO3ZgttrS+kznwgN4AAHsQdE7Gc7u2s8qS3g==","signatures":[{"sig":"MEYCIQCIgpneAIkCFDoTjElOmflnspAkFshS65TFy02JF+BLoAIhAPY0mZrdt5YNvPoZCyC4Pw2olKmNaw9Sp4Q/Ws+7ArSh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHUsuCRA9TVsSAnZWagAAgoMQAIazk5WyuAB0kPOB6/g7\n2PWhdLGftDOyM8Bnz8cNOtNPAwaJs9EiZ69wDe3uMRteClAkv4YNjV9x0Hql\nDBE0C7+PY60s6gTKktwUCJ8empF4aFHBoPHu2lJsUcy762HeFIKYWDpQMDpL\nO4ABkKyWU1WJwquiVe95a9s3IocsKK5r9DLWLuM2ZEZca6uodPEVYTajSyXB\nQBKPLCRlg5EomUvlRE5rzMZYCYT3LZQxLBfWBgzdO/FuWdVqznv6WNAyeTAv\nf5mcW8bbWNsh1cbk1YL439hNtnAVsmzeq6LWqPrwMmNF9dbLSSxhxp2Z6+iK\nihgUGgce+vj9fb42C9dlGHV6zOq/C+OfFYdaaI+AaJyrZJufF19c21dPcP5f\nTfPcXU7o7xoxOpzcL6Cbh+2NBgZ+rM/FhNytZ+StkvDvZCNPitC0eKdTtY4H\nC1tBR958DPjVtv6feIurqH90c0MCmM1OvR3exZ4E4T9IkuNNUqa4uSIu/Aw6\nV9mQKSR/iBy+L6rcTBS7qvd2GnbnXGcP/Zy6XcTLVB6w9HThP2s09sA/WsJO\nRGcPjn3FOZnI0UVhI7uAbRBLS3YR5gDBxFs1+rJgLFQuScVtXbFBlPFx3YrD\nhhhHppPewfRbxjKrUcNXfupU+Y/KYZsktSxWjouW+4ikH3MBW6a2gXO53JB3\n5v0e\r\n=CzIg\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=4.3.2","homebridge":">=0.4.6"},"gitHead":"b6a6cb1f7d8b18e57997ca9278bcbb170514ba36","_npmUser":{"name":"vojtamolda","email":"vojta.molda@gmail.com"},"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"_npmVersion":"6.1.0","description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","directories":{},"_nodeVersion":"10.4.0","dependencies":{"chalk":">=1.1.1","noble":">=1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/homebridge-bluetooth_0.1.7_1528646444617_0.42698053945403847","host":"s3://npm-registry-packages"}}},"time":{"created":"2016-09-29T16:31:09.417Z","modified":"2025-05-29T10:06:49.920Z","0.0.0":"2016-09-29T16:31:09.417Z","0.1.0":"2016-11-14T04:41:23.843Z","0.1.1":"2016-11-15T01:56:35.568Z","0.1.2":"2016-11-17T04:04:42.876Z","0.1.3":"2016-12-12T01:30:40.377Z","0.1.4":"2016-12-15T01:52:58.732Z","0.1.5":"2016-12-17T19:00:12.759Z","0.1.6":"2017-01-14T21:22:18.528Z","0.1.7":"2018-06-10T16:00:44.716Z"},"bugs":{"url":"https://github.com/vojtamolda/homebridge-bluetooth/issues"},"author":{"name":"Vojta Molda"},"license":"MIT","homepage":"https://github.com/vojtamolda/homebridge-bluetooth#readme","keywords":["homebridge-plugin","bluetooth","bluetooth low energy"],"repository":{"url":"git://github.com/vojtamolda/homebridge-bluetooth.git","type":"git"},"description":"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories","maintainers":[{"name":"vojtamolda","email":"vojta.molda@gmail.com"}],"readme":"\r\n# homebridge-bluetooth\r\n\r\n\r\n[![NPM version](https://badge.fury.io/js/homebridge-bluetooth.svg)](https://badge.fury.io/js/homebridge-bluetooth)\r\n\r\n[Homebridge](https://github.com/nfarina/homebridge) plugin for exposing services and\r\ncharacteristics of nearby [Bluetooth Low Energy](https://www.bluetooth.com/what-is-bluetooth-technology/bluetooth-technology-basics/low-energy) (BLE) peripherals as [HomeKit](https://www.apple.com/ios/home/) accesories. Ideal for wireless DIY home automation projects if you'd like to control them comfortably with Siri on any Apple device.\r\n\r\n<img src=\"images/overview.jpg\">\r\n\r\nHomebridge runs on top of [Node.js](https://nodejs.org) server and is an open-source implementation of the Apple HomeKit protocol. HomeKit provides the API between your Apple device (i.e. Watch) and your home automation server (i.e. Raspberry Pi). This Homebridge [plugin](https://www.npmjs.com/package/homebridge-bluetooth) relays the communication from the home automation server to the BLE peripheral device (i.e. Arduino 101). Take a peek into the [examples](/examples/) folder for inspiration.\r\n\r\n\r\n\r\n## Installation\r\n\r\nMake sure your systems matches the [prerequisites](#what-are-the-prerequisites-for-installation). You need to have a C compiler, [Node.js](https://nodejs.org) server and if you're running on Linux the [`libbluez-dev`](http://www.bluez.org/download/) library.\r\n\r\n### Install Homebridge & Noble\r\n[Homebridge](https://github.com/nfarina/homebridge) is a lightweight framework built on top of [Node.js](https://nodejs.org/) server that provides the HomeKit bridge for your Apple devices to connect to. [Noble](https://github.com/sandeepmistry/noble) is BLE central module library for [Node.js](https://nodejs.org/) that abstracts away intricacies of each OS BLE stack implementation and provides a nice universal high-level API.\r\n\r\n```sh\r\n[sudo] npm install -g noble\r\n[sudo] npm install -g --unsafe-perm homebridge node-gyp\r\n[sudo] npm install -g homebridge-bluetooth\r\n```\r\n\r\n**Note** _Depending on your privileges `-g` flag may need root permissions to install to the global `npm` module directory._\r\n\r\n### Configure Homebridge\r\nHomebridge is setup via `config.json` file sitting in the `~/.homebridge/` directory. The [example config](config.json) included in the repository has lots of comments and is a good starting point. Each BLE peripheral device is uniquely identified by it's address. Services and characteristics are identified by UUID. Also, each of the [examples](/examples/) comes with it's own `config.json` file.\r\n\r\nThe easiest way to find the address of a BLE device is to start the plugin with a random/default address and then check the output for `Ignored | MyDevice - 01:23:45:67:89:ab` message. Alternatively you can run `[sudo] hcitool lescan` to discover available BLE devices.\r\n\r\nMapping of services and characteristics from Bluetooth to HomeKit relies on two things - matching read/write/nofity permissions and matching data type. To see what is available, take a look at the very long list [here](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js). Services are towards the bottom of the file. Each characteristic has pre-defined permissions that represent the expected way to use it - i.e. it doesn't make sense to write (set) the current temperature. These permissions must match the corresponding permissions of the Bluetooth characteristic. All data are assumed to use little endian encoding for multi-byte values.\r\n\r\nThe following table summarizes permission matching for a very popular [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) library that can run on most Arduino boards:\r\n\r\n| HomeKit `Characteristic.Perms[...]` | BLEPeripheral `BLECharacteristic(...)` |\r\n| :---------------------------------- | :------------------------------------- |\r\n| `READ`                              | `BLEWrite`                             |\r\n| `WRITE`                             | `BLERead`                              |\r\n| `NOTIFY`                            | `BLENotify`                            |\r\n\r\nSimilar to permissions, matching of the exchanged data type for [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) is summarized here:\r\n\r\n| HomeKit `Characteristic.Formats[...]` | BLEPeripheral `BLETypedCharacteristic<...>` |\r\n| :------------------------------------ | :------------------------------------------ |\r\n| `BOOL`                                | `BLECharCharacteristic`                     |\r\n| `INT`                                 | `BLEIntCharacteristic`                      |\r\n| `FLOAT`                               | `BLEFloatCharacteristic`                    |\r\n| `STRING`                              | `BLECharacteristic`                         |\r\n| `UINT8`                               | `BLEUnsignedCharCharacteristic`             |\r\n| `UINT16`                              | `BLEUnsignedShortCharacteristic`            |\r\n| `UINT32`                              | `BLEUnsignedIntCharacteristic`              |\r\n| `UINT64`                              | `BLEUnsignedLongCharacteristic`             |\r\n\r\nFor instance if you'd like create a HomeKit thermometer, you have to implement the `TemperatureSensor` service. According to the [list of available services and characteristics]() the service has one mandatory characteristic - `CurrentTemperature` and a handful of optional ones.\r\n\r\nThe `CurrentTemperature` characteristic communicates a `FLOAT` value and needs `READ` and `NOTIFY` permissions. Using the [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) library, the characteristic would be implemented as:\r\n\r\n```cpp\r\nBLEService temperatureSensorService(\"SERVICE-UUID-HERE\");\r\nBLEFloatCharacteristic currentTemperatureCharacteristic(\"CHARACTERISTIC-UUID-HERE\", BLERead | BLENotify);\r\n```\r\n\r\nThe corresponding entry in the `config.json` file that connects to the characteristic above is:\r\n\r\n```js\r\n\"services\" : [ {\r\n    \"name\": \"The Best HomeKit Thermometer\",\r\n    \"type\": \"TemperatureSensor\",\r\n    \"UUID\": \"SERVICE-UUID-HERE\"\r\n    \"characteristics\": [ {\r\n        \"type\": \"CurrentTemperature\",\r\n        \"UUID\": \"CHARACTERISTIC-UUID-HERE\"\r\n    } ]\r\n} ]\r\n```\r\n\r\n**Note** _All [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) should be randomly generated to prevent collisions. [This page](https://www.uuidgenerator.net) is a good place to get your own._\r\n\r\n### Run Homebridge\r\nDepending on your privileges, accessing the BLE kernel subsystem may need root permissions.\r\n\r\n```sh\r\n[sudo] homebridge -D\r\n```\r\n\r\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\r\n\r\n**Note** _See [this section of Noble readme](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`._\r\n\r\n\r\n\r\n## Troubleshooting\r\n\r\nIf you encouter a different problem, please, open an [issue](https://github.com/vojtamolda/homebridge-bluetooth/issues).\r\n\r\n### Home app can't discover any nearby accessories\r\nMake sure the Apple device and the Homebridge server are on the same subnet and connected to the same wifi router.\r\n\r\nSometimes, homebridge server might think that, it has successfully paired with iOS, but iOS doesn't agree. Try to delete the `persist/` directory in the `~/.homebridge/` configuration folder. This removes all pairings that normally persist from session to session.\r\n\r\n```sh\r\nrm -rf ~/.homebridge/persist/\r\n```\r\n\r\nFrom time to time it looks like iOS ignores HomeKit bridges with `username` that it has already paired with. Try to change the `username` in the `bridge` section of `config.json` to a new value never used before.\r\n\r\n```js\r\n\"username\": \"CC:22:3D:E3:CE:30\"  ->  \"username\": \"DD:33:4E:F4:DF:41\"\r\n```\r\n\r\n### BLE peripheral is discovered, but immediately disconnects\r\nThis isssue seems to be happening on some versions of Raspbian running on the Pi 3. Resetting the BLE adapter seems to resolve the issue:\r\n\r\n```sh\r\n[sudo] hciconfig hci0 reset\r\n```\r\n\r\nObviously, the solution is not really addressing the core of the problem, but it seems to help.\r\n\r\n\r\n\r\n## FAQ\r\n\r\n### Can I contribute my own example or a new feature?\r\nSure thing! All contributions are welcome. Just do a pull-request or open a new issue if you see something broken.\r\n\r\n\r\n### Is this thing secure?\r\n**No.** Not even close. Connection from your Apple device to Homebridge server is encrypted. However, all BLE communication is currently unencrypted and anyone with the right spoofing equipment can listen to it. Moreover, once the attacker has figured out what devices you have, he can also connect to any of your peripherals and control them directly. So don't use this if you're paranoid or if NSA is after you. You wouldn't sleep well.\r\n\r\n[MFi](https://developer.apple.com/programs/mfi/) certified HomeKit BLE encryption uses quite-strong Ed25519 elliptic cypher. BLE has built-in support for encryption, but it seems that Apple has decided to build their own thing as usual. It makes some sense in this case since a lot is at stake - once HomeKit becomes widespread a security bug literally means open doors to your house. Hooray - let's connect billions of unsecured IoT devices to the internet! What could possibly go wrong??\r\n\r\nMoreover, from bits and pieces available on the Internet, it seems that Apple has changed the specs several times and caused a lot of trouble for the manufacturers, since slower microprocessors tend to have a hard time doing all the involved encryption math. Initial pairing can take literally minutes. Pairing procedure uses SRP (Secure Remote Password (3072-bit) protocol with an 8-digit code (the number you have to type in when first pairing with Homebridge). After pairing, per session communication always uses unique keys derived by HKDF-SHA-512 and encrypted by the ChaCha20-Poly1305.\r\n\r\nTheoretically, one should be able to get rid of the Homebridge 'middle-man' since HomeKit over BLE allows direct connection to any Apple device. While there are many good [HomeKit IP stacks around](https://github.com/KhaosT/HAP-NodeJS) BLE implementations are few and far between. There's only one implementation I'm aware of [here](https://github.com/aanon4/HomeKit), but it can't be easily ported to other boards.\r\n\r\nBTW, I think it might be possible to re-write the BLE implementation above with [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) library instead of Nordic Semi's SoftDevice to make it run essentially everywhere. If anyone is interested in this project, please, let me know and maybe we can figure a plan and come up with something useful and fun to use.\r\n\r\nImplementing a HomeKit over BLE stack correctly requires access to [MFi](https://developer.apple.com/programs/mfi/) internal documentation, which isn't publicly available, unless you're a registered developer at a company with big $$$. Making BLE accessories is simple, but making them secure seems to be very, very hard.\r\n\r\n\r\n### What are the prerequisites for installation?\r\n\r\n#### Linux (Debian Based, Kernel 3.6 or newer)\r\nA supported  BLE (Bluetooth 4.0) USB dongle is required, if your device doesn't have it built-in.\r\n\r\n - Install [Node.js](https://nodejs.org/en/download/)\r\n\r\n   [Node.js](https://nodejs.org) is an asynchronous event driven JavaScript server, ideal for building scalable, low-latency network applications. [Homebridge](https://www.npmjs.com/package/homebridge) is built on top of this server. It is being developed so quickly that package repositories of most distributions contain a very old version. Getting latest from the official website is recommended.\r\n\r\n - Install `libbluetooth-dev` and `libavahi-compat-libdnssd-dev`\r\n\r\n   These libraries and their dependencies are required by [Noble](https://www.npmjs.com/package/noble) package and provide access to the kernel Bluetooth subsystem.\r\n\r\n   ```sh\r\n   sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libavahi-compat-libdnssd-dev\r\n   ```\r\n\r\n#### macOS (10.10 or newer)\r\nCheck [this link](http://www.imore.com/how-tell-if-your-mac-has-bluetooth-40) to see if your mac has built-in BLE (Bluetooth 4.0) support. All macs from 2012 and newer are generally fine.\r\n\r\n - Install [Node.js](https://nodejs.org/en/download/)\r\n\r\n   [Node.js](https://nodejs.org) is an asynchronous event driven JavaScript server, ideal for building scalable, low-latency network applications. [Homebridge](https://www.npmjs.com/package/homebridge) is built on top of this server. It is being developed so quickly that package repositories of most distributions contain a very old version. Getting latest from the official website is recommended.\r\n\r\n - Install [XCode](https://itunes.apple.com/ca/app/xcode/id497799835?mt=12)\r\n\r\n   [XCode](https://developer.apple.com/xcode/) comes with a C compiler that is needed to compile the JavaScript to C bindings required by [Noble](https://www.npmjs.com/package/noble) package.\r\n\r\n#### Windows (8.1 or newer)\r\nPull request is welcomed here... Both [Homebridge](https://www.npmjs.com/package/homebridge) and [Noble](https://www.npmjs.com/package/noble) should run on Windows, but I don't have a machine to test.\r\n\r\n\r\n### On what devices was this plugin tested?\r\nHere's a list of testing devices. The list is by no means exhaustive and the plugin will work with many more.\r\n- Apple Device\r\n  - [iPhone](https://en.wikipedia.org/wiki/IPhone) 5S & 6 running [iOS](https://en.wikipedia.org/wiki/IOS) 10\r\n\r\n- Homebridge Server\r\n  - [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi) 3 & 2 (with USB dongle) running [Raspbian](https://www.raspberrypi.org/downloads/raspbian/)  Jessie Lite\r\n  - [Macbook Air](https://en.wikipedia.org/wiki/MacBook_Air) (2015) & [iMac](https://en.wikipedia.org/wiki/IMac) (2012) running [macOS](https://en.wikipedia.org/wiki/MacOS) 10.12\r\n\r\n- Bluetooth Peripheral\r\n  - nRF51 Based Boards\r\n    - [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101), [RFDuino](http://www.rfduino.com/), [Bluefruit Micro](https://www.adafruit.com/product/2661)\r\n  - nRF8001 Based Boards\r\n    - [Arduino UNO](https://www.arduino.cc/en/Main/ArduinoBoardUno) + [nRF8001 Breakout](https://www.adafruit.com/products/1697),\r\n\r\n\r\n## License\r\n\r\nThis work is licensed under the MIT license. See [license](license.txt) for more details.\r\n","readmeFilename":"readme.md","users":{"dg4444":true,"krital":true,"sziszi":true,"jakub_a":true,"jaywang":true,"vknabel":true,"hundajdx":true,"volschin":true,"luizpaulo":true,"psligting":true,"vojtamolda":true,"brandonb927":true,"hanzelvides":true,"luizpaulorosa":true,"eralpkaraduman":true}}