/node-rpi-poweroff

Raspberry Pi Poweroff via button or http

Primary LanguageHTML

node-rpi-poweroff

Poweroff & reboot Raspberry Pi over HTTP and button

Contents

About

A NodeJS Linux poweroff and reboot web application over password protected HTTP and tactile switch

Built With

Getting Started

Prerequisites

  • A Raspberry Pi

Installation

git clone https://github.com/13/node-rpi-poweroff.git

npm install
npm rebuild

Configuration

Add .env file

HTTP_USER=XXXXX
HTTP_PASS=XXXXX
HTTP_PORT=80
OCTOPRINT_SERVER=192.168.22.19:81
OCTOPRINT_TOKEN=XXXXX
MQTT_SERVER=192.168.22.9:1884
SHELLY_DEVICE=shellies/shellyplug-s-XXXXXX

Usage

node run.js -t 'show timestamp'
node run.js -t

Troubleshooting

Allow port 80 on linux

sudo setcap 'cap_net_bind_service=+ep' $(which node)

Roadmap

  • ...

Release History

  • 1.0.0
    • Initial release

Contact

  • 13 - Initial work - 13

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thank you