Created
January 13, 2018 04:52
-
-
Save kechol/e5358345dc4194a53e8359c60b0f2e8f to your computer and use it in GitHub Desktop.
Configuration for broadlink-rm-server on Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
"use stict"; | |
process.title = 'broadlink-rm-server'; | |
const PORT = process.env.PORT || 1880; | |
const BroadlinkServer = require('broadlink-rm-server'); | |
const commands = []; | |
BroadlinkServer(commands).listen(PORT); | |
console.log('RM Server is running on http://localhost:' + PORT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Broadlink RM Server | |
After=syslog.target network-online.target | |
[Service] | |
Type=simple | |
User=homebridge | |
EnvironmentFile=/etc/default/broadlink-rm-server | |
ExecStart=/usr/local/bin/broadlink-rm-server | |
Restart=on-failure | |
RestartSec=10 | |
KillMode=process | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NODE_PATH=/opt/node/lib/node_modules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment