But I was less happy when I tried to use my Amazon Dash ButtonâŚ
In fact, I use dasher (server to hack Dash buttons for home assistant). It send an url, which trigge a scene on HA local adress (192.168.X.X) :
{
ânameâ: âDepartâ,
âaddressâ: âxx:xx:xx:xx:xx:xâ,
âurlâ: âhttp://192.168.X.XX:8123/api/services/scene/turn_onâ,
âmethodâ: âPOSTâ,
âheadersâ: {âx-ha-accessâ: âxxxxxxxxxxxxxâ},
âjsonâ: true,
âbodyâ: {âentity_idâ: âscene.departâ}
}
How can I adapt this code to make a request on my secured HA, or disable certificat when Iâm connected in local on 192.168.X.X, or an other solutionâŚ
Iâm a beginner in network and I donât understand details⌠but if somebody has a solutionâŚ
An ugly solution is to run two HAâs, one to accept dash button command and then mirror that button to https HA though the api. A better solution is to use one of the bridges like this (not sure if it work to https)
To access my SSLâd HA instance frominside my network I must use both https AND the port number. It moans about an insecure connection as the certificate is signed to duckdns, but it does connect.
I have an access with a computer browser to âhttps://192.168.X.XX:8123â but it tells me that itâs unsecure.
I say that iâm aggree with that and I itâs works.
But when I put this url on my Dash button it doesnât work, because I canât access itâs unsecureâŚ
I can only think of one more thing here, and that is that the connection is being rejected because of no password. That is to say that when you used to access it locally you did not need to use the password, but now you are looping back through duckdns it requires one. If I understand the documentation correctly, this would be your code (replacing YOUR_URL and YOUR_PASSWORD where appropriate):
@anon43302295, I think I already tried this, unless api_password donât be my HA password but my duckdns password ?
Because in fact, in reality âheadersâ : {âx-ha-accessâ: âmy_HA_passwordâ}
I donât know how to say that my dash buttons donât need certificationâŚ
Or my second method (in my head) was to access to HA with local adress, because when certicates are uncommented in configuration.yaml, 192.168.X.X is bloqued. but if it was available, I could keep my dashButtonâs code as original !
Yeah, it should be your HA password, and I figured the âheadersâ bit was your HA password, but I just thought maybe itâs not getting that far because it is rejecting the connection when you first connect due to no password in the url.
I donât think you can have it as SSL for some and non-SSL for others, and if you can it is way over my head. Sorry I couldnât figure it out. Hope you get it worked out eventually