Im endeavouring to install HAASKA on my HA, which is installed in a docker container, on a Synology ds219+. I use a reverse proxy through the sysnolgy application portal to direct my traffic to the docker container.
I have no problems accessing HA via HTTPS using my duckdns address, routed through the reverse proxy. the reverse proxy directs the HTTPS port 443 to my HTTP 8123 port.
my configuration has the following entry to support alexa:
alexa:
smart_home:
When i run the test script from the part 3 of the wiki, changing to my personal details i get a 405 error.
"url": "https://ha.myduckaddress.duckdns.org/api",
"bearer_token": "eyJ0eXAiOiJ**************************************DkxfQ.x9R1svbsxk5mH6gURFo76ZEC_UWJFFFVydyjkrg-5D8",
"debug": false,
"ssl_verify": true,
"ssl_client": []
}
gives me a response as follows:
Response:
{
"errorMessage": "405 Client Error: Not Allowed for url: https://ha.********.duckdns.org/api/alexa/smart_home",
"errorType": "HTTPError",
"stackTrace": [
[
"/var/task/haaska.py",
111,
"event_handler",
"return ha.post('alexa/smart_home', event, wait=True)"
],
[
"/var/task/haaska.py",
66,
"post",
"r.raise_for_status()"
],
[
"/var/task/requests/models.py",
940,
"raise_for_status",
"raise HTTPError(http_error_msg, response=self)"
]
]
}
Request ID:
"1af4023b-0a3e-****-****-********"
Function Logs:
START RequestId: 1af4023b-0a3e-4dcb-96e2-4697cfc803e2 Version: $LATEST
405 Client Error: Not Allowed for url: https://ha.**********.duckdns.org/api/alexa/smart_home: HTTPError
Traceback (most recent call last):
File "/var/task/haaska.py", line 111, in event_handler
return ha.post('alexa/smart_home', event, wait=True)
File "/var/task/haaska.py", line 66, in post
r.raise_for_status()
File "/var/task/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Not Allowed for url: https://ha.*************.duckdns.org/api/alexa/smart_home
END RequestId: 1af4023b-0a3e-4dcb-96e2-4697cfc803e2
REPORT RequestId: 1af4023b-0a3e-4dcb-96e2-4697cfc803e2 Duration: 735.98 ms Billed Duration: 800 ms Memory Size: 128 MB Max Memory Used: 53 MB Init Duration: 274.42 ms
If anyone has any advice to offer on 405 returns on setups such as mine, it would be much appreciated.
tony