Giter VIP home page Giter VIP logo

Comments (7)

thenewwazoo avatar thenewwazoo commented on August 19, 2024

In the Caseta case, you have to initiate a certificate signing request, and then press a button on the back of the hub that is right next to the serial number. It's always bugged me that you have to know the IP address of the device (which may be harder for some users to figure out). Even if I used mDNS to discover the new hub, it may be necessary to require either the serial number or the IP address for disambiguation, but that is probably a pretty rare case.

I suspect the cert generation script could:

  • If no serial number supplied, do an mDNS lookup for hubs
  • If multiple hubs discovered w/o provided s/n, fail
  • Connect in physical access mode, prompt user to press button
  • Generate certificates
  • Emit s/n alongside certificates

Right now I use a regex to extract the s/n from the hostname, and a TXT record is a much, much better solution.

I don't think this would be super hard to write.

from homebridge-lutron-caseta-leap.

JJTech0130 avatar JJTech0130 commented on August 19, 2024

I was hoping that perhaps the script could be re-implemented in TypeScript, and then using a mechanism similar to homebridge-hue's prompt you to press the button during discovery, and log the credentials so that you could permanently add them to your config (or not)

from homebridge-lutron-caseta-leap.

JJTech0130 avatar JJTech0130 commented on August 19, 2024

And perhaps if you could detect whether the link button is pressed and there are multiple hubs, pick the one with the link button pressed first

from homebridge-lutron-caseta-leap.

thenewwazoo avatar thenewwazoo commented on August 19, 2024

@JJTech0130 I'm working on this UI right now. Any interest in being a tester? 😃

from homebridge-lutron-caseta-leap.

JJTech0130 avatar JJTech0130 commented on August 19, 2024

While I'm more than willing to help, I don't actually have a Caseta system, so I don't think I'd be the best tester 😂

from homebridge-lutron-caseta-leap.

thenewwazoo avatar thenewwazoo commented on August 19, 2024

I just dropped a beta that adds bridge discovery. What happens when you try to use it? 😂

from homebridge-lutron-caseta-leap.

thenewwazoo avatar thenewwazoo commented on August 19, 2024

Okay, so thanks to some awesome users testing this for me, the bridge discovery code is looking pretty good. The Homebridge settings UI will now populate any bridges it finds (that answer to _lutron._tcp PTR lookups). It then asks for a SRV record to extract the serial number. Caseta bridges don't have the TXT record you mention:

Lutron\032Status._lutron._tcp.local. 10	IN SRV	0 0 22 Lutron-032e7e88.local.
Lutron\032Status._lutron._tcp.local. 10	IN TXT	"MACADDR=90:70:65:e3:8f:25" "CODEVER=08.07.12f000" "DEVCLASS=08040100" "FW_STATUS=1:NoUpdate" "NW_STATUS=InternetWorking" "ST_STATUS=good" "SYSTYPE=SmartBridge"
Lutron-032e7e88.local.	10	IN	A	192.168.1.151
Lutron-032e7e88.local.	10	IN	AAAA	fe80::9270:65ff:fee3:8f25

I'm curious to know if other device types have similar records.

In any case, the bridge finder now returns the systype along with IP and serial number information. The user of the BridgeFinder is responsible for managing secrets and constructing the SmartBridge object. Presumably it would be the same for some other bridge type.

I'm going to go ahead and close this up, since I think it fulfills the request (no need for users to discover their serial numbers and run a script to get the cert).

from homebridge-lutron-caseta-leap.

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.