Arksine / moonraker

Web API Server for Klipper
https://moonraker.readthedocs.io
GNU General Public License v3.0
1.02k stars 392 forks source link

Support Hubitat for power device #834

Closed kevdliu closed 3 months ago

kevdliu commented 3 months ago

This PR adds support for setting up a Hubitat connected smart switch as a power device. It requires the following config parameters:

I have my Hubitat hub set up with a self-signed certificate, so I also needed to disable certificate verification for it to work. This PR also adds an universal validate_ssl_cert config parameter that disables ssl cert verification for power device requests.

Arksine commented 3 months ago

Thanks. I'm no longer merging pull requests for additional HTTP implementations. Instead I recommend using the Generic HTTP type to support devices not natively available. Frankly, there are too many vendors offering http switches and its not feasible to maintain all of them in Moonraker. This was the motivation for creating the generic type.

With regard to SSL, I think that the client should always validate the certificate when https is configured. When using self signed certificates you should install your own root certificate on the machine hosting Moonraker. See #799 for some discussion on this topic.

kevdliu commented 3 months ago

Ah that's unfortunate but totally understandable. I appreciate the in-depth explanation. I'll look into installing my CA cert on the device. Thanks!