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

shelly-driver

v0.1.3

Published

Allterco Shelly devices driver

Downloads

6

Readme

shelly-driver

CURRENTLY UNDER ACTIVE DEVELOPMENT

nodejs driver to connect and manage shelly devices

  • [x] HTTP communication
  • [x] CoIoT/MQTT/HTTP status tracking for any property
  • [x] mDNS Device Discovery
  • [x] Full Typescript definitions

Getting Started

npm i shelly-driver
// Direct device access
import { Shelly1 } from 'shelly-driver';

const fan = new Shelly1({ host: '192.168.31.130' });

// lazy observation on any status property change via RxJS
fan.observe('relays.0.ison')
  .subscribe((isOn) => console.log('The device is turned', isOn ? 'on': 'off'));

const settings = await fan.setRelay(0, { turn: 'on' });

Devices supported

We are in the way of supporting all the Allterco devices. Please open an issue if you need more devices supported. This driver contains full feature self documented code, it's not hard to add them, but takes some of our free time.

| Device | Available | Real life tested | | ------------------------------------ | --------- | ---------------- | | Shelly1 | ✅ | ✅ | | Shelly1PM | ✅ | ❌ | | Shelly1 with DS1820/DHT22 add-on | ✅ | ❌ | | Shelly1 with low-power switch add-on | ✅ | ❌ | | Shelly Door Window 1 | … | ✅ | | Shelly Button 1 | … | ✅ |

Development setup

To clone the repository use the following commands:

git clone https://github.com/jmendiara/shelly-driver && cd shelly-driver

Use VSCode development containers, directly docker-compose

# Shell interactive session inside a container
docker-compose run app bash

Available Scripts

  • clean - remove coverage data, Jest cache and transpiled files,
  • build - transpile TypeScript to ES6,
  • watch - interactive watch mode to automatically transpile source files,
  • lint - lint source files and tests,
  • test - run tests,
  • test:watch - interactive watch mode to automatically re-run tests
  • format - format the code

Debug

Relevant event log for the driver are available using debug module.

DEBUG=shelly:* ./your-app-binary

License

Copyright 2020 Javier Mendiara Cañardo

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.