Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roccomuso/iot-433mhz-client
:video_game: CLI tool for the iot-433mhz system.
https://github.com/roccomuso/iot-433mhz-client
cli client iot iot433mhz module node rf
Last synced: 8 days ago
JSON representation
:video_game: CLI tool for the iot-433mhz system.
- Host: GitHub
- URL: https://github.com/roccomuso/iot-433mhz-client
- Owner: roccomuso
- Created: 2017-01-10T16:17:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T01:01:24.000Z (about 8 years ago)
- Last Synced: 2024-11-22T08:48:21.037Z (about 2 months ago)
- Topics: cli, client, iot, iot433mhz, module, node, rf
- Language: JavaScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iot-433mhz-client
:video_game: CLI tool for the [iot-433mhz](https://github.com/roccomuso/iot-433mhz) system.[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
# Install
$ npm install -g iot-433mhz-client
or
$ npm install --save iot-433mhz-client
## Debug
Using [debug](https://github.com/visionmedia/debug) module, just set an env var before execution:
$ DEBUG=iot-433mhz-client:*
# Standalone Usage
After a global install launch it with:
$ iot
If launched for the first time, you'll be redirected to the configuration step.
# Embedded
The **iot-433mhz-client** module can be embedded and used as node module.
```JavaScript
const IotClient = require('iot-433mhz-client');var iot = new IotClient({
host: '',
port: 8080,
user: 'root',
pass: 'root'
});iot.getCardsList({type: 'alarm'}).then(function(o){
console.log(o)
}, function(err){
console.log(err)
})iot.getCard('card-name').then(function(card){
console.log(card)
}, function(err){
console.error(err)
})iot.toggleSwitch('card-name').then(function(o){
console.log(o)
}, function(err){
console.error(err)
})iot.setSwitch('card-name', false).then(function(o){
console.log(o)
}, function(err){
console.error(err)
})iot.getAlarmStatus('card-name').then(function(o){
console.log(o) // { ... }
}, function(err){
console.error(err)
})```
## API
# Author
Rocco Musolino - @roccomuso