Closed Isarian-de-Picardia closed 4 years ago
Hi!
This should be pretty easy. I would recommend starting with the docs for CommandLinePlugin (note that I just had to rebuild the docs, which hadn't updated with the last major version for some reason). Also please disregard the part about it not being included by default, which is a recent change. I have updated this docstring in the dev branch.
Basically, if you can turn on switch with python scripty1.py
and off with python script2.py
, you should be able to configure a CommandLinePlugin instance to run /path/to/python /path/to/script1.py
as the on_cmd
and analogously for the off_cmd
.
Alternatively, since the scripts you're referring to are in Python, you could also subclass FauxmoPlugin
and have the switch logic embedded into a custom class; for further details check out n8henrie/fauxmo-plugins.
fauxmo --version
): v0.5.0My Issue
I was watching the video here: https://www.youtube.com/watch?v=OQyntQLazMU
This video uses a collection of Python scripts that can be seen here: https://github.com/skiwithpete/relaypi/tree/master/4port
The scripts work fine on their own, but have to be run individually.
Relay 1 plugged into the Raspberry Pi GPIO here: https://i.imgur.com/AlIoygH.png
I was wondering how Fauxmo could be combined with these GPOI scripts to control the relay board with the Echo Dot. Say have each relay register as a Switch on Alexa, then have the on/off state controlled by running script similar to 5a and 5b in that collection for Relay2.
WHYT
Please make sure you've taken these steps before submitting a new issue:
-vvv
) and include relevant outputconfig.json