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

unofficial-iim-slide-interface

v2.0.3

Published

A nodeJS wrapper for the slide API.

Downloads

5

Readme

Unofficial IIM slide interface

A nodeJS wrapper for the slide API.
Still in Beta!

const iim = require('unofficial-iim-slide-interface')

const slide = new iim.Slide('myDeviceID', 'The slide\'s ip')

// Get information about this slide
slide.getInfo()

// @param position :number from 0 to 1
// Set the position of the curtains
slide.setPos(position)

// Slide finds out how wide the curtains are, by bumping into both ends of the rail
// This is comparable to the homing sequence of a 3d printer
slide.calibrate()

// If the slide is moving, stop the movement
slide.stop()

// Tell slide to connect to a different network
slide.setWifi(ssid, password)

// end Slide() class

// If you don't know the ip of your slide you can use this function:
// Search for slide on the current network
// @return When found: a Slide() class. When not found: undefined
iim.findSlideByDeviceId(deviceID)

Example usage

Setup a slide

To use this package the slide you want to use must have local mode enabled. In this mode the slide will not communicate with IIM's servers. It will only listen for commands on your local network.
Enable this mode:\

  1. Plug the slide in.
  2. Press the reset button (next to the power plug) 2 times for 0.5 seconds with a pause of 0.5 seconds.
  3. The light should flash quickly 5 times.

Onboard the slide

After the setup the slide will create a network to which you can connect to give it instructions like tell slide what your home network is.

  1. Connect to the slide's network with your current machine
  2. run:
const iim = require('unofficial-iim-slide-interface')
// The Slide's IP is always 192.168.4.1 when it's hosting its own network
const slide = new iim.Slide('myDeviceID', '192.168.4.1'); 
(async () => {
	const response = await slide.setWifi('mySSID (wifi network name)', 'password')
	console.log(response)
})()
  1. Slide should reboot and connect to the specified network. \

Done. slide is now set up.
You can run this example to test:

const iim = require('unofficial-iim-slide-interface');

(async () => {
	const slide = await iim.findSlideByDeviceId('44UhBcsX')
	if (!slide) {
		console.log('Slide not found')
	}
	else {
		console.log('Found slide\'s ip', slide.ip)
	}
	const resp = await slide.setPos(Math.random())
	console.log(resp)
})()