Nekmo / amazon-dash

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

SSIDs containing blanks cannot be configured #161

Closed leres closed 3 years ago

leres commented 3 years ago

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

What is the purpose of your issue?

Guideline for bug reports

You can delete this section if your report is not a bug

How to get your version:

amazon-dash --version
python --version
pip --version
easy_install --version

Description

I have dash buttons that are currently associated with one SSID (that contains a blank) and I'm trying to move one to a different SSID that also contains a blank.

One problem is that the wifi network search fails to find the network because the networks returned by ConfigureAmazonDash.get_networks_availables() have escaped values (e.g. My%20Network). I solved that by escaping the ssid used in the search and can see the parameters being sent to the button:

/downloads/?amzn_ssid=My+Network&amzn_pw=SimplePassword

but this doesn't work (the button flashes red when I attempt to use it). I tried using urllib.parse.quote() to do that parameter quoting:

/downloads/?amzn_ssid=My%20Network&amzn_pw=SimplePassword

but that fails as well.

What I Did

amazon-dash configure --ssid 'My Network' --password 'SimplePassword'
Nekmo commented 3 years ago

Fixed in PR #160, thanks!