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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tomvh/home-automation

v0.8.1

Published

Home automation ![](http://img.shields.io/badge/npm-v0.4.0-brightgreen.svg)

Readme

Home automation

nmp badge

ESLint

Markdown Linter

Tests

Description

This app will provide a json of the airco and heater. When the temperature is too low, the heater will turn true and the airco false. when the temperature is too high, the airco will turn true and the heater false. When the temperature is perfect, the airco and the hearer are false.

you can provide more dan 1 unit. this converter works with Celsius, Fahrenheit and Kelvin it will convert automatically to the correct unit.

Installation instruction

Make sure typescript is installed at your PC. You can find how to install here:

https://www.typescriptlang.org/v2/download

Once installed: All you need to do is set the temperatures in the wanted unit with a json object.

npm publish package

npm init --scope@my-org
npm publish --access public

Multiple usage instructions and examples

The temperatures (json objects) are now hard code in our project. You can modify the app to read values from a real sensor. This app is just a example of the usage. First step is download the project to you pc. The first json object in the app is the setting of the thermostat. You need to provide a fixed temperature, the range and the unit of your temperature value.

{
 "temperature": 25,
 "range": 1.0,
 "unit": "Celcius"
}

Next, you'll provide json objects with the temperature and unit. This object looks like:

{
 "temperature": 28.0,
 "unit": "Celsius"
}

There are some examples of these objects in the code. Next, you'll open the command line interface and type:

ts-node index.ts

And the app will run. If you hadn't modify the project, you'll use the hard code values (the json objects like above) and it will return a json object in the cli that tells the airco and heater what to do.

{
 "cooling": true,
 "heating": false
}

this is the result of the temperature of 28°C with an temperature set on 25°C with an range of 1°C, this is will return a true for the airco and a false for the heater. You can set many temperatures that you wanted. You can set many values you want in any unit. it will convert automatically.

V0.5 adds a temperature thats comes from a website. You don't need to do much, you only need to specify a url in the app.ts file. Look for the method app2(). You also need to provide some settings. You can choose what you want.

    const http = new HttpThermostat('http://dummy-sensors.azurewebsites.net/api/sensor/abba5');
    http.settings(20, 1, "Celsius");

You'll also get a json object as return.

{
 "cooling": true,
 "heating": false
}

You can view the full description of the classes in the next website Description

There are some test build in too, don't hesitate to use them! They give a nice indication of how good (or bad) you're programming. You can start the test by the following command

npm test

Licence

This project, is under the MIT licence. View the license file for full license description. You can find this file here: license.md

Author information

Name: Van Hove Tom
Email: [email protected]
Role: student
School: Vives University
Location: Bruges Belgium