Closed witten closed 5 years ago
Does setting your host
configuration variable to begin with https://
not work?
Good idea. That works! If this is the desired solution, then maybe this could just be changed into a documentation ticket, as others may also not be aware that a protocol can be included with the host
option. Thanks.
I've added it to the readme for now
Thanks!
Sadly, self-signed certificates result in an error. Adding -k after "curl" in functions.sh works, so maybe a config setting would be a good solution?
As far as I can tell, the current
functions.sh
post()
function unconditionally hits the$hass_host
with unencrypted HTTP, because the code does not specify the protocol. It would be great to optionally support encrypted HTTPS as well, because HTTPS is a valid configuration for even local Home Assistant installations, and certainly for remote-accessible ones.One idea is for "HTTP versus HTTPS" to just be a
openwrt_hass_devicetracker
configuration option, and then it could be passed tocurl
accordingly. However, a complicating aspect is that if the Home Assistant instance is using a self-signed cert, thencurl
may need a--cacert
parameter with a valid Certificate Authority cert file, or at worst,--insecure
.