Node.js Libraries for Homebridge, HomeKit, DHT Sensors, and PDF Invoices
Summary of my bookmarked Github repositories from Sep 28th, 2016
The homebridge-dht-sensor is a Homebridge plugin designed for DHT temperature and humidity sensors. To install it, use the command "npm install -g homebridge-dht-sensor." Prior to usage, ensure that the BCM2835 library is installed on your board. You need to specify the sensorType (11 for DHT11, 22 for DHT22 or AM2302) and the gpioPin connected to the sensor's data pin. The provided example JSON configuration demonstrates how to integrate the plugin into Homebridge for monitoring the Sensor accessory.
HAP-NodeJS is an implementation of the HomeKit Accessory Server, designed for creating HomeKit accessories on platforms like Raspberry Pi and Intel Edison using Node.js. While it is not an Apple-certified HAP implementation, it closely follows the HAP specification. For HomeKit support on devices that don't natively support it, you can explore the homebridge project, which utilizes HAP-NodeJS. The website provides documentation, examples, and a list of projects built on HAP-NodeJS, such as Homebridge and node-red-contrib-homekit. Additionally, it acknowledges the work of Alex Skalozub, who reverse-engineered the server side HAP.
node-dht-sensor is a node.js module that allows you to read temperature and relative humidity using compatible DHT sensors. It supports sensors like DHT11, DHT22, and AM2302. The module provides easy initialization and read functions, allowing you to obtain sensor data. Additionally, it offers a Promises API and supports async/await syntax. The module can be used with multiple sensors connected to the same Raspberry Pi, and it even provides a test mode for development without actual hardware. It requires node-gyp for building and can be installed via npm.
pdf-invoice is a Node.js library that allows you to generate PDF invoices programmatically. With simple installation and usage, you can customize the invoice details including company information, customer details, and itemized descriptions. Once configured, you can trigger the rendering and generate the invoice as a PDF file. A PDF demo is available on the project's GitHub repository for reference.