All Projects → hecomi → node-wemo

hecomi / node-wemo

Licence: other
Belkin 社の WeMo を操作する Node モジュールです

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-wemo

webpack-aws-lambda
AWS Lambda that runs webpack and output the bundle.js file
Stars: ✭ 12 (-36.84%)
Mutual labels:  node-js
DynamicsNode
Create simple scripts to interact with Dynamics CRM using Node.js
Stars: ✭ 27 (+42.11%)
Mutual labels:  node-js
node-rest-api-scaffold
This project is an initial NodeJS Rest API scaffold for developers
Stars: ✭ 24 (+26.32%)
Mutual labels:  node-js
doctr-tfjs-demo
Javascript demo of docTR, powered by TensorFlowJS
Stars: ✭ 21 (+10.53%)
Mutual labels:  node-js
node-express-mongo-passport-jwt-typescript
A Node.js back end web application with REST API, user JWT authentication and MongoDB data storage using TypeScript
Stars: ✭ 51 (+168.42%)
Mutual labels:  node-js
twgitbot
A node.js bot that checks a github repo changes and tweets it to your Twitter account
Stars: ✭ 10 (-47.37%)
Mutual labels:  node-js
Smart-Bell
IoT based face recognition security system
Stars: ✭ 30 (+57.89%)
Mutual labels:  node-js
roboserver
Control OpenComputers robots without writing any code!
Stars: ✭ 52 (+173.68%)
Mutual labels:  node-js
loggin-js
📝 Customizable and expandable logger for Node.js
Stars: ✭ 20 (+5.26%)
Mutual labels:  node-js
CoffeeAndCode
Weekly Dev Challenges
Stars: ✭ 16 (-15.79%)
Mutual labels:  node-js
fortnite-basic-api
Basic Fortnite API for stats with async/await, and basic communicator
Stars: ✭ 46 (+142.11%)
Mutual labels:  node-js
react-full-stack-starter
🎈Full-stack React boilerplate using `create-react-app`, Babel, Node.js, and express
Stars: ✭ 22 (+15.79%)
Mutual labels:  node-js
UWO
Unity WebGL x WebSocket MMO demo
Stars: ✭ 49 (+157.89%)
Mutual labels:  node-js
rustwasmc
Tool for building Rust functions for Node.js. Combine the performance of Rust, safety and portability of WebAssembly, and ease of use of JavaScript.
Stars: ✭ 97 (+410.53%)
Mutual labels:  node-js
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (+31.58%)
Mutual labels:  node-js
cocoon-demo
Cocoon – a flow-based workflow automation, data mining and visual analytics tool.
Stars: ✭ 19 (+0%)
Mutual labels:  node-js
minesweeper-bot
I'm a Discord bot that can generate a random Minesweeper game using spoiler tags, for anyone to play!
Stars: ✭ 27 (+42.11%)
Mutual labels:  node-js
Bitcoin-Stealer
Generate random bitcoin wallets, private keys (seeds) and then check if they match a wallet that contains some kind of balance, and then take it. Node.js
Stars: ✭ 61 (+221.05%)
Mutual labels:  node-js
tinder-client
❤️ NodeJS Tinder Client
Stars: ✭ 50 (+163.16%)
Mutual labels:  node-js
ewd-qoper8
Node.js Message Queue and Multi-Process Manager
Stars: ✭ 23 (+21.05%)
Mutual labels:  node-js

WeMo client library for Node.js

これは何?

Belkin 社の WeMo Switch / Motion を操作する Node.js 用モジュールです。

インストール

$ npm install wemo

使い方

以下のように getBinaryState / setBinaryState で操作出来ます。

var WeMo = new require('wemo')
var wemoSwitch = new WeMo('192.168.0.16', 49154);
wemoSwitch.setBinaryState(1, function(err, result) { // switch on
	if (err) console.error(err);
	console.log(result); // 1
	wemoSwitch.getBinaryState(function(err, result) {
		if (err) console.error(err);
		console.log(result); // 1
	});
});

WeMo Motion は getBinaryState のみ可能です。

家にある WeMo の検索には Search を使います。

var WeMo = require('../wemo');

var client = WeMo.Search();
client.on('found', function(device) {
	console.log(device);
	setTimeout(function() {
		client.exit();
	}, 3000);
});

アプリから設定した Friendly Name で検索することも可能です。

var WeMo = require('wemo');

WeMo.Search('Hecomi WeMo Switch 1', function(err, device) {
	var wemoSwitch = new WeMo(device.ip, device.port);
	...
});

その他サンプルは ./test 以下をご覧ください。

LICENSE

Copyright (c) 2014 hecomi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].