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

homebridge-json-thermometer

v2.5.0

Published

Homebridge plugin designed for a web-based thermometer with support for complex json objects.

Downloads

26

Readme

Homebridge Json Thermometer

This is a fork of the http-json-thermometer by Jakubkuba9000 that allows:

  • complex json objects to be parsed
  • minimum and maximum values per thermostat to filter out noisy default values like occasional 999°C from DS18B20 sensors on a Shelly Uni

Installation

  1. Install Homebridge.
  2. Install this plugin: npm install -g homebridge-json-thermometer or through Homebridge UI by clicking the INSTALL buttton.
  3. Update your config.json file by clicking the SETTINGS button through Homebridge UI or manually. See the explanations and samples below.

Configuration

Configuration example

{
  "platform": "HttpJsonThermometer",
  "thermometers": [ {
    "thermometerName": "Terrarium thermometer",
    "httpRoute": "http://ipaddress/status/",
    "updateInterval": 60,
    "jsonPath": "temp",
    "calibration": 0.16,
    "minValue": -900,
    "maxValue": 900,
    "manufacturer": "Default-Manufacturer",
    "model": "Default-Model",
    "serial": "Default-Serial"
    } ]
}

Examples

For a simple json object, defining the first property name is enough.

{
  "tC": 22.94,                // path is "tC"
  "tF": 73.29                 // path is "tF"
}

For complex json objects, the js dot notation can be used as path:

{
  "ext_temperature": {
    "0": {
      "tC": 22.94,                // path is "ext_temperature[0].tC"
      "tF": 73.29                 // path is "ext_temperature[0].tF"
    }
  }
}

Core

| Key | Description | Default | | --- | --- | --- | | platform | Must be HttpJsonThermometer | HttpJsonThermometer | | thermometerName | This will be the name of your thermometer that appears in the Home app. This must be unique. | Terrarium thermometer | | httpRoute | This must be a path to a JSON format that looks like this, for example:{  "temp": "24.88", "temp2": "24.06", "temp3": "23.75"} | http://ipaddress/status/ | | updateInterval | Interval after which the values are updated. | 60 | | jsonPath | This must be the path of the response value in a JSON response.In the case above it could be temp or temp2 or temp3. | temp |

Additional options

| Key | Description | Default | | --- | --- | --- | | calibration | Only if you need to calibrate your thermometer. It will increase or decrease the value. For example if you need to decrease by 0,05 then -0,05 and if you need to increase by 0.6 then 0.60 |0.00| | manufacturer | Manufacturer of your thermometer. | Default-Manufacturer | | model | Thermometer model. | Default-Model | | serial | Serial number of your thermometer. | Default-Serial |

More thermometers

You can also have more than one thermometer. Simply click the button ADD TO THERMOMETERS in UI or add it manually like this:

{
	"platform": "HttpJsonThermometer",
	"thermometers": [
		{
			"thermometerName": "Terrarium thermometer",
			"httpRoute": "http://ipaddress/status/",
			"updateInterval": 60,
			"jsonPath": "temp",
			"calibration": 0.16,
			"manufacturer": "Default-Manufacturer",
			"model": "Default-Model",
			"serial": "Default-Serial"
		},
		{
			"thermometerName": "Kitchen thermometer",
			"httpRoute": "http://yourdomain.com/temp/",
			"updateInterval": 15,
			"jsonPath": "t1",
			"manufacturer": "yourdomain.com",
			"model": "WIFI_USB",
			"serial": "S3r14lNumb3r"
		},
		{
			"thermometerName": "Bathroom thermometer",
			"httpRoute": "http://192.168.1.155/temperature/",
			"updateInterval": 120,
			"jsonPath": "temperature"
		}
	]
}

HomeKit limitations

Unfortunately, HomeKit has the limitation that it rounds values to 0.5 °C. This can be solved by downloading the free Eve app or another similar app. These applications usually show a value accurate to one decimal place.

Credits