@lucacan/domoticz-nodered
Version:
Some usefull functions to use with Node ed and Domoticz
42 lines (28 loc) • 483 B
Markdown
# @lucacan/domoticz-nodered
Some usefull functions to use with Node ed and Domoticz
## Install
```
$ npm install @lucacan/domoticz-nodered
```
## Usage
```js
const DN = require("@lucacan/domoticz-nodered");
battery(28.5);
//=> 28
battery(null)
//=> 255
rssi(30)
//=>0
rssi(67)
//=>3
rssi(150)
//=>11
rssi(234)
//=>11
rssi(null)
//=>12
tiny(boolena);
//=> Uncaught TypeError: rssi wants a number or a string!
// at tiny (<anonymous>:2:41)
// at <anonymous>:1:1
```