sumnerboy12 / mqtt-gpio-monitor

Python script for sending/receiving commands to/from GPIO pins via MQTT messages
46 stars 23 forks source link

NOOB Question - Starting the script #12

Closed xbmcnut closed 8 years ago

xbmcnut commented 8 years ago

Hi. Thanks for creating this. I'm going to use it with Home Assistant. Dumb question though. How do I start the script? Don't know where these things get installed as I'm a hardware guy and searching for pifacedigitalio or mqtt-gpio-monitor.ini with WinSCP did not yield any results.

sumnerboy12 commented 8 years ago

Up to you really, I use supervisor to manage these sorts of little scripts. Google it, there are plenty of tutorials and guides on how to use that to run simple python scripts like this.

xbmcnut commented 8 years ago

Thanks for the prompt reply Ben. Will do, but where is the .ini and .py file located on install?

sumnerboy12 commented 8 years ago

Whereever you like - your supervisor config script will point to the location. Something like this;

[program:<program-name>]
directory = <program-directory>
command = <program-command>
user = <program-user>
xbmcnut commented 8 years ago

Thanks again Ben. Sorry to be a pain in the arts, but I'm a bit confused. I thought running sudo apt-get install python-pifacedigitalio would install mqtt-gpio-monitor.py and mqtt-gpio-monitor.ini.example (to be edited) so I'm looking around for those files. Am I missing something?

sumnerboy12 commented 8 years ago

Nope - there is no installation package for this script - you have to git clone it locally and run yourself.

xbmcnut commented 8 years ago

Ah, OK, got it. Still getting my head around Linux.