Code Monkey home page Code Monkey logo

Comments (3)

ebaauw avatar ebaauw commented on August 24, 2024

I think I figured out how to do this. As always, please let me know your thoughts.

  • Create a new StatelessProgrammableSwitch service for the Hue bridge accessory. As of iOS 10.3, the build-in Home app should treat the Hue bridge accessory as programmable switch instead of Not Supported (see issue #54);
  • When the link button on the bridge is pressed, the bridge config.linkbutton attribute changes to true. Homebridge-hue detects this and updates the programmable switch's InputEvent, so the corresponding action is triggered;
  • Typically, linkbutton stays on for a minute or so, so a next press would only be registered after that time. To overcome this, homebridge-hue immediately resets linkbutton to false. As a consequence, pressing the button on the bridge no longer works for linking a new application to the Hue bridge (but who would want to do that when you have Homekit? ;-)
  • Oh, you would? Actually, so would I. I'll create a custom service with Enabled for the Hue bridge accessory to set linkbutton without triggering the programmable switch and without homebridge-hue immediately resetting it. Note that while Enabled is set, link button presses won't be registered. Also note that Home won't support the custom service, so you'd need to use Eve or another HomeKit app;
  • Of course, the new services would be optional, through a config.json setting.

While I'm at it, I could also create another custom service with Enabled for touchlink and one for searching for new lights and sensors. However, until homebridge-hue supports dynamic platform accessories (issue #4), you would have to restart homebridge to expose any newly found lights and sensors.

from homebridge-hue.

jojost1 avatar jojost1 commented on August 24, 2024

Typically, linkbutton stays on for a minute or so, so a next press would only be registered after that time. To overcome this, homebridge-hue immediately resets linkbutton to false. As a consequence, pressing the button on the bridge no longer works for linking a new application to the Hue bridge (but who would want to do that when you have Homekit? ;-)

Personally, this option sounds the most appealing to me. This will make sure the button will always trigger the HomeKit-scene, and it will be fully functional through iOS 10(.3) Home, the application I like to use most of the time.
I don't have to link a new application to the Hue Bridge often, when I do I can just close Homebridge for 1 minute.. I do understand some people do it way more often, but this option is most appealing to me. My two cents.

from homebridge-hue.

ebaauw avatar ebaauw commented on August 24, 2024

Added support for the physical link button on the bridge as programmable switch in v0.4.0. Consequently, the iOS builtin Home app will no longer show an unsupported accessory per Hue bridge, but a programmable switch instead. homebrige-hue resets the linkbutton after pressing it, so it can register the next press. To register a new application to the bridge, use the Link attribute of the custom service for the Hue bridge. Unfortunately, the iOS builtin Home app doesn't support this service, so you need another HomeKit app, like Eve. Also added a Touchlink characteristic to this service, to enable touchlink from HomeKit. Link button support can be disabled by specifying "linkButton": false in config.json.

from homebridge-hue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.