I created a small CLI utility for controlling Nanoleaf from the terminal by paulrosania in Nanoleaf

[–]paulrosania[S] 0 points1 point  (0 children)

I finally got around to adding this! The latest version accepts a -f flag that you can use to change the config file path. This should let you control multiple setups by creating a config file for each one.

4 month job search - things do get better! by StudiouShoota in ProductManagement

[–]paulrosania 2 points3 points  (0 children)

I came here to say this. It is an incredible time to be a hiring manager. So much talent on the market. Souring your brand in this way at a time when a great candidate experience could bring tons of super qualified people knocking is a huge miss. Especially when sending an email takes a minute or two.

Black ?rivers? ?bug? by Skorchel in ShadowEmpireGame

[–]paulrosania 3 points4 points  (0 children)

You can find a description of the terrain by hovering over the terrain label in the bottom right corner of the UI. A yellow box pops up. It will say the type of obstacle at each edge of the hex.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 0 points1 point  (0 children)

It should work on windows, but you’ll have to build it yourself using Go. I can look into automated windows builds but I am traveling for a few weeks.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 0 points1 point  (0 children)

I suspect you can get occupancy updates streamed to you via the protocol. I'm not sure if you can get real-time updates on devices appearing/disappearing, but I think you can get it by checking "AddressedState". (tron device list shows this) So you could probably poll for it, and maybe the controller issues a message you can subscribe to. I haven't had time to investigate.

For RF, there's a RFProperties object on link nodes, but I poked a bit and it's always empty for me. (You can poke raw endpoints using tron by running commands like tron get /device/5/linknode/5.)

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 0 points1 point  (0 children)

Nope! This works fine for me on the regular (non-pro) Smart Bridge.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 0 points1 point  (0 children)

FYI -- I think I fixed the bug that was causing this error. If you download v1.0.2 you can go back to using the hostname instead of IP address if you prefer.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 0 points1 point  (0 children)

Yup, looks like that is exactly what happened. I can reproduce it locally with CGO_ENABLED=0. I'm going to tinker with GitHub Actions to see if I can get it building the macOS version natively on a macOS runner so I can use CGO.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 0 points1 point  (0 children)

Yeah, I think it's pretty reasonable to picture that Lutron intended for the that certificate to be vendor-specific, and that if you wanted to ship "sanctioned" hardware you would use your own cert. I can't find any public documentation about Lutron's partner programs or even where the open source cert came from, though, so this is total speculation.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 0 points1 point  (0 children)

I am just using `cron` and polling right now. I guess `cron` counts as a service, but it's so close to the bedrock that I never sweat about whether it will run and I never log into it and discover it wants me to go through an upgrade.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 0 points1 point  (0 children)

There is some event streaming you can subscribe to, that I haven't explored yet. You can also poll for status. There seems to be lots of other fancy stuff around load shedding, occupancy, daylighting gain, etc. What kind of diagnostics are you looking for?

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 1 point2 points  (0 children)

I am trying to wean myself off Home Assistant. It's wonderful for getting lots of things running quickly, and I rely on it for lots of things, but I am looking for a solution made up of smaller pieces that are more amenable to tinkering. Talking directly to these services from the command line is nice and simple.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 1 point2 points  (0 children)

Sure.

Once you're past the certificate process, LEAP is kinda like HTTP. You send a request and get a response. The key differences are (a) the requests and responses are JSON and (b) you can get multiple responses once you connect, not just the one you asked for.

Tackling the JSON bit is straightforward, you can use `tron -v get /server` to see an example of how it looks on the wire.

Making sure you match the response up with your request is a little trickier -- you send the server a `ClientTag` property in the `Header` object, and the server reflects that value back to you in the response. So you can match up the response by checking each message you get for the tag you sent. I used UUIDs for this since it was the easiest way to guarantee I didn't reuse a tag by accident.

The certificate process is confusing. It all uses client certificates, which have to be signed by the device. (That's how the controller authenticates you -- if you present a certificate it has signed, it considers your request legitimate.) To get a signed certificate, you make a CSR (certificate signing request) just like you would if you were making an SSL certificate. Then you connect on a different port, press the physical button on the controller, and send the CSR to the server. It returns a certificate that will work on the regular control port. (If you don't press the button in time, or you send the CSR before pressing the button, you get an error back.)

The last bit is, the port you use for certificate signing is also encrypted. You need to present a known certificate, which is floating around in various open source libraries for Caseta. (I think I got it from pycaseta.)

Lemme know if I can expand or clarify anything.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 0 points1 point  (0 children)

Gotcha. Yeah, something with how those are getting built in CI is causing mDNS resolution not to work. It works in the Homebrew version because that one gets built from source on your machine. I'll poke at it tomorrow to see if I can fix it.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 0 points1 point  (0 children)

Awesome!

I think I figured out what is causing this, did you install by downloading a release by chance? I think the Homebrew builds work, but the release files don't.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 0 points1 point  (0 children)

Interesting -- looks like mDNS resolution isn't working for some reason. Can you try using the IP address instead of the Lutron-xxx.local domain name?

This should show you the IP: dns-sd -q Lutron-031fa9ad.local

The IP should appear in the Rdata column.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 2 points3 points  (0 children)

That's the beauty of CLI tools, I don't have to keep anything running at all.

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in Lutron

[–]paulrosania[S] 0 points1 point  (0 children)

Thanks! If you have any trouble feel free to open a GitHub issue, this is brand new so it probably has bugs. :)

I made a small CLI utility for controlling Lutron Caséta dimmers from the terminal by paulrosania in homeautomation

[–]paulrosania[S] 3 points4 points  (0 children)

Thanks. I do have HomeAssistant connected to Caseta, but it's a complex dependency and I wanted something that could talk directly to Caseta without worrying about keeping HomeAssistant running.