Nekmo / amazon-dash

Hack your Amazon Dash to run what you want.
MIT License
829 stars 67 forks source link

Connection errors #113

Closed feetie closed 5 years ago

feetie commented 5 years ago

Put an x into all the boxes [ ] relevant to your issue (like this: [x])

What is the purpose of your issue?

I have been unable make them dash button work without errors when testing with Home Assistant. The button was discovered and the yml configuration passes.

Here is my amazon-dash.yml file contents (mydns replaces actual name):

settings:
delay: 10
devices:
00:FC:BC:24:1F:28:
name: Living_Room_plug_switch homeassistant: https://mydns.asuscomm.com:8123 event: toggle_Living_Room_plug # Event name to send access_token:

When I run the command: sudo amazon-dash test-device 00:FC:BC:24:1F:28 --config /etc/amazon-dash.yml

I get the following error: Exception on request to https://mydns.asuscomm.com:8123/api/events/toggle_Living_Room_plug: HTTPSConnectionPool(host='mydns.asuscomm.com', port=8123): Max retries exceeded with url: /api/events/toggle_Living_Room_plug (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x75aaa550>: Failed to establish a new connection: [Errno 111] Connection refused',))

I also tried "access" instead of "access_token" using HA api password in the yml but get same error

Any help is appreciated!

Nekmo commented 5 years ago

Your url is not accessible from your server. It can be a problem with DNS or the remote server.

feetie commented 5 years ago

Thanks for the reply. I'm a bit of a novice...

I am able to access HA using the DNS on other machines on my local network via web browser. Why would this not work from my Raspberry PI on same network?

Nekmo commented 5 years ago

Sorry, I don't know how you have configured your network, but you can do tests on your raspberry pi using curl: curl http://yoururl

feetie commented 5 years ago

I found the problem with my router settings. I port forwarded 8123 to 8123 & I can now use my url for both internal and external access.

Thanks Nekmo for your time and creating a nice application!

Nekmo commented 5 years ago

You are welcome :)