yonatanp / electrasmart-custom-component

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

cant run electrasmart-auth after pip install #16

Closed xposionn closed 2 years ago

xposionn commented 3 years ago

cant run electrasmart-auth after pip install.

yonatanp commented 2 years ago

Hi @xposionn , were you able to resolve this issue? If not, could you share your log and error messages? Usually these issues stem from general setup issues such as python path configuration.

noamshn commented 2 years ago

Hi Yonatan, this problem happens to me too. The error is "name 'electrasmart' is not defined". Do you know how I can solve it?

yonatanp commented 2 years ago

Could you share the command and the full output? (Masking credentials of course)

noamshn commented 2 years ago

NameError Traceback (most recent call last)

in () ----> 1 electrasmart-auth NameError: name 'electrasmart' is not defined The command was electrasmart-auth
yonatanp commented 2 years ago

Something here is very wrong. It is as if you are trying to run the library name as a python script. Could you provide the full command that you used? A screenshot might help clarify the context.

noamshn commented 2 years ago

IMG_20220126_214353

I added a photo. Im dont have any background in software so maybe I made a mistake. I ran the code on google colab.

yonatanp commented 2 years ago

No worries! Your screenshot was very helpful, now I understand the full context. What happens is that "electrasmart-auth" is a program to run from command line, not normally from within colab's python.

Here's what I suggest you try: First, add an exclamation point before the "electrasmart-auth" command. This tells colab to run this as a normal command, not in python. Second, the program takes your 10-digit phone number as parameter.

So instead of

[2] electrasmart-auth

try running e.g.

[2] !electrasmart-auth 0546667788

assuming that 054 6667788 is your phone number, already registered to electrsmart in their mobile app.

(EDIT: corrected username)

noamshn commented 2 years ago

Thank you very much, it worked! :)