etwmc / Personal-HomeKit-HAP

This project will provide source code to build a HomeKit support accessories.
MIT License
236 stars 85 forks source link

how to launch python script when turn on accessory ? #59

Closed todely closed 7 years ago

todely commented 8 years ago

How can i add python-shell command when i turn on or off an accessory ? (purpuse is to turn on / off some GPIO)

Does Wemo device can be add as accessory ?

Thanks !

etwmc commented 8 years ago

If you can run python from a C code (I usually go with separate process with Unix Socket, but I've heard you can call python directly from C, so you can change the code in accessory implementation to do it? ) But GPIO is usually has some API to do so, or exposed to the system in some form of files/socket from kernel. Wemo is possible as long as you can figure out a way to control it under C/C++, or has a small process to do the control with some message passing. (Sorry to replying this late, I stop to pin GitHub in Safari after switching Developer Preview, and I still have no idea why I have no email from GitHub)