0.2.1 • Published 6 years ago

sr201 v0.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

SR-201 Network Relay

NodeJS SR-201 network relay protocol.

Install

npm i sr201

Usage

const sr201 = require("sr201");

sr201.connect("192.168.1.100", 6722).then(async (client) => {
	await client.on(2);
	await client.delay(2000);
	await client.off(2);
	console.log(client.status(2));
	await client.end();
}, (err) => {
	console.log(err);
});

Reconfigure

const sr201 = require("sr201");

sr201.connect("192.168.1.100", 6722).then(async (client) => {
	await client.reconfigure(
		"192.168.10.123", // ip
		"255.255.255.0",  // mask
		"192.168.10.1",   // gateway
		"192.168.10.1",   // dns
	);
	// in the end, settings are saved and device restarts
}, (err) => {
	console.log(err);
});
0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago