yonatanp / electrasmart-custom-component

Home automation integration with Electra Smart type air conditioners
30 stars 7 forks source link

IMEI and Token command doesn't work #7

Closed adizag closed 4 years ago

adizag commented 4 years ago

first - THANK YOU!!! I'm waiting for about two years for some great people like you to develop the Electra Smart integration...

After Install the client library

ezaguy@ezaguy-DELL:~$ pip3 install --user electrasmart
Collecting electrasmart
Collecting requests (from electrasmart)
  Using cached https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->electrasmart)
  Using cached https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2 (from requests->electrasmart)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->electrasmart)
  Using cached https://files.pythonhosted.org/packages/56/aa/4ef5aa67a9a62505db124a5cb5262332d1d4153462eb8fd89c9fa41e5d92/urllib3-1.25.11-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests->electrasmart)
  Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Installing collected packages: certifi, chardet, urllib3, idna, requests, electrasmart
Successfully installed certifi-2020.6.20 chardet-3.0.4 electrasmart-0.4 idna-2.10 requests-2.24.0 urllib3-1.25.11

the following command will not work- electrasmart-auth gives: electrasmart-auth: command not found

electrasmart-list-devices <imei> <token> (with the correct parameters): electrasmart-list-devices: command not found

GuyKh commented 4 years ago

@adizag make sure that the python install location is in PATH (Read this: https://geek-university.com/python/add-python-to-the-windows-path/ for windows) In general, I suggest you to open a ticket for https://github.com/yonatanp/electrasmart instead

yonatanp commented 4 years ago

@adizag, based on your followup issues (good work there, thanks!) I'm guessing you managed to solve this. I'm closing the issue for now.

adizag commented 4 years ago

Actually, I'm using Linux, so the windows path solution didn't assist me much. I'm not a programmer (only mech eng.....), so actually, my brother reverse-engineered your code in order to get the required data.

I'll open this issue again in the electrasmart repo. maybe try to be more common-not-programmers-people with the using instructions...? 🔢 :)

yonatanp commented 3 years ago

Way to go brother! I now understand the underlying issue here: the configuration flow for this component is too technical. I think there should be a built-in way to set up such things via the UI. Perhaps "Config Flow Handler" is the way to go: https://developers.home-assistant.io/docs/config_entries_config_flow_handler/ I'm not familiar with the details, but can read about it when I have some time. If anyone else feels like contributing this piece - or point to a relevant example - it would be most welcome.