I get : {"result": "error", "message": "405: Method Not Allowed"} but otherwise, everything else is ok with the API, such as /api/services… Amazon also complains it can’t use the URL. I’m not sure what is going wrong?
Are you forwarding port 443 to port 8123 the internal IP of your HA server like the instructions suggest? If so, then you don’t need to specify the port in the return URL.
Should work. Can you get to HA by going to https://jamiesaunders.duckdns.org? It doesn’t seem to work for me. I should at least get a login page. You need to check that first.
So, after spending hours with “I don’t understand, I know what I’m doing and this should be working” and the NAT redirecting me from the URL to the local IP fine.
… I restarted my crappy ISP provided router and it fixed it. That’s all it took.
Great job getting that sorted out. But I’m wondering if the problem is the port.
On my system, I have the router redirecting all traffic on port 443 to port 8123 on my Pi. This way, when I type in:
https://mydomain.org
It goes right to my HA instance on the P without having to specify the port. Since this is the way I started, using the directions on @brusc’s video on setting up Let’s Encrypt, I don’t know for sure but I would bet that Amazon may be having a problem with port argument in the URL.
Well, regardless of whether it is accessible outside or not (which it is), the API is returning nothing. I’m actually getting a 404 now I’ve just tried.
Are you having problem with Let’s Encrypt, or with the API returning a method not allowed?
405 errors mean the method (GET, POST, PUT, etc.) you are using to access the endpoint (HA API) isn’t valid. Check the URL you are using to speak to the HA API.
404 errors mean there’s nothing on that end responding. That’s a communications issue.
If so, I still think this is why you are getting the method not allowed error. I think AWS requires a ‘straight’ SSL path, without a port. I don’t think you can redirect SSL port 443 to 8123 within the URL; AWS is probably not allowing that.
You guys have to go into your router and forward requests from port 443 on your HA host to redirect to 8123. It’s going to be a little different for each router so I can’t really tell you how to do yours but you can get a good idea on how it works from watching this video (@brusc for the win once again!) :
Once you can go to your HA instance with a straight https://yourdomain.duckdns.org WITHOUT the port 8123, you should no longer get the 405 error. I’m pretty sure that’s why you are getting “Method not allowed”; because AWS doesn’t allow you to specify a port in the URL.
Annoyingly port forwarding on my ISP supplied router will only let me do same external to same internal port. I don’t think the port matters at all. Having the port number wouldn’t affect it in any other situation, plus the API is reporting as method not allowed, even in the browser (so that’s a GET request)