npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@townsen/homebridge-ds18b20

v1.0.1

Published

DS18B20 Plugin for Homebridge: https://github.com/nfarina/homebridge"

Downloads

12

Readme

homebridge-ds18b20

Features

  • Supports the graphing feature of the Eve app for trends
  • This plugin can read a 1-wire device attached to the host running Homebridge or it can use the rgpio library to read a device attached to a remote host.

Installation

Setup the Hardware

First ensure you have a 4.7k pullup resistor wired between the data pin and positive supply. Then choose which GPIO pin to use. The default is GPIO 4 but since I2C devices are often connected in that area I use header pins 14(gnd), 15(gpio 22) and 17 (3v3).

Setup Homebridge

Do the following on the computer that will run the HomeBridge instance:

  1. Install Homebridge using npm install -g homebridge

  2. Install this plugin npm install -g @townsen/homebridge-ds18b20 Alternatively, if you want to run the plugin directly from this repository then in this plugin directory issue:

    npm install sudo npm link

  3. Update your configuration file - see below for an example

  4. If accessing remote devices install python3-rgpio

Setup the OS hosting the 1-wire devices

  1. Setup the correct GPIO pin in /boot/config.txt with dtoverlay=w1-gpio,gpiopin=22.
  2. Alternatively dynamically load it with dtoverlay w1-gpio gpiopin=22 pullup=0
  3. If this will be accessed from a remote HomeBridge instance install the rpgiod package and edit the /etc/defaults/rgpiod file to remove the -l option. For security you may add the option -n <homebridge-instance-ip> to the configuration.

Configuration

  • accessory: "DS18B20"
  • name: descriptive name
  • refresh: Optional, time interval for refreshing data in seconds, defaults to 30 seconds.
  • device_id: the 1-wire device identifier. Find this by listing the directory /sys/bus/w1/devices.
  • host: the remote host to use. Default is 'localhost'. rgpiod must be installed on the remote host and the python3-rgpio library on the homebridge instance.
  • recordpath: Optional, used by the fakegato history code to create an on-disk record of the observations. This preserves the history in case of a restart, and can be used to extract the observations manually. The name and the device_id are used to name the sensor device, which is then used as the filename.

Simple Configuration

{
  "bridge": {
    "name": "DS18B20",
    "username": "CB:22:33:E2:CE:31",
    "port": 51826,
    "pin": "033-44-254"
  },
  "accessories": [
    {
      "accessory": "DS18B20",
      "name": "Water Temperature",
      "refresh": 60,
      "device_id": "28-3c01d6077a95"
    },
    {
      "accessory": "DS18B20",
      "name": "Pool Temperature",
      "host": "piz-pool-temperature",
      "refresh": 60,
      "device_id": "28-6a8e491f64ff"
    }
  ],
  "platforms": []
}

Debugging

Set the DEBUG variable to DS18B20 to get messages in the HomeBridge console

License

MIT