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

Enable Self-signed TLS Support #10

Open
BrookeDot opened this issue Feb 16, 2024 · 1 comment
Open

Enable Self-signed TLS Support #10

BrookeDot opened this issue Feb 16, 2024 · 1 comment

Comments

@BrookeDot
Copy link

I recently installed a self-signed certificate to my docker install of Home Assistant. This broke the Flick Hub connection. I was hoping I could just add verify_tls : false to the API endpoint but think it is actually Flic that is denying the request, not home assistant.

I updated the exports.SERVER_HOST to use https and then was successful in adding options.verify_ssl = false; on line 89 of ha.js:
https://github.com/blunan/flic-hub-home-assistant-module/blob/main/flic_hub_module/ha.js#L88

But I am still getting the Error: "TlsFailure" response. Any thoughts?

Request: { 
"method":"POST",
"url":"https://192.168.x.xxx:8123/api/states/binary_sensor.flic_XXXX_connectivity",
"content":"{
    \ "state\":\"on\",
    \"attributes\":
            {\"device_class\":\"connectivity\",
            \"icon\":\"mdi:bluetooth\",
           \"friendly_name\":\"My Flic Connectivity\"
      }
 }",
"headers":{"Authorization":"Bearer XXX",
"Content-Type":"application/json"},
"verify_ssl":false}

Error: "TlsFailure"

If there is a simple solution I'd be happy to open a PR so this could be added to the config as an option.

@BrookeDot
Copy link
Author

BrookeDot commented Feb 16, 2024

I now see that the TlsFailure method is indeed coming from the FlicSDK's HTTP Class 🤔
https://hubsdk.flic.io/static/documentation/#39_http_class

I asked in the Flic forms to see if anyone there has any ideas as I'm not seeing an easy way to disable TLS on the Flic end:
https://community.flic.io/topic/18418/allow-insecure-tls-with-the-http-module

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

No branches or pull requests

1 participant