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

x10-remote

v1.0.0

Published

X10 Home Automation Server

Downloads

4

Readme

X10-Remote.js

This node application provides a web application that sends X10 commands to a INSTEON PowerLinc Modem (PLM) (2413U for USB, 2413S for Serial) available from: http://www.smarthome.com or http://amazon.com

Install Dependencies

npm install

Configuration

There are some customization parameters that you can change in X10-Remote.js to make the program work in your environment.

API_KEY

var API_KEY = 'changeMe';

The API_KEY is an authentication token to provide a simplistic authenticated web request. The web requests will require inclusion of the query parameter apiKey=[value]. You should set the value to secret token.

SERIAL_PORT_NAME

var SERIAL_PORT_NAME = '/dev/ttyUSB0';

The serial port name should be set the value to communicate with the PLM. The USB PLM can use the FTDI drivers built in to modern Linux kernels. You should be able to plug in the USB PLM and the Linux kernel will create a device. The device will have a name like /dev/tty.usbserial-A901M8OI. You may be able to use dmsg to see log messages describing the actions taken by the Linux kernel to create the device when the USB PLM is plug in to a USB port.

MODULES

// Add X10 Modules to this list. The index number must be unique.
// Name: Module name to display in the web interface.
// House: X10 Module House Code
// Unit: X10 Module Unit Code
var MODULES = {
	0: {name:'Livingroom Lamp', house:'A', unit:'1'},
	1: {name:'Bedroom Lamp', house:'B', unit:'2'},
	2: {name:'Kitchen Light', house:'C', unit:'3',},
	3: {name:'Porch Light', house:'D', unit:'4'},
	4: {name:'Garage Door', house:'E', unit:'5'},
	5: {name:'Humidifier', house:'F', unit:'6'}
};

The object MODULES lists the X10 Modules that you can control. The X10 Modules should be configured before use with X10-Remote.js. There are some example entries in the code to start from. The index of each device must be unique. If you do add more entries, ensure that each entry except the last end with a comma. The name attribute is the name of the Module displayed in the web interface. The house attribute is the X10 house code of the device and the unit attribute is the unit code of the device. You can typically find and set the address on the device itself.

Running

To run the program:

node X10-Remote.js

This will start a web server listening on all IP address on port 8888. It will also open the serial port to communicate with the PLM. Use a web browser to access the web interface at:

localhost:8888/?apiKey=changeme

If all of the configuration is correct, you should see a screen listing each named device with On and Off buttons next to each device name and All On and All Off buttons at the bottom. You can click On, Off, All On, or All Off and an associated X10 command will be sent from the PLM to the addressed device.