Socket
Socket
Sign inDemoInstall

@tritter/shellies

Package Overview
Dependencies
67
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tritter/shellies

Handles communication with Shelly devices


Version published
Weekly downloads
7
decreased by-36.36%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

[1.7.0] - 2022-02-10

Added

  • Add support for the Shelly TRV.

Readme

Source

node-shellies

NPM Version Build Status

Handles communication with the first generation Shelly devices, using both CoAP and HTTP.

For the next generation devices, see node-shellies-ng.

Features

  • Automatically detects Shelly devices (on the same network and subnet).
  • Automatically detects when the status of a device changes, such as when a relay is turned on or off.
  • Keeps track of devices and if they go offline (because no status update has been received in a given amount of time).

Supported devices

The following Shelly devices are supported:

Notes

1 Requires setting the Internet & Security -> CoIoT -> Remote address option on the Shelly device to the IP address of your device running node-shellies.

Basic usage example

const shellies = require('shellies')

shellies.on('discover', device => {
  // a new device has been discovered
  console.log('Discovered device with ID', device.id, 'and type', device.type)

  device.on('change', (prop, newValue, oldValue) => {
    // a property on the device has changed
    console.log(prop, 'changed from', oldValue, 'to', newValue)
  })

  device.on('offline', () => {
    // the device went offline
    console.log('Device with ID', device.id, 'went offline')
  })
})

// start discovering devices and listening for status updates
shellies.start()

Keywords

FAQs

Last updated on 03 Jul 2022

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc