Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Hubitat for power device #834

Closed
wants to merge 2 commits into from
Closed

Conversation

kevdliu
Copy link

@kevdliu kevdliu commented Apr 2, 2024

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

  • device_id: ID of the smart switch device
  • maker_id: ID of the Maker API application. Maker API is the Rest API server for Hubitat.
  • token: Access token for Maker API
  • status_delay: Delay between controlling the smart switch and refreshing its state

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
Copy link
Owner

Arksine commented Apr 4, 2024

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
Copy link
Author

kevdliu commented Apr 4, 2024

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!

@kevdliu kevdliu closed this Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants