simbaja / ha_gehome

GE Home Appliances (SmartHQ) for Home Assistant
MIT License
323 stars 76 forks source link

Support for GE Split A/C Units #31

Closed simbaja closed 3 years ago

simbaja commented 3 years ago

This issue is for working through the support for GE Split A/C Units. If you have one of these units, please let me know if the latest dev release enables support for these within HA. @RobertusIT, we can continue the discussion from the gehome repository here.

LuddyR commented 3 years ago

Hello! I have the unit model APWA12YZBW, let me know if I could be of any help. Would be amazing to have home assistant integration. 👍 I think I have what could be considered a split unit.

I ran the dev branch last night and I couldn't get any integration happening.

Realized there was a new release, cleared out my old install and repository from HACS, installed v0.4.3-dev0 and added the integration, nothing showing for new devices.

simbaja commented 3 years ago

Actually, it looks like you have the last of the A/C types that GE makes, the Portable A/C unit. I haven't yet built support for that one yet, but with your help, I think we can get it in.

Basically, the first step is to head on over to simbaja/gehome which is the SDK for the GE appliances. You will need to run the websocket_example file that's in that repo. Some basic steps to follow:

  1. Make sure you have at least Python 3.8
  2. If you have VS Code, you can clone the repo, then install the cloned directory into a venv.
  3. If you're just running it standalone, it's easiest to clone the repo somewhere, then run pip install gehomesdk, then work through any dependency issues you might have with missing packages (may want to see simbaja/gehome#22 referenced above to help resolving some of those).
  4. Either way, you'll need to create a secrets.py file with your credentials.
  5. Once you run the example, it'll produce a log that we can use to figure out what features are available for your device and get them added to the SDK.
  6. Once added to the SDK, we should be able to enhance the HA integration to support it.

Welcome to the project, and please let me know if you have any questions!

Let's start a new topic over in the SDK for this discussion and leave this one for the Split A/C units.

RobertusIT commented 3 years ago

This issue is for working through the support for GE Split A/C Units. If you have one of these units, please let me know if the latest dev release enables support for these within HA. @RobertusIT, we can continue the discussion from the gehome repository here.

I have only at the moment, 2 same unit, not split, but separate. I have these units, in my Kitchen and my work room. I'll buy others same units, to put around my house, when integration will be completed

simbaja commented 3 years ago

Yep, those are Split A/C units (perhaps you might know them as ductless?). There's a part of it inside, and a part outside (which is why it's called split). It's the same device we've been working with on the SDK repo. You should be able to pull the latest dev version (either manually or through HACS) and we can work through the issues on the HA side.

RobertusIT commented 3 years ago

Yep, those are Split A/C units (perhaps you might know them as ductless?). There's a part of it inside, and a part outside (which is why it's called split). It's the same device we've been working with on the SDK repo. You should be able to pull the latest dev version (either manually or through HACS) and we can work through the issues on the HA side.

Oh i see about what you mean "split AC".

I don't understand the last part, you need others logs ? ( so i need to get one more time, .zip project , etc... ? )

simbaja commented 3 years ago

Nope, shouldn't need any more logs (unless there's an error in Home Assistant). Basically, you'll need to install the integration (either manually following the readme, or using HACS) into Home Assistant. You should use the latest dev release (0.4.3-dev0) or the "dev" branch from github.

Once installed, you will need to configure the integration using your username/password. After that, it should pick up your A/C unit and then it should give you climate entities that you can control from HA. I'll need your help to confirm that these entities are working correctly.

RobertusIT commented 3 years ago

Nope, shouldn't need any more logs (unless there's an error in Home Assistant). Basically, you'll need to install the integration (either manually following the readme, or using HACS) into Home Assistant. You should use the latest dev release (0.4.3-dev0) or the "dev" branch from github.

Once installed, you will need to configure the integration using your username/password. After that, it should pick up your A/C unit and then it should give you climate entities that you can control from HA. I'll need your help to confirm that these entities are working correctly.

I get https://github.com/simbaja/ha_gehome/archive/refs/tags/v0.4.3-dev0.zip

then unzip, put into custom components folder

reboot ha, then settings - integration - ge home, ask mail and pass, done.

image

Seems that no new entities

simbaja commented 3 years ago

Interesting, is there anything in the HA log showing an error or warning?

RobertusIT commented 3 years ago
Traceback (most recent call last):
File "/config/custom_components/ge_home/update_coordinator.py", line 299, in on_device_initial_update
self.maybe_add_appliance_api(appliance)
File "/config/custom_components/ge_home/update_coordinator.py", line 128, in maybe_add_appliance_api
api.build_entities_list()
File "/config/custom_components/ge_home/devices/base.py", line 116, in build_entities_list
e for e in self.get_all_entities()
File "/config/custom_components/ge_home/devices/sac.py", line 21, in get_all_entities
GeSacClimate(self),
File "/config/custom_components/ge_home/entities/ac/ge_sac_climate.py", line 65, in __init__
self._modes: ErdSacAvailableModes = self.api.try_get_erd_value(ErdCode.SAC_AVAILABLE_MODES)
File "/config/custom_components/ge_home/entities/common/ge_entity.py", line 21, in api
return self._api
AttributeError: 'GeSacClimate' object has no attribute '_api'
simbaja commented 3 years ago

Ok, try the "-dev1" release, it should fix this issue. Should just need to copy over and restart HA, config should be done already.

RobertusIT commented 3 years ago

Ok, try the "-dev1" release, it should fix this issue. Should just need to copy over and restart HA, config should be done already.

image

It create entities, now i'm testing if works like expected.

Missing Swing entity or i didn't see it.

Seems that works for others modes! I'm so excited

simbaja commented 3 years ago

OK, that one should be fixed, let me know if it appears and if everything else is working correctly.

RobertusIT commented 3 years ago

OK, that one should be fixed, let me know if it appears and if everything else is working correctly.

Missing swing mode, others mode, seems that works properly

simbaja commented 3 years ago

So, just to confirm, even with dev2 you're still missing the auto swing mode entity (it should show up as a switch)?

All other functionality is working?

RobertusIT commented 3 years ago

So, just to confirm, even with dev2 you're still missing the auto swing mode entity (it should show up as a switch)?

All other functionality is working?

yes missing swing with dev2. I didn't know how become appear, but there I didn't see it.

Others functionality works!

But is local based or cloud based? Because when you insert mail and pass about smarthq, i didn't understand if works without internet connection.

simbaja commented 3 years ago

It's a cloud-polling integration, so it won't work without an internet connection, unfortunately. The devices don't allow for local control.

Let me look into the auto swing one more time... it should have been there, are there any errors in the log?

RobertusIT commented 3 years ago

i didn't see error about ge home in logs

it's a pity about local push. but anyway is amazing !

edit:

maybe is it

2021-08-09 19:32:42 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.

simbaja commented 3 years ago
2021-08-09 19:32:42 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.

That one is fine, it's from the library that we're using but isn't a problem. Just to confirm, you restarted after dev2? Did the icons change on the target and ambient temperature (that was the other update from dev2)?

RobertusIT commented 3 years ago
2021-08-09 19:32:42 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.

That one is fine, it's from the library that we're using but isn't a problem. Just to confirm, you restarted after dev2? Did the icons change on the target and ambient temperature (that was the other update from dev2)?

I download already dev2, then import files into custom component, in ha.

Then reboot HA.

image

Now appear. Maybe is my bad, so anyway sorry.

simbaja commented 3 years ago

Awesome, glad that it works now! Let me know if you find anything over the next few days. Thanks for all your help in getting this integrated into HA!

RobertusIT commented 3 years ago

Awesome, glad that it works now! Let me know if you find anything over the next few days. Thanks for all your help in getting this integrated into HA!

Big Thanks to you! I love it! Of course, in these days, are very hot days, so i'll test a lot, for sure!

rocket357 commented 3 years ago

Tested and working. Thank you for this integration =)

RobertusIT commented 3 years ago

If we can buy a coffee to you, can be a pleasure for us

RobertusIT commented 3 years ago

I have this error in log

2021-08-10 14:22:41 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.

How can i fix it?

Seems to be correlated with xmpp

simbaja commented 3 years ago

It's unfortunately a warning that we can't disable as long as the xmpp version of the client is in the library. It shouldn't cause any issue and will only appear once at Home Asisstant startup.

rocket357 commented 3 years ago

If we can buy a coffee to you, can be a pleasure for us

That's no joke, man. I've been using this non-stop since I got it installed and configured and I'm loving it. Great work.

RobertusIT commented 3 years ago

If you try to add another AC, same model, is not possible:

`Logger: homeassistant Source: helpers/entity.py:457 First occurred: 14:24:17 (260 occurrences) Last logged: 14:46:29

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/ge_home/update_coordinator.py", line 266, in on_device_update entity.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 457, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for `

`Logger: homeassistant.components.climate Source: helpers/entity_platform.py:566 Integration: Termostato (documentation, issues) First occurred: 14:28:01 (6 occurrences) Last logged: 14:45:41

Platform ge_home does not generate unique IDs. ID ge_home_D828C938F090_climate already exists - ignoring climate.d828c938f090_climate Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_climate already exists - ignoring climate.condizionatorestudio2_climate_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C938F090_climate already exists - ignoring climate.condizionatorestudio_climate_2`

`Logger: homeassistant.components.switch Source: helpers/entity_platform.py:566 Integration: Interruttore (documentation, issues) First occurred: 14:28:01 (18 occurrences) Last logged: 14:45:41

Platform ge_home does not generate unique IDs. ID ge_home_D828C938F090_sac_sleep_mode already exists - ignoring switch.condizionatorestudio_sac_sleep_mode_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C938F090_sac_auto_swing_mode already exists - ignoring switch.condizionatorestudio_sac_auto_swing_mode_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_ac_power_status already exists - ignoring switch.condizionatorestudio2_ac_power_status_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_sac_sleep_mode already exists - ignoring switch.condizionatorestudio2_sac_sleep_mode_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_sac_auto_swing_mode already exists - ignoring switch.condizionatorestudio2_sac_auto_swing_mode_2`

`Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:566 Integration: Sensore (documentation, issues) First occurred: 14:28:01 (24 occurrences) Last logged: 14:45:41

Platform ge_home does not generate unique IDs. ID ge_home_D828C938F090_ac_operation_mode already exists - ignoring sensor.condizionatorestudio_ac_operation_mode_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_ac_target_temperature already exists - ignoring sensor.condizionatorestudio2_ac_target_temperature_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_ac_ambient_temperature already exists - ignoring sensor.condizionatorestudio2_ac_ambient_temperature_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_ac_fan_setting already exists - ignoring sensor.condizionatorestudio2_ac_fan_setting_2 Platform ge_home does not generate unique IDs. ID ge_home_D828C9404C09_ac_operation_mode already exists - ignoring sensor.condizionatorestudio2_ac_operation_mode_2`

`Logger: gehomesdk.clients.async_login_flows Source: /usr/local/lib/python3.9/site-packages/gehomesdk/clients/async_login_flows.py:66 First occurred: 14:34:46 (1 occurrences) Last logged: 14:34:46

There was a problem getting the authorization code, response details: {'method': 'POST', 'cookies': , '_real_url': URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate'), '_url': URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate'), '_body': b'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!DOCTYPE html>\n\n\n OAuth Login\n\n\n\n\n\t\n\t\n\n\n\n\n\n<link\n\thref="/resources/scripts/css/bootstrap.min.css"\n\trel="stylesheet" />\n<link\n\thref="/resources/scripts/css/desktop.css"\n\trel="stylesheet" />\n\n\t<link href="https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,900&display=swap"\n \trel="stylesheet">\n<script\n\tsrc="/resources/scripts/jquery-3.5.1.min.js">\n\n\n\n\n\n\n\n\n \n \t\t

\n\n\n\n\n\n\n\n\n\t \t
\n\t \n\t
\n\t
\n\t
\n
\n \n

Sign In

\n \n One account across our brands.
\n \n
\n\n\n
\n\n\n\n\n
\n\t\n\t\t
\n\t\t\t\t<input type="hidden" id="client_id" value="564c31616c4f7474434b307435412b4d2f6e7672"\n\t\t\t\t\tname="client_id" />\n\t\t\t\t<input type="hidden" id="response_type" value="code"\n\t\t\t\t\tname="response_type" />\n\t\t\t\t<input type="hidden" id="access_type" value="offline"\n\t\t\t\t\tid="access_type" />\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t<input type="hidden" id="signature" name="signature"\n\t\t\t\t\tvalue="vVLoPdzS242Elr8Q7VEjLwtnFvSSY62MrSVnFTi69BfzV92DD8TQbdXqL8kKA5+JwdqYrppWFC6Np7APE6ubHwOodhskhD+FYMATp+7m4kLurUikIG7sh2rOG/PAHD4UA/HB9yi00NnVUU9Dt+DgLRxwIUvVmyUpiy09qr/2Z4Arp8aWdGsMYy030Xs3EvnCERX2sP4byYqXYZCb5DPjBUwnFREnouETJBeTIOYf1SJlZbjd1vbDl3poynR7l/tsSyX70yz7E2SK/IeI3mEIjtcrlKSn8beo8Tvs+UY1/dnnGE0DCWYvm94E9J4JXTr3l7Zm7FVgD42iwJryItzrzeSzApLflrZFL+gqWljSn2b2CUgBbbSIlcJOwz1o1EFuyMJbCLr/twagV5TrwbVfiHNGL97RllxgoDQfQ87rFtic/AOXkKX4+7Ob0qrNfDG7eaS2+fuzOH7x6zF0Zp2IG6gNo68NVZWuhmkdLOFPo0AB7VWoL9x+M8ORorQFzOvBvCJdhh0cB+pdqDN6ZNeltJW22lr8WO1LZbZvjlb0g3btJPICwsNZrm4rZQc20uHpvANiVKqWZ8OekTIR5kL/FAEKuFTmtQDT+Zh7bpU5obZ6gWOJRciDmLWsGTjh228orIQ0eOUbzN9bIfps22XXZJLUHWG8Nh/cUYCVHQUSE65m8Eg2J+XNl5qcEmPeHSK6QMEFeOHR38J8lAqumhy/q3JiSJXuE8GmkpvbGre0P1EPtUO3C8oz4t8Vsep54GeKJf5H9OWXmUskpGFVKStbg+EMPKNvm2Iy9J9+LydZm7qhPlZQnh6gwFp8n0ApHUfGrVzuKpLNeV/mRmEtXWKo9xIvG9HC92Pmd3HD5jcx9T9nYDTF8mjn6uaNzivmJKpyyJ3/FrVRzPeNbthwJ33syrSn+wjcVsdR0bWuKaGo8sFgqX4HAE0XKOYkoGVkhXoApXsBm2HBsoiv8PD6TGXamAgwlYinS7sfrW+5Yoq51FagdimNHrPkI+X1v4Utjxudk/WTzX9CCQ34WXwsZZ5hCopXxSzWmC/Hs9VMy1qv9Lq/D/7KKWyvGuKcSaeswvb98lcHMa/2G6JhLFspqYOvG8sHYlM5Nw8/OyJZf7dsohBZBHCHhq+QvMsQHX28Zx6PP+8YMGhtfpGUBOyI2F2xuEfb91JhxI2caV3ymavlOzTJRbSGjKKaIKt1ML3vVLqyAq0O430C27u+LJp+5GfeCN8+mZcf6Qh1ZClZnaUh/UKWuZc1kMFjoOm77YO8XBcyT1Nq641+2qj44a28SGAU5xe/DCF67KjWcA7tM9oyfhneZLcGypiW66eqGsOpSZp7xbQ/dVNuoUgNEl1pM+g+o041uf9ueVoeLpF5eIIOTEDEPK3/uOePyLrbu6SPtx0BzTlmmnwDiRleqGyRNvluju6WcwkCO4hyh5z+SEojKB2fHlwpw+PVpKLr6FebiPqavGyTfjU72Lr38fuQkmByw/A+YIgS73VN5qb+HHEhiG8NvEKE52Xw1NaLQjAKKkaGc90Oe5bEe0M9oIZPT67JWyxDMewxcVX+Qcno56F+I+SRNNinQRDtZJac4nLwS3/jP0P3tYOQfpVlQX6Ftb6pBBAxJyGwGMM5zT3ujtk4ewiAAqbLOIWIjOjz+aorzhvltBvcaXcUMPvV9tgnYb9YLFKj1oQSq5HNEdUo+ksXXf9n17nb439eNaBMYP7DCUTkccKwJhryLy3X5ZcHv5bDBA==" />\n\t\t\t
\n\t\t\t
\n\t\t\t\t<input type="email" class="form-control" id="username"\n\t\t\t\t\tname="username" placeholder="Username" autocapitalize="off"\n\t\t\t\t\tvalue="mail@gmail.com" tabindex="1" />\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t<input type="password" class="form-control" id="password"\n\t\t\t\t\tname="password" placeholder="Password" tabindex="2" maxlength="20" />\n\t\t\t\t Show Password
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t<button type="button" id="signin_btn" name="signin_btn" class="btn_signIn btn btn-default btn-primary"\n\t\t\t\tonClick="javascript:oauthLogin()" tabindex="4">\n\t\t\t\t\tSIGN IN\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n
\n
\n
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t
Don\'t have an account? Sign up here
\n\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n
\n\n\n\n\n\n\n\n\n\n\n\t\n\n\n
\n\t\t
\n\t
\n\n\t\n\n\n \n\t
\n\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<script\r\n\tsrc="/resources/scripts/js/bootstrap.min.js">\r\n<script\r\n\tsrc="/resources/scripts/js/bootstrap-show-password.min.js">\r\n<script\r\n\tsrc="/resources/scripts/common.js">\r\n\r\n\r\n\r\n\r\n\n\n', '_writer': None, '_continue': None, '_closed': True, '_history': (), '_request_info': RequestInfo(url=URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate'), method='POST', headers=<CIMultiDictProxy('Host': 'accounts.brillion.geappliances.com', 'User-Agent': 'HomeAssistant/2021.8.8 aiohttp/3.7.4.post0 Python/3.9', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'Cookie': 'JSESSIONID=AA4FE6D92E213CF2F77BBC227D43F484', 'Content-Length': '1979', 'Content-Type': 'application/x-www-form-urlencoded')>, real_url=URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate')), '_timer': <aiohttp.helpers.TimerContext object at 0x7f31e5f93100>, '_cache': {'headers': <CIMultiDictProxy('Content-Type': 'text/html;charset=ISO-8859-1', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Sat, 21 Aug 2021 12:34:46 GMT', 'X-Amzn-Trace-Id': 'Root=1-6120f2e6-056d11863220333b30328ac5;', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 c4c9c5f205c75ffaa8a1afb0c1123a9f.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FCO50-C2', 'X-Amz-Cf-Id': 'sX4t2Fmczu5lSy7xD6FV3yprvKTNs-3Cl3YN3kmRgn0L8tFdSCvRtg==')>, 'url': URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate')}, '_traces': [], '_loop': <_UnixSelectorEventLoop running=True closed=False debug=False>, '_session': None, '_protocol': <aiohttp.client_proto.ResponseHandler object at 0x7f31e59ceb20>, '_connection': None, 'version': HttpVersion(major=1, minor=1), 'status': 200, 'reason': '', '_headers': <CIMultiDictProxy('Content-Type': 'text/html;charset=ISO-8859-1', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Sat, 21 Aug 2021 12:34:46 GMT', 'X-Amzn-Trace-Id': 'Root=1-6120f2e6-056d11863220333b30328ac5;', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 c4c9c5f205c75ffaa8a1afb0c1123a9f.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FCO50-C2', 'X-Amz-Cf-Id': 'sX4t2Fmczu5lSy7xD6FV3yprvKTNs-3Cl3YN3kmRgn0L8tFdSCvRtg==')>, '_raw_headers': ((b'Content-Type', b'text/html;charset=ISO-8859-1'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Date', b'Sat, 21 Aug 2021 12:34:46 GMT'), (b'X-Amzn-Trace-Id', b'Root=1-6120f2e6-056d11863220333b30328ac5;'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Cache', b'Miss from cloudfront'), (b'Via', b'1.1 c4c9c5f205c75ffaa8a1afb0c1123a9f.cloudfront.net (CloudFront)'), (b'X-Amz-Cf-Pop', b'FCO50-C2'), (b'X-Amz-Cf-Id', b'sX4t2Fmczu5lSy7xD6FV3yprvKTNs-3Cl3YN3kmRgn0L8tFdSCvRtg==')), 'content': } Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/gehomesdk/clients/async_login_flows.py", line 60, in async_get_authorization_code code = await async_handle_ok_response(session, await resp.text()) File "/usr/local/lib/python3.9/site-packages/gehomesdk/clients/async_login_flows.py", line 95, in async_handle_ok_response raise GeAuthFailedError(f"Authentication failed, reason: {reason}") gehomesdk.exception.ge_auth_failed_error.GeAuthFailedError: Authentication failed, reason: Invalid credentials `

`Logger: gehomesdk.clients.base_client Source: /usr/local/lib/python3.9/site-packages/gehomesdk/clients/base_client.py:150 First occurred: 14:31:52 (1 occurrences) Last logged: 14:31:52

Error refreshing authentication: Connection closed`

simbaja commented 3 years ago

Can you completely remove the integration, clean-up any entities, and then reinstall the integration and see if that clears it up? Also, can you post your sdk log as well, just need to confirm that it's sending unique ids. The A/C units don't have a serial number (which is what I've been using), so I'm using the mac address of the wifi connect as the unique id (which should be unique).

RobertusIT commented 3 years ago

Can you completely remove the integration, clean-up any entities, and then reinstall the integration and see if that clears it up? Also, can you post your sdk log as well, just need to confirm that it's sending unique ids. The A/C units don't have a serial number (which is what I've been using), so I'm using the mac address of the wifi connect as the unique id (which should be unique).

I did it right now, no way. Delete integration, reboot No entities Install integration, login, create only 1 AC, other AC not.

`Logger: gehomesdk.clients.async_login_flows Source: /usr/local/lib/python3.9/site-packages/gehomesdk/clients/async_login_flows.py:66 First occurred: 15:49:03 (1 occurrences) Last logged: 15:49:03

There was a problem getting the authorization code, response details: {'method': 'POST', 'cookies': , '_real_url': URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate'), '_url': URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate'), '_body': b'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<!DOCTYPE html>\n\n\n OAuth Login\n\n\n\n\n\t\n\t\n\n\n\n\n\n<link\n\thref="/resources/scripts/css/bootstrap.min.css"\n\trel="stylesheet" />\n<link\n\thref="/resources/scripts/css/desktop.css"\n\trel="stylesheet" />\n\n\t<link href="https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,900&display=swap"\n \trel="stylesheet">\n<script\n\tsrc="/resources/scripts/jquery-3.5.1.min.js">\n\n\n\n\n\n\n\n\n \n

\n
\n \n \t\t \n\n\n\n\n\n\n\n\n\t
\n\t
\n\t \n\t
\n\t
\n\t
\n
\n \n

Sign In

\n \n One account across our brands.
\n \n
\n\n\n
\n\n\n\n\n
\n\t\n\t\t
\n\t\t\t\t<input type="hidden" id="client_id" value="564c31616c4f7474434b307435412b4d2f6e7672"\n\t\t\t\t\tname="client_id" />\n\t\t\t\t<input type="hidden" id="response_type" value="code"\n\t\t\t\t\tname="response_type" />\n\t\t\t\t<input type="hidden" id="access_type" value="offline"\n\t\t\t\t\tid="access_type" />\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t<input type="hidden" id="signature" name="signature"\n\t\t\t\t\tvalue="vVLoPdzS242Elr8Q7VEjLwtnFvSSY62MrSVnFTi69BfzV92DD8TQbdXqL8kKA5+JwdqYrppWFC6Np7APE6ubHwOodhskhD+FYMATp+7m4kLzEwh9BIaj2phlINTFLMLZ5Egoou6ebiOZLEUxjo/H6hxwIUvVmyUpiy09qr/2Z4Arp8aWdGsMYy030Xs3EvnCERX2sP4byYqXYZCb5DPjBUwnFREnouETJBeTIOYf1SJlZbjd1vbDl3poynR7l/tsSyX70yz7E2SK/IeI3mEIjtcrlKSn8beo8Tvs+UY1/dnnGE0DCWYvm94E9J4JXTr3l7Zm7FVgD42iwJryItzrzeSzApLflrZFL+gqWljSn2b2CUgBbbSIlcJOwz1o1EFuyMJbCLr/twagV5TrwbVfiHNGL97RllxgoDQfQ87rFtic/AOXkKX4+7Ob0qrNfDG7eaS2+fuzOH7x6zF0Zp2IG6gNo68NVZWuhmkdLOFPo0AB7VWoL9x+M8ORorQFzOvBvCJdhh0cB+pdqDN6ZNeltJW22lr8WO1LZbZvjlb0g3btJPICwsNZrm4rZQc20uHpvANiVKqWZ8OekTIR5kL/FAEKuFTmtQDT+Zh7bpU5obZ6gWOJRciDmLWsGTjh228orIQ0eOUbzN9bIfps22XXZJLUHWG8Nh/cUYCVHQUSE65m8Eg2J+XNl5qcEmPeHSK6QMEFeOHR38J8lAqumhy/q3JiSJXuE8GmkpvbGre0P1EPtUO3C8oz4t8Vsep54GeKJf5H9OWXmUskpGFVKStbg+EMPKNvm2Iy9J9+LydZm7qhPlZQnh6gwFp8n0ApHUfGrVzuKpLNeV/mRmEtXWKo9xIvG9HC92Pmd3HD5jcx9T9nYDTF8mjn6uaNzivmJKpyyJ3/FrVRzPeNbthwJ33syrSn+wjcVsdR0bWuKaGo8sFgqX4HAE0XKOYkoGVkhXoApXsBm2HBsoiv8PD6TGXamAgwlYinS7sfrW+5Yoq51FagdimNHrPkI+X1v4Utjxudk/WTzX9CCQ34WXwsZZ5hCopXxSzWmC/Hs9VMy1qv9Lq/D/7KKWyvGuKcSaeswvb98lcHMa/2G6JhLFspqYOvG8sHYlM5Nw8/OyJZf7dsohBZBHCHhq+QvMsQHX28Zx6PP+8YMGhtfpGUBOyI2F2xuEfb91JhxI2caV3ymavlOzTJRbSGjKKaIKt1ML3vVLqyAq0O430C27u+LJp+5GfeCN8+mZcf6Qh1ZClZnaUh/UKWuZc1kMFjoOm77YO8XBcyT1Nq641+2qj44a28SGAU5xe/DCF67KjWcA7tM9oyfhneZLcGypiW66eqGsOpSZp7xbQ/dVNuoUgNEl1pM+g+o041uf9ueVoeLpF5eIIOTEDEPK3/uOePyLrbu6SPtx0BzTlmmnwDiRleqGyRNvluju6WcwkCO4hyh5z+SEojKB2fHlwpw+PVpKLr6FebiPqavGyTfjU72Lr38fuQkmByw/A+YIgS73VN5qb+HHEhiG8NvEKE52Xw1NaLQjAKKkaGc90Oe5bEe0M9oIZPT67JWyxDMewxcVX+Qcno56F+I+SRNNinQRDtZJac4nLwS3/jP0P3tYOQfpVlQX6Ftb6pBBAxJyGwGMM5zT3ujtk4ewiAAqbLOIWIjOjz+aorzhvltBvcaXcUMPvV9tgnYb9YLFKj1oQSq5HNEdUo+ksXXf9n17nb439eNaBMYP7DCUTkccKwJhryLy3X5ZcHv5bDBA==" />\n\t\t\t
\n\t\t\t
\n\t\t\t\t<input type="email" class="form-control" id="username"\n\t\t\t\t\tname="username" placeholder="Username" autocapitalize="off"\n\t\t\t\t\tvalue="mail@gmail.com" tabindex="1" />\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t<input type="password" class="form-control" id="password"\n\t\t\t\t\tname="password" placeholder="Password" tabindex="2" maxlength="20" />\n\t\t\t\t Show Password
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t<button type="button" id="signin_btn" name="signin_btn" class="btn_signIn btn btn-default btn-primary"\n\t\t\t\tonClick="javascript:oauthLogin()" tabindex="4">\n\t\t\t\t\tSIGN IN\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n
\n
\n
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\t
Don\'t have an account? Sign up here
\n\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n
\n\n\n\n\n\n\n\n\n\n\n\t\n\n\n
\n\t\t
\n\t
\n\n\t\n \t
\n \t
\n
\n
\n
\n

\n Copyright 2020 GE Appliances, a Haier company GE is trademark of General Electric Company.Manufactured under trademark license.\n

\n
\n
\n
\n
\n \t \n\t
\n\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<script\r\n\tsrc="/resources/scripts/js/bootstrap.min.js">\r\n<script\r\n\tsrc="/resources/scripts/js/bootstrap-show-password.min.js">\r\n<script\r\n\tsrc="/resources/scripts/common.js">\r\n\r\n\r\n\r\n\r\n\n\n', '_writer': None, '_continue': None, '_closed': True, '_history': (), '_request_info': RequestInfo(url=URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate'), method='POST', headers=<CIMultiDictProxy('Host': 'accounts.brillion.geappliances.com', 'User-Agent': 'HomeAssistant/2021.8.8 aiohttp/3.7.4.post0 Python/3.9', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'Cookie': 'JSESSIONID=5A2E8BA53354F1FD37EFAA604BC3528E', 'Content-Length': '1979', 'Content-Type': 'application/x-www-form-urlencoded')>, real_url=URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate')), '_timer': <aiohttp.helpers.TimerContext object at 0x7f021e8213d0>, '_cache': {'headers': <CIMultiDictProxy('Content-Type': 'text/html;charset=ISO-8859-1', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Sat, 21 Aug 2021 13:49:03 GMT', 'X-Amzn-Trace-Id': 'Root=1-6121044f-53ae33256bdcacb335354825;', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 0dc6e139877603fab6ff41db24812dc5.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FCO50-C2', 'X-Amz-Cf-Id': '_dLm4Ef8h1ZJq_U7hMgpQRKJeftEVpw4bfXaYU6imKsCLaJj1YZ3Qg==')>, 'url': URL('https://accounts.brillion.geappliances.com/oauth2/g_authenticate')}, '_traces': [], '_loop': <_UnixSelectorEventLoop running=True closed=False debug=False>, '_session': None, '_protocol': <aiohttp.client_proto.ResponseHandler object at 0x7f022a3e4580>, '_connection': None, 'version': HttpVersion(major=1, minor=1), 'status': 200, 'reason': '', '_headers': <CIMultiDictProxy('Content-Type': 'text/html;charset=ISO-8859-1', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Sat, 21 Aug 2021 13:49:03 GMT', 'X-Amzn-Trace-Id': 'Root=1-6121044f-53ae33256bdcacb335354825;', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 0dc6e139877603fab6ff41db24812dc5.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FCO50-C2', 'X-Amz-Cf-Id': '_dLm4Ef8h1ZJq_U7hMgpQRKJeftEVpw4bfXaYU6imKsCLaJj1YZ3Qg==')>, '_raw_headers': ((b'Content-Type', b'text/html;charset=ISO-8859-1'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Date', b'Sat, 21 Aug 2021 13:49:03 GMT'), (b'X-Amzn-Trace-Id', b'Root=1-6121044f-53ae33256bdcacb335354825;'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'X-Content-Type-Options', b'nosniff'), (b'X-XSS-Protection', b'1; mode=block'), (b'X-Cache', b'Miss from cloudfront'), (b'Via', b'1.1 0dc6e139877603fab6ff41db24812dc5.cloudfront.net (CloudFront)'), (b'X-Amz-Cf-Pop', b'FCO50-C2'), (b'X-Amz-Cf-Id', b'_dLm4Ef8h1ZJq_U7hMgpQRKJeftEVpw4bfXaYU6imKsCLaJj1YZ3Qg==')), 'content': } Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/gehomesdk/clients/async_login_flows.py", line 60, in async_get_authorization_code code = await async_handle_ok_response(session, await resp.text()) File "/usr/local/lib/python3.9/site-packages/gehomesdk/clients/async_login_flows.py", line 95, in async_handle_ok_response raise GeAuthFailedError(f"Authentication failed, reason: {reason}") gehomesdk.exception.ge_auth_failed_error.GeAuthFailedError: Authentication failed, reason: Invalid credentials ` How can i post sdk log ? I have HA on a NUC, with supervisor. Need to use rpi again?

image

as you can see, entities exist for every AC

but only one in integration image

Maybe is only an issue of visualization about integration. And anyway a lot of error in logs, that should be manage ?

simbaja commented 3 years ago

I had started typing a response, but your new screenshots indicate a different problem. You don't need to add the integration twice, the same integration instance will show any device attached to your account. If you had multiple accounts, you would need two instances of the integration.

In terms of the errors in the logs - it's trying to re-add the same appliances twice. I will add some logic to prevent the same account from being added more than once to prevent further issues like this.

simbaja commented 3 years ago

Seems like it's working for people, so I'll close this. Please reopen or start a new thread if issues pop up.