shauntarves / wyze-sdk

A modern Python client for controlling Wyze devices.
The Unlicense
313 stars 49 forks source link

API_key is a problem if it contains 'shell' special chars #146

Closed RMCob closed 10 months ago

RMCob commented 1 year ago

I generated my api_key and key_id on the Wyze site. The api_key had the vertical bar ("|") symbol in it and no amount of escaping it with either a backslash ("\") or quoting the entire string ("api_key") made a difference. Then I went back to the Wyze site and deleted the old api_key and key_id and generated new ones checking that there were no 'special' characters. After that everything worked properly.

shauntarves commented 10 months ago

@RMCob,

Thanks for pointing this out...unfortunately, escaping strings is just something that has to be dealt with when doing any kind of programming. Out of curiosity, were you having issues when trying to use/specify the string in a command line/terminal/shell or when trying to run a file that included a variable being set to the problematic string?

RMCob commented 10 months ago

@shauntarves I had entered the apy_key and key_id via the Homebridge UI to store them in its config file for later use by my plugin when it called your Python functions for the vacuum. I guess that would be "...when trying to run a file that included a variable being set to the problematic string."