Control Electra Wifi over IP/Internet

SIRI, CORTANA, ALEXA, ECHO, GOOGLE HOME, HOME PAD, שלטים חכמים, KEY PADS, אפליקציות
jaybbb (פותח השרשור)
חבר שרק התחיל
חבר שרק התחיל
הודעות: 10
הצטרף: ינואר 2020
נתן תודות: 0
קיבל תודות: 0

Control Electra Wifi over IP/Internet

נושא שלא נקרא #1 

Hello, sorry for posting in english but my hebrew is not that great.
I have in my house an electra A/C that I can control by IR or by Wifi using the Electra Smart app.

I would like to integrate the A/C control in OpenHab and I'm wondering if someone reversed the IP protocol to be able to control the A/C without using the really bad Electra app.

I know it's possible to add a Wifi to IR like Sensibo or Tado but as the Electra is already connected to Wifi I would prefer to control it directly.

Thanks in advance for your help!

dr0r
חבר ותיק
חבר ותיק
הודעות: 1685
הצטרף: נובמבר 2018
מיקום: תל אביב
נתן תודות: 46 פעמים
קיבל תודות: 256 פעמים

Re: Control Electra Wifi over IP/Internet

נושא שלא נקרא #2 

@jaybbb

Hi,
Do you know what is the manufacturer of the A/C?
Specifically, who manufactured the WiFi module?

I've reverse engineered the protocol used by (some) Tornado ACs built by Hisense, see here, but I don't know if it will fit yours.

דומיקון
סמל אישי של משתמש
עוסק בתחום
עוסק בתחום
הודעות: 886
הצטרף: מאי 2015
מיקום: מרכז השרון
נתן תודות: 50 פעמים
קיבל תודות: 146 פעמים

נושא שלא נקרא #3 

[size= 12px]Hello,
I've done is with Tadiran Wifi, I believe it'll work just the same.
steps to perform:
1. connect the AC to your wifi using the manfufacturer's method (open account etc) .
2. install the control software on your cell phone and start operating the AC from your phone.
3. install software called "Packet Capture" on your (are you on?) Android [/size]
[size= 12px]https://play.google.com/store/apps/deta ... ture&hl=en

this way you'll see the commands sent including uesr/password and every command the app sends.
see example attached


please share what you find...!
Good luck
Uri [/size]
[size= 12px][/size]
נא להרשם/להכנס לחשבון בפורום על מנת לצפות בקבצים או בתמונות המצורפים לשרשור
דומיקון - בית ישראלי חכם יותר
נציגי חברת Vera Control LTD בישראל
הפתרון המלא לבית חכם ישראלי בטכנולוגיית Z-Wave בתדר 916 MHz באישור משרד התקשורת ומכון התקנים
http://www.domicon.co.il/

jaybbb (פותח השרשור)
חבר שרק התחיל
חבר שרק התחיל
הודעות: 10
הצטרף: ינואר 2020
נתן תודות: 0
קיבל תודות: 0

Re: Control Electra Wifi over IP/Internet

נושא שלא נקרא #4 

@ dr0r
·

Do you know how to identify the manufacturer of the wifi model?

Best

jaybbb (פותח השרשור)
חבר שרק התחיל
חבר שרק התחיל
הודעות: 10
הצטרף: ינואר 2020
נתן תודות: 0
קיבל תודות: 0

נושא שלא נקרא #5 

@Domicon
·

I'll look into this, and see if I can get all the request and work on this :)

dr0r
חבר ותיק
חבר ותיק
הודעות: 1685
הצטרף: נובמבר 2018
מיקום: תל אביב
נתן תודות: 46 פעמים
קיבל תודות: 256 פעמים

Re: Control Electra Wifi over IP/Internet

נושא שלא נקרא #6 

@jaybbb

You can take a look at the module itself in the A/C. It is usually located at the upper right corner.
In any case, doing the packet capture is a good idea, since there are multiple manufacturers running the same protocol.

jaybbb (פותח השרשור)
חבר שרק התחיל
חבר שרק התחיל
הודעות: 10
הצטרף: ינואר 2020
נתן תודות: 0
קיבל תודות: 0

נושא שלא נקרא #7 

So I'm currently out of the country but trying to work on it.

It seems that the app is using an Oauth2/Bearer token auth mechanism so you first have to query the login endpoint to retrieve your bearer token.

There is a first POST on https://us-south.appid.cloud.ibm.com/oa ... d14d/token to retrieve the tokens using login and password. Then using these tokens on endpoints : https://electraapiprod-b.mybluemix.net/ ... user_email}}, I can retrieve the full details of the account and the connected A/C Devices.

I need to see if when I'm home there is a direct connection between the AC and the smartphone or if the queries are always sent through the cloud.

Does this looks like the Tornado/Hisense devices?

dr0r
חבר ותיק
חבר ותיק
הודעות: 1685
הצטרף: נובמבר 2018
מיקום: תל אביב
נתן תודות: 46 פעמים
קיבל תודות: 256 פעמים

נושא שלא נקרא #8 

@jaybbb

This seems similar, but not using the same servers, so it's very likely a different protocol.
You should indeed sniff the packets it (hopefully) sends directly to the A/C. I hope it does, and that traffic does not require a server provided token (which Hisense does). Decompiling the APK can help.

jaybbb (פותח השרשור)
חבר שרק התחיל
חבר שרק התחיל
הודעות: 10
הצטרף: ינואר 2020
נתן תודות: 0
קיבל תודות: 0

נושא שלא נקרא #9 

@ dr0r
·That's exactly where I'm at, I've decompiled the SDK and started creating a ruby script to generate the data needed to login. From my understanding of the APK it seems that all queries are going to the server and then back to the A/C but I need to double check.

I'll be back in a few weeks so will know more when I'm there :)

Chura
סמל אישי של משתמש
חבר מביא חבר
חבר מביא חבר
הודעות: 4774
הצטרף: ינואר 2005
מיקום: Privilege 15
נתן תודות: 163 פעמים
קיבל תודות: 285 פעמים

נושא שלא נקרא #10 

דומיקון כתב:[size= 12px]Hello,
I've done is with Tadiran Wifi, I believe it'll work just the same.
steps to perform:
1. connect the AC to your wifi using the manfufacturer's method (open account etc) .
2. install the control software on your cell phone and start operating the AC from your phone.
3. install software called "Packet Capture" on your (are you on?) Android [/size]
[size= 12px]https://play.google.com/store/apps/deta ... ture&hl=en

this way you'll see the commands sent including uesr/password and every command the app sends.
see example attached


please share what you find...!
Good luck
Uri [/size]
[size= 12px][/size]
...
·

האמת שגם עשיתי משהו דומה, מצאתי את כל הפקודות שלהם, וגם את העוגיה שלהם.
אבל התעצלתי לכתוב מזה משהו לOpenHab
אתה עשית עם זה משהו ?

jaybbb (פותח השרשור)
חבר שרק התחיל
חבר שרק התחיל
הודעות: 10
הצטרף: ינואר 2020
נתן תודות: 0
קיבל תודות: 0

נושא שלא נקרא #11 

@Chura
·The goal would be to add support to this project https://github.com/deiger/AirCon for Electra, so be able to reproduce everything the electra app does, and add mqtt support using this project for openhab

Chura
סמל אישי של משתמש
חבר מביא חבר
חבר מביא חבר
הודעות: 4774
הצטרף: ינואר 2005
מיקום: Privilege 15
נתן תודות: 163 פעמים
קיבל תודות: 285 פעמים

נושא שלא נקרא #12 

אני עם תאדירן, לשמחתי יש רק שרת אחד שהוא מתקשר איתו, ועוד יותר לשמחתי שהוא בארץ.
אבל הפרוטוקול זוועתי.
Configure Terminal
Write Erase
reload
(6)

שלח תגובה

חזור אל “עוזרות קוליות, שליטה ובקרה”