stjohnjohnson / smartthings-mqtt-bridge

Bridge between SmartThings and MQTT
https://hub.docker.com/r/stjohnjohnson/smartthings-mqtt-bridge/
MIT License
363 stars 242 forks source link

trying to get this running as a service in windows 10 powershell #202

Open clsferguson opened 5 years ago

clsferguson commented 5 years ago

Hey, I was hoping someone could point me in the right direction to get this running as a service on windows 10. i can get it running inside a powershell. but then i always have to open a console and well you know.

i tried pm2 and pm2_windows_service. both didn't work right.

sgupta999 commented 4 years ago

Checkout https://www.howtogeek.com/50786/using-srvstart-to-run-any-application-as-a-windows-service/ Step 1. create a .bat or .cmd file with the following command @ECHO off node.exe "C:\Program Files\nodejs\node_modules\smartthings-mqtt-bridge\bin\smartthings-mqtt-bridge" %*

convert this .bat or .cmd to exe using battoexeconverter https://www.majorgeeks.com/files/details/bat_to_exe_converter.html

then convert it to service using https://github.com/rozanski/srvstart

following instructions in original article