node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org ยป

hures

HuReS

Humble Remote Switch
Simple http tool switching relays using node.js on Raspberry Pi.

Usage

$ npm install hures Connect the relay board to the RPI via your favorites pin. (see [Node.js Embedded Development on the Raspberry Pi](https://learn.adafruit.com/node-embedded-development/why-node-dot-js)) (gpio-admin may be required)

Modify config/default.json or create your own config file (see config)

$ nano ./config/default.json

Fire!
$ node hrserver.js

Connect via your pc browser to http://"server_ip":"port"/index
or via your mobile browser to http://"server_ip":"port"/mobile
Ex.: http://192.168.1.8:8884/index

Well, that's all.

PS: now you can connect an lcd to check the relay status

Give it a try and let me know!

Tested on:

Raspberry pi B+
Relay Board Keyes Funduino Ver.4R1B (4 relays)

References

_ [Node.js Embedded Development on the Raspberry Pi](https://learn.adafruit.com/node-embedded-development/why-node-dot-js),
_ [Learnyounode](https://github.com/rvagg/learnyounode).

Based on:

node.js
[onoff](https://github.com/fivdi/onoff)
[config](https://github.com/lorenwest/node-config)
[through2-map](https://github.com/brycebaril/through2-map)
[async](https://github.com/caolan/async)
[lcd](https://github.com/fivdi/lcd)
jQuery
jQuery UI
jQuery Mobile