Skip to content

A personal project to create HomeKit accessories, for fun and non-profit.

Notifications You must be signed in to change notification settings

xoblite/HAP-NodeJS-accessories

Repository files navigation


December 2018: I started working on HAP-NodeJS 0.4.5x accessory plugins a few months back and will be uploading stuff here continuously. This readme is still a work-in-progress, however the code itself should hopefully be somewhat self-explainable as well... 😉 All applications have been tested on Raspberry Pi's running Raspbian Stretch Lite and Node.js 8.x, but are provided “AS IS”.

Preview ======================== Description ===================================================
DS18B20_accessory.js
Straightforward integration of the ubiquitous DS18B20 digital (12-bit) temperature sensor. This plugin can support two sensor devices - typically placed indoors and outdoors respectively - simultaneously per instance. Just enable 1-Wire and enter your sensor ID(s) into the .js, and you should be good to go. Simple, cheap, reasonably accurate (±0.5°C over much of the range) and optionally waterproofed - what more can you ask for? 😄
SuperSnap_accessory.js
A multi-purpose tool to deliver snapshot photos and/or images via the HomeKit camera interface. Building off a merge and modification of the original HAP-NodeJS camera accessory code, this plugin provides integration with the Raspberry Pi Camera Module (nb. snapshots only, no video streaming) as well as to "random image" services like Picsum Photos, LoremFlickr and PlaceIMG for various testing purposes. More information to be added here later.
Unicorn_pHAT_accessory.js
Regular light, but also a CPU Load+History meter, Fire, Swirl and Rainbow summoner, Mood indicator, and more! That is, quite advanced HomeKit integration for the Pimoroni Unicorn pHAT for Raspberry Pi Zero. Uses the rpi-ws281x-native module to control the Unicorn pHAT, and needs to run as root since this in turn needs to configure e.g. DMA and PWM to do this. More information will be added here later.

Hint: Brightness selects display mode: 1 CPU Load. 2 CPU History. 3 Fire. 4 Swirl. 5 Rainbow. 9 (subject to change) Icons. >10 Regular Light. For now... 😉
Pi_Zero_CPU_statistics_accessory.js
CPU Load Meter (via a spoofed humidity sensor showing the non-idle 3 second average load in %) and Temperature Sensor. Reads the current values periodically (with adaptive frequency) from the Raspberry Pi Zero and reports it back to HomeKit. It also supports optional exposure to Prometheus (on port 9999 by default), and can thereby easily also be monitored beautifully by Grafana (based on exposed metrics such as raspberry_pi_zero_cpu_load_non_idle, raspberry_pi_zero_cpu_temperature, and a few others).
KEBA_P30_accessory.js
High level integration of the KEBA KeContact P30 series wallbox charging stations for electric cars (via a spoofed fan accessory showing the charging/plugged state as well as the power output in percentage of the HW/SW configured maximum). Reads the current values periodically (10 seconds interleaving) from the wallbox using its UDP based API (note that your wallbox IP address must be configured on line 11), and reports back to HomeKit. It also supports optional exposure of these and other parameters to Prometheus (on port 11521, cf. K=11, E=5, B=2, A=1, by default), see above.
PING_Presence_accessory.js
Want to know if Elvis is in the building? Sure thing: This is a simple presence monitoring plugin, based on PING; quite usable but with some non-avoidable caveats due to things like device sleep modes etc. More information will be added here later.
Coming soon... 😅

Coming soon... 😅

Coming soon... 😅

Enjoy! 😎

BR//KHH [xoblite]

========================

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

HomeKit™ is a trademark of Apple® Inc., registered in the U.S. and other countries.