Socket
Book a DemoInstallSign in
Socket

hasso

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hasso

Current state: experimental/under development.

0.3.0
latest
Source
npmnpm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

HASSO — idiomatic Home Assistant NodeJS Bindings 🐕

Current state: experimental/under development.

REST API

Class HomeAssistant provides access to Home Assistant's REST API.

Websocket API

Wraps home-assistant-js-websocket to provide easy and idiomatic access via NodeJS by providing a typed event-emitter.

Examples

Run examples either via nodemon (during development to watch for changes) or via ts-node directly.

The examples expect the environment variable HASS_TOKEN and HASS_URL to be set. With direnv the proper values may be set into a local .envrc file:

# copy the example file
$ cp .envrc.local{.sample,}
# set custom values
$ $EDITOR .envrc.local
# if not yet done, allow the .envrc file
$ direnv allow

ts-node

$ cd examples
$ ts-node index.ts

nodemon

To make nodemon/ts-node work with typescript project references and also watching changes in src, calling nodemon is a bit counter-intuitive. It needs to be called in project-root, but the examples path needs to be omitted.

$ nodemon services.ts
$ nodemon tags.ts

FAQs

Package last updated on 11 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.