hllhll / HomeAssistant-EKON-iAircon

EKON iAircon / Tadiran climate component written in Python3 for Home Assistant. On the bases of Gree Climate component for easier interfacing with HASS
GNU General Public License v3.0
14 stars 7 forks source link

Fix login and websocket to work with Airconnect+ #10

Closed rhayun closed 4 years ago

rhayun commented 4 years ago

its tested and working but i need someone to review this

hllhll commented 4 years ago

Hi, Awesome Thanks a-lot!

  1. Does it Break the compatibility with Tadiran connect?
  2. The captcha they've implemented is so awkward, that's how not any site should do captcha. It would probebly change when they figure it out that they did a crappy job....
  3. I Don't think that's a good idea to disable encryption by default, it's better as a configuration
rhayun commented 4 years ago
  1. as i know Tadiran connect is no longer working
  2. the captcha is not a real captcha - they only match the hidden field with a input text field - its dumb but its works
  3. i agree, feel free to do that - better way is to handle the ssl thing
yairabf commented 4 years ago

I tried the new code on my HA, keep getting these errors,

  1. self._ws = websocket.WebSocketApp(wssaddr,sslopt={"cert_reqs": ssl.CERT_NONE}, header=headers, cookie="; ".join(["%s=%s" %(i, j) for i, j in cookies.items()]),
    NameError: name 'ssl' is not defined

so I added the import SSL, but then I got this error: 2.

`self._ws = websocket.WebSocketApp(wssaddr,sslopt={"cert_reqs": ssl.CERT_NONE}, header=headers, cookie="; ".join(["%s=%s" %(i, j) for i, j in cookies.items()]),
TypeError: __init__() got an unexpected keyword argument 'sslopt'`
HawkUser commented 4 years ago

I tried the new code on my HA, keep getting these errors,

 self._ws = websocket.WebSocketApp(wssaddr,sslopt={"cert_reqs": ssl.CERT_NONE}, header=headers, cookie="; ".join(["%s=%s" %(i, j) for i, j in cookies.items()]),
NameError: name 'ssl' is not defined

so I added the import SSL, but then I got this error: 2.

`self._ws = websocket.WebSocketApp(wssaddr,sslopt={"cert_reqs": ssl.CERT_NONE}, header=headers, cookie="; ".join(["%s=%s" %(i, j) for i, j in cookies.items()]),
TypeError: __init__() got an unexpected keyword argument 'sslopt'`

are you running HassOS?

yairabf commented 4 years ago

yes

HawkUser commented 4 years ago

yes

I doubled check again with fresh new HassOS no problems exist, can you double-check perhaps there is updates for HassOS you didn't commit?

yairabf commented 4 years ago

ok, after another restart, It worked!