# node-intertechno-sender

> Rootless control of my Intertechno switches. Fork of https://github.com/n8henrie/node-rcswitch-gpiomem.

Latest version **0.0.4** (published 2017-12-27) · GPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install node-intertechno-sender
pnpm add node-intertechno-sender
yarn add node-intertechno-sender
bun add node-intertechno-sender
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-12-27 |
| First published | 2017-12-10 |
| Weekly downloads | 0 |
| License | GPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Juha Paananen |
| Maintainers | raimohanska |
| Keywords | rpi, raspberrypi, rcswitch, 433, rf, wireless, intertechno |

## Links

- npm: https://www.npmjs.com/package/node-intertechno-sender
- Repository: https://github.com/raimohanska/node-intertechno-sender
- Homepage: https://github.com/raimohanska/node-intertechno-sender#readme
- Issues: https://github.com/raimohanska/node-intertechno-sender/issues
- npm.io page: https://npm.io/package/node-intertechno-sender

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.0.8
- [bindings](https://npm.io/package/bindings.md) ^1.2.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2017-12-27
- 0.0.3 — 2017-12-10
- 0.0.2 — 2017-12-10
- 0.0.1 — 2017-12-10

## README

# node-intertechno-sender

Controls my Intertechno outlets on Raspberry Pi / Node.js. 

Shameless frankenteinized fork of <https://github.com/n8henrie/node-rcswitch-gpiomem>.

## Requirements

- Like the c++ version of rcswitch, [WiringPi must be
  installed](https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/)
  in order to compile.
- To work without root by way of `/dev/gpiomem` part to work, it should be run
  on Raspbian Jessie with [wiringPi >=
  2.29](wiringpi.com/wiringpi-update-to-2-29/)
- Both the data and the power Pins of the 315/433Mhz emitter must be connected
  to the RPi. Note the number of the ~~WiringPi data~~ BCM Pin. (see
  http://wiringpi.com/pins/)

## Usage

```javascript
var sender = require('node-intertechno-sender'); // May throw an error if /dev/gpiomem is not accessible
sender.enableTransmit(18); // Use **BCM** pin 18
sender.setRepeatTransmit(5); // Set number of repeat transmissions
// Turn the first switch off. Switches 0..5 are supported.
sender.setState(0, false)
```

## API

### Configuration

#### `rcswitch.enableTransmit(int pin)`

Enable transmission on BCM `pin`. On Jessie should "just work". **NB:** if you to **not** want to use `/dev/gpiomem`, you'll need to first export the pin with the wiringPi `gpio` utility to avoid needing root.`

- `pin` - (Number) data Pin to use following [the WiringPi schema](http://wiringpi.com/pins/)

Return true if `pin` is an integer, false otherwise.

#### `rcswitch.disableTransmit()`

Disable transmission (set the pin to -1 which disable any following function call).

Return true.

#### `rcswitch.send(`char* codeWord`)`

- `codeWord` - (String) codeword. Can use this to send the **binary** RF code,
see: <http://n8henrie.com/2015/12/rf_pi>

Return true.

---
_Source: https://npm.io/package/node-intertechno-sender · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
