homekit_python
homekit_python copied to clipboard
Garagedoor opener support
Hello @SYNiMAK
let's try here with the garage opener here.
My questions:
- do you already have an accessory?
- what kind of connection does the device use?
- does it appear on discovery?
- could it be paired?
There is ipython notebook that can serve as example for IP (WiFi) based devices...
Regards Joachim
I don't have any accessories at all. Currently I have the garage door hooked up to the RPi via a relay. I've had a LCD touchscreen and tkinter GUI with buttons to trigger the door running for years, but am keep to get it all hooked up to HomeKit. I am currently adding feed back that will indicate the state of the door. Open, closed, opening, closing. This will be 2 or 3 pins to the RPi.
I am still reading they HomeKit documentation to see what is possible and I am not sure how much of this will work, but that's why I am here, to learn and work it out. This is my current idea... Initially the GarageDoor support would have 4 functions to tell HomeKit the state of the door (open, closed, opening, closing) and a callback for when the HomeKit button is pressed on an IOS device. Something like what is below. To start with the actual door control would be seperate. That way you could use the service to control anything you like and control it at your leisure. To progress from this, add support for the pigpio module and be able to simply set the pin numbers for the relay and feedback pins and the rest takes care of its self.
garageDoorService = GarageDoorService() garageDoorService.set_callback(callback_function) garageDoorService.set_open() garageDoorService.set_closed() garageDoorService.set_opening() garageDoorService.set_closing()
Ah ok :) you want to use this project to build a custom garage opener. Very cool!
You are aware of the "HomeKit Accessory Protocol SpecificationNon-Commercial Version Release R2" Document published by apple? Chapter 8 and 9 might contain useful information.
I start back at work tomorrow so will have less time. But have started reading and will look at adding what I can soon.