Support for control of HomeKit bulbs and switches (testing required!)

Love this development.

I will be able to test the Logi Circle 2 camera (and movement sensor) when this platform advances

Sorry to keep bugging… I use the Home.app to pair and then it asks to share my WiFi is all and then it “just works”. What would this flow look like to dissociate the device with the Home.app (presumably)? My options on the device it seems are just to reset WiFi (WAC) or factory reset the device.

Here’s the manual if it helps? https://www.leviton.com/en/docs/DI-000-DH6HD-02A-W.pdf

Or, maybe Logitech play nice and gives us an official API (they have an API they give to their business affiliates). Just sent them a new question regarding this. Fingers crossed.

So after you do a wifi reset, you use the iOS Home app to configure the wifi? As far as I can tell that’s not part of the HomeKit spec, so I’ve got no idea how it’s doing that. Can you do wifi configuration using the Leviton Decora app instead?

Unfortunately there’s no support for BTLE devices yet.

The Leviton app just seems to use Homekit so it uses the same pairing and WiFi sharing mechanism. Thoughts?

Is it prompting for a HomeKit passcode at any point?

Yes, just before the Homekit passcode it asks if it can have access to share WiFi, not sure if I bail out after I accept that then it’s good?

Is there maybe a way to manually dissociate with HomeKit without the device knowing?

Yes, do the wifi setup but don’t enter the passcode.

There is a way to do this, I just got to the point where I could pip3 install homekit on hass.io.

(Disclaimer: this is my first week playing with homeassistant, or docker for that matter)

  1. log in to the host device (not with the ssh add-on, which runs in its own docker container; check the methods for adding your ssh pubkey to authorized_keys then log in on port 22222)

  2. start a shell in the homeassistant container; use docker container list to get the right id, then execute

docker exec -it $CONTAINER_ID /bin/bash

  1. install dependencies

apk --no-cache install gcc python3-dev linux-headers musl-dev gmp-dev mpfr-dev mpc1-dev make

  1. install homekit

pip3 install homekit

Don’t know if it is just me, but I had to install dependencies with apk add --no-cache gcc python3-dev linux-headers musl-dev gmp-dev mpfr-dev mpc1-dev make. With that modification, everything installed fine, but I’m still getting the “Invalid Config” error after restart. Any ideas?

Yea I got the dependencies installed but when you restart HA it seems to restart the container which wipes out the changes. Its all a little bit over my head.

What’s the error in the log?

Yes installing the deps inside the container is not ideal. My PR to the main repo got merged so this should be fixed in the Docker builds moving forward, but may need to wait to a new release for Hassio.

2018-05-05 23:57:09 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-05-05 23:59:17 ERROR (SyncWorker_18) [homeassistant.util.package] Unable to install package homekit==0.6: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ti3ya584/cffi/
2018-05-05 23:59:17 ERROR (MainThread) [homeassistant.requirements] Not initializing homekit_controller because could not install requirement homekit==0.6
2018-05-05 23:59:17 ERROR (MainThread) [homeassistant.setup] Setup failed for homekit_controller: Could not install all requirements.

No go here, any other ideas? Is removing it from HomeKit (Home.app) not sufficient, I tried but maybe something else I am missing. It’s also odd homeassistant stays with the message of it’s already paired.

If Homeassistant says it’s paired, it’s because the device is telling us that it’s paired :slight_smile: Try resetting it, configuring it to join your wifi network again, and then adding it to Home Assistant?

Only other result I got was bad code (but the code isn’t bad because the same code works in Home.app)

I tried all the things, standing upside down on my head with one toe on the paddle switch while using my tongue to allow wifi access and my dog hitting submit in Home assistant still nothing.

If anyone reading this gets Leviton dimmers or switches to work please respond.

After the 69.0 update I was able to configure my Koogeek P1EU Plug successfully. But the Koogeek KH02CN wall switch, which is a 2-gang switch, although was added, is not appearing in entities of HA in any form. (none of both switches or as one switch)
Further I would exclude Homekit component and Homebridge-Addon from Homekit Controller discovery, since they only expose HA devices to Homekit.
(And maybe add a ignore button while configuring new devices for those ones that we dont want to be added and always being displayed on the webpage?)