Python Chamberlain Garage Door & Light Switch interface
Python used to interface with my MyQ garage doors and light switches. Load it as a module, or download it and run directly.
Then use like so: Command Line options: Device Statuses: ./myq-garage.py status Set Status: ./myq-garage.py [open/close/on/off] [device name] Device name is the name you set in the MyQ webpage for the device. If you don't know your device name, then just ./myq-garage.py status and it will return the names and status from the MyQ portal.
Requires the requests package in python
Updated to work fully with Python2.7 or Python3.
DONT FORGET TO CREATE YOUR STATE VARIABLES IN THE ISY, it will tell you if you forgot. There isn't currently a way to create these via API, I will update as soon as ISY allows state variable creation.
Variable format is the setting from myq-garage.py "ISY_VARPREFIX + your device name. Substitute any spaces with '' as ISY doesn't allow spaces in variable names. eg. 'Big Door' is my door name in MyQ and my variable prefix is MyQ_ so I create the variable MyQ_Big_Door
Variable is set to 1 when open/on, 0 when closed/off.
If you want to run this so it updates your state variables in ISY automatically every 5 minutes you can add a crontab entry on your linux/raspbian like so:
I wouldn't recommend doing more than every 5 minutes as the Chamberlain MyQ API is 'unofficial' therefore if we take down their servers from flooding them with requests, I doubt the'd be happy.
Cheers - E