Giter Club home page Giter Club logo

ha-smartthinq-sensors's People

Contributors

4homeassistant avatar alani-xx avatar alray31 avatar beardedtinker avatar colohan avatar d3m3vilurr avatar dennisrp avatar dougiteixeira avatar dsimop avatar fnasciment0 avatar greew avatar hisabimbola avatar hwikene avatar jordibsk10 avatar jose1711 avatar kenmaples avatar krzysieklegnica avatar ktibow avatar ldotlopez avatar leandroissa avatar nukusinji avatar oldshaterhan avatar ollo69 avatar petersoniq avatar pistak avatar rainchi avatar skinkie avatar titilambert avatar wrt54g avatar yuvalabou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-smartthinq-sensors's Issues

Fridge/Freezer Temps Incorrect

First, it's great to have your work on this integration!

I've noticed for my LG Fridge that the fridge and freezer temps both report as 9 degrees (should be 4 and -18). I tried turning on my LG Dishwasher out of curiosity but that appears to not be supported yet.

In addition to the debut log I can email to you, I did note the following (possibly unrelated translation) errors:

2020-04-26 11:04:20 ERROR (SyncWorker_14) [homeassistant.util.json] JSON file reading failed: /config/custom_components/smartthinq_sensors/.translations/sensor.en.json
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 30, in load_json
with open(filename, encoding="utf-8") as fdesc:
NotADirectoryError: [Errno 20] Not a directory: '/config/custom_components/smartthinq_sensors/.translations/sensor.en.json'
2020-04-26 11:04:20 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140320224258064] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 30, in load_json
with open(filename, encoding="utf-8") as fdesc:
NotADirectoryError: [Errno 20] Not a directory: '/config/custom_components/smartthinq_sensors/.translations/sensor.en.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 20, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/frontend/init.py", line 549, in websocket_get_translations
resources = await async_get_translations(hass, msg["language"])
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 152, in async_get_translations
resources = await async_get_component_resources(hass, language)
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 135, in async_get_component_resources
loaded_translations = await load_translations_job
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 74, in load_translations_files
loaded_json = load_json(translation_file)
File "/usr/src/homeassistant/homeassistant/util/json.py", line 40, in load_json
raise HomeAssistantError(error)
homeassistant.exceptions.HomeAssistantError: [Errno 20] Not a directory: '/config/custom_components/smartthinq_sensors/.translations/sensor.en.json'
2020-04-26 11:04:20 ERROR (SyncWorker_0) [homeassistant.util.json] JSON file reading failed: /config/custom_components/smartthinq_sensors/.translations/sensor.en.json
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 30, in load_json
with open(filename, encoding="utf-8") as fdesc:
NotADirectoryError: [Errno 20] Not a directory: '/config/custom_components/smartthinq_sensors/.translations/sensor.en.json'
2020-04-26 11:04:20 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140320213398672] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 30, in load_json
with open(filename, encoding="utf-8") as fdesc:
NotADirectoryError: [Errno 20] Not a directory: '/config/custom_components/smartthinq_sensors/.translations/sensor.en.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 20, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/frontend/init.py", line 549, in websocket_get_translations
resources = await async_get_translations(hass, msg["language"])
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 152, in async_get_translations
resources = await async_get_component_resources(hass, language)
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 135, in async_get_component_resources
loaded_translations = await load_translations_job
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 74, in load_translations_files
loaded_json = load_json(translation_file)
File "/usr/src/homeassistant/homeassistant/util/json.py", line 40, in load_json
raise HomeAssistantError(error)
homeassistant.exceptions.HomeAssistantError: [Errno 20] Not a directory: '/config/custom_components/smartthinq_sensors/.translations/sensor.en.json'

Can't delete old LGE WASHERS integration

Hi, I was able to set up my washer with the new sensor integration, but the last integration remain and I can't delete it using the basket icon on the integration section. I don't have nothing set up on configuration.yaml Already reboot, try again to delete but nothing, still the notification regarding the old integration. HA 0.108.6 on rasp 3b+ Any clue?

image
image
image

not all devices are presented in HA

Hi ollo69,

First of all, thank you! this is awesome!

I've installed the SmartThinQ LGE Sensors from HACS. Followed all the instructions and it worked! Particularly 🤔. Although I have 3 devices connected to my ThinQ app (dishwasher, range and fridge), I can see only one in HA (fridge). Any advice?
image
image

Washing Machine missing other State

Hi ollo69,
First of all, this is awsome, you are awsome!
I have recovered the json of my LG washer dryer (F4J8FH2W) and I realized that the DEMO status also exists.
Both in State and in Prestate.
This is the string: "16":"@WM_STATE_DEMO_W"

Also missing some WASHING SPIN SPEED:
"3":"@WM_TITAN2_OPTION_SPIN_600_W",
"4":"@WM_TITAN2_OPTION_SPIN_700_W",
"8":"@WM_TITAN2_OPTION_SPIN_1100_W",
"11":"@WM_TITAN2_OPTION_SPIN_1600_W",
"255":"@WM_TITAN2_OPTION_SPIN_MAX_W".

Also missing WASHING TEMP:
"5":"@WM_TITAN2_OPTION_TEMP_50_W".

I also add Dry State:
"DryLevel":{
"type":"Enum",
"default":"0",
"label":"@WM_TITAN2_OPTION_DRY_W",
"option":{
"0":"-",
"1":"-",
"2":"@WM_TITAN2_OPTION_DRY_NORMAL_W",
"3":"@WM_TITAN2_OPTION_DRY_30_W",
"4":"@WM_TITAN2_OPTION_DRY_60_W",
"5":"@WM_TITAN2_OPTION_DRY_90_W",
"6":"@WM_TITAN2_OPTION_DRY_120_W",
"7":"@WM_TITAN2_OPTION_DRY_150_W",
"8":"@WM_TITAN2_OPTION_DRY_ECO_W",
"9":"@WM_TITAN2_OPTION_DRY_VERY_W",
"10":"@WM_TITAN2_OPTION_DRY_IRON_W",
"11":"@WM_TITAN2_OPTION_DRY_LOW_W",
"12":"@WM_TITAN2_OPTION_DRY_ENERGY_W",
"13":"@WM_TITAN2_OPTION_DRY_SPEED_W",
"14":"@WM_TITAN2_OPTION_DRY_COOLING_W"
}

I'd like to know if it would be possible to set up custom programs with the API.

I hope I was helpful

[BUG] Authorization Error

Describe the bug
Trying to get the redirection url I am presented with the login options, from where I choose google account login as I always do.

First thing odd is that sync in Chrome is immediately paused, and I'm invited to authenticate on my Google account once again.

Then authorization via Google credentials redirect url fail with "Error 400: redirect_uri_mismatch".

Visiting the Google's suggested url I get the message that I'm not authorized to view the requested page...

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Environment details:

  • Environment (HASSIO, Raspbian, etc): HA supervised
  • Home Assistant version installed: 0.111.4
  • Component version installed: 0.5.2
  • Last know working version:
  • LG device type and model with issue: washing machine F4J8JS2W
  • LG devices connected (list): just the F4J8JS2W

Output of HA logs
Paste the relavant output of the HA log here.


Additional context
Add any other context about the problem here.

[BUG] Invalid region/language

Describe the bug
Right at the first setup screen after deploying files into HASS, we get the request for region and language.
For my case it is Portugal/Português as I can check on the mobile android app.
However when I try to enter this strings the response is "invalid region format".

Expected behavior
"Portugal" should be accepted for as region and "Português" should be accepted as language.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment details:

  • Environment (HASSIO, Raspbian, etc): HA supervised
  • Home Assistant version installed: 0.111.4
  • Component version installed: 0.5.2
  • Last know working version:
  • LG device type and model with issue: washing machine F4J8JS2W
  • LG devices connected (list): just the F4J8JS2W

Output of HA logs
Paste the relavant output of the HA log here.


Additional context
Add any other context about the problem here.

Error 0110 Connection not available. SmartThinQ platform not ready.

This was working on my system but now it is getting an error 0110 and the integration keeps restarting...

2020-05-01 09:19:33 INFO (MainThread) [custom_components.smartthinq_sensors] 
-------------------------------------------------------------------
smartthinq_sensors
Version: 0.3.9
This is a custom component
If you have any issues with this you need to open an issue here:
https://github.com/ollo69/ha-smartthinq-sensors/issues
-------------------------------------------------------------------
2020-05-01 09:19:33 INFO (MainThread) [custom_components.smartthinq_sensors] Initializing SmartThinQ platform with region: CA - language: en-US
2020-05-01 09:19:33 DEBUG (SyncWorker_4) [custom_components.smartthinq_sensors.wideq.core_v2] thinq2_get before: https://route.lgthinq.com:46030/v1/service/application/gateway-uri
2020-05-01 09:19:34 DEBUG (SyncWorker_4) [custom_components.smartthinq_sensors.wideq.core_v2] thinq2_get after: {'resultCode': '0000', 'result': {'countryCode': 'CA', 'languageCode': 'en-CA', 'thinq1Uri': 'https://aic.lgthinq.com:46030/api', 'thinq2Uri': 'https://aic-service.lgthinq.com:46030/v1', 'empUri': 'https://ca.m.lgaccount.com', 'empSpxUri': 'https://ca.m.lgaccount.com/spx', 'rtiUri': 'aic.lgthinq.com:47878', 'mediaUri': 'aic-media.lgthinq.com:47800', 'appLatestVer': '3.0.2100001', 'appUpdateYn': 'N', 'appLink': 'market://details?id=com.lgeha.nuts', 'uuidLoginYn': 'N', 'lineLoginYn': 'N', 'lineChannelId': '', 'cicTel': '1-888-542-2623', 'cicUri': '', 'isSupportVideoYn': 'N', 'countryLangDescription': 'Canada/English', 'googleAssistantUri': 'https://assistant.google.com/services/invoke/uid/000000d26892b8a3', 'smartWorldUri': '', 'racUri': 'ca.rac.lgeapi.com', 'cssUri': 'https://aic-common.lgthinq.com', 'cssWebUri': 'http://s3-an2-op-t20-css-web-resource.s3-website.ap-northeast-2.amazonaws.com', 'iotssUri': 'https://kic-iotservice.lgthinq.com', 'amazonDrsYn': 'N', 'features': {'amazonDrs': 'N', 'disableWeatherCard': 'N', 'thinqCss': 'N', 'cicSupport': 'Y'}, 'serviceCards': []}}

2020-05-01 09:19:34 DEBUG (SyncWorker_4) [custom_components.smartthinq_sensors.wideq.core_v2] {'access_token': '1339eaa9e18ae357f05f6a78c9129f1e9818dafe4cfc9dd846ccd364494af3e63aabde2c800cd11adab500cb1bdc3690', 'expires_in': '3600'}
2020-05-01 09:19:34 DEBUG (SyncWorker_4) [custom_components.smartthinq_sensors.wideq.core_v2] thinq2_get before: https://aic-service.lgthinq.com:46030/v1/service/application/dashboard

2020-05-01 09:19:35 DEBUG (SyncWorker_4) [custom_components.smartthinq_sensors.wideq.core_v2] thinq2_get after: {'resultCode': '0110', 'result': ''}
2020-05-01 09:19:35 ERROR (SyncWorker_4) [custom_components.smartthinq_sensors] ('0110', 'error')
2020-05-01 09:19:35 WARNING (MainThread) [custom_components.smartthinq_sensors] Connection not available. SmartThinQ platform not ready.
2020-05-01 09:19:35 WARNING (MainThread) [homeassistant.config_entries] Config entry for smartthinq_sensors not ready yet. Retrying in 5 seconds.

This repeats every 60 seconds.

HA 0.110.1 - Component not loaded at startup

Describe the bug
After upgrade HA to 0.110.1 component is not loaded at startup

Expected behavior
I expect component correctly loaded

Screenshots
image

Environment details:

  • Environment (HASSIO, Raspbian, etc): Raspbian
  • Home Assistant version installed: HA Core 0.110.1
  • Component version installed: 0.4.7
  • Last know working version: 0.4.7 on HA Core 0.100.0
  • LG device type and model with issue: ?
  • LG devices connected (list): Washer

Output of HA logs

2020-05-21 12:57:06 ERROR (MainThread) [homeassistant.setup] Setup failed for smartthinq_sensors: Integration not found.
2020-05-21 12:57:06 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following integrations and platforms could not be set up:

 - smartthinq_sensors

Please check your config., notification_id=invalid_config>
2020-05-21 12:57:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following integrations and platforms could not be set up:

 - smartthinq_sensors

Please check your config. @ 2020-05-21T12:57:07.321591+02:00>>


Additional context

('0110', 'error')

All was working with frige apiv1 and washer apiv2.
Today I recive error
('0110', 'error')
if need i show DEBUG log ....

LG Dryer

Is there a way to add also a LG Dryer?

Connection not available. SmartThinQ platform not ready.

Suddenly getting this error in my logs over and over.

2020-06-25 15:59:54 WARNING (MainThread) [custom_components.smartthinq_sensors] Connection not available. SmartThinQ platform not ready.
2020-06-25 15:59:54 WARNING (MainThread) [homeassistant.config_entries] Config entry for smartthinq_sensors not ready yet. Retrying in 80 seconds.

Nothing has changed in HA, other than updating to 111.4
entities are showing as "restored" when looking at them from the integration and clicking on "entities" link.

[BUG] 0.5.0 Washer shows an error state

Describe the bug
After upgrading, washer shows in error state. reinstalling old version resolves the issue. But dryer is fine on both versions.

Washer Error State
Problem

But no error message.

Expected behavior
After upgrading, expected device to stay in non error state.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment details:

  • Environment (HASSIO, Raspbian, etc): VM HASSIO
  • Home Assistant version installed: 0.110.6
  • Component version installed: 0.5.0
  • Last know working version: 0.4.7
  • LG device type and model with issue: Washer - WT7300CV
  • LG devices connected (list): Washer and Dryer (DLE7300VE)

Output of HA logs
Paste the relevant output of the HA log here.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 120, in async_setup_entry
    entry.data[CONF_REFRESH_TOKEN],
  File "/usr/local/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 210, in generate_tokens
    client_id, client_secret, refresh_token
  File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 424, in generate_tokens
    raise APIInvalidGrant(data.get("error_description"))
pysmartthings.errors.APIInvalidGrant: Invalid refresh token: <TOKEN REMOVED>

Additional context
Add any other context about the problem here.

Odd that there is a refresh token error but Dryer still works fine?

Changing nothing between switching versions. I don't re-setup the integration or anything.

After upgrading and having the issue, I did try to delete/re-setup the integration but that didn't resolve the issue either.

Only USA accounts can login

I have a Canadian Google Play store (and therefore ThinqQ app) but the login url with the UI provides a US login. Is there any way to get a Canadian URL and use the redirection url to proceed?

Without this the Cell App won't work, which is more important to me anyways.

Error while setting up smartthinq_washer platform for sensor

Using integrations, I created a new one and entered the default values for country (US) and locale en-US and provided my access token. It created the integration w/o any issues but no devices were added. Here is the error from my logs:

Logger: homeassistant.components.sensor
Source: custom_components/smartthinq_washer/wideq.py:826
Integration: Sensor (documentation, issues)
First occurred: 8:21:38 PM (1 occurrences)
Last logged: 8:21:38 PM

Error while setting up smartthinq_washer platform for sensor

ValueError: 202 is not a valid DeviceType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/smartthinq_washer/sensor.py", line 462, in async_setup_entry
    if device.type == DeviceType.WASHER:
  File "/config/custom_components/smartthinq_washer/wideq.py", line 826, in type
    return DeviceType(self.data['deviceType'])
  File "/usr/local/lib/python3.7/enum.py", line 310, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.7/enum.py", line 564, in __new__
    raise exc
  File "/usr/local/lib/python3.7/enum.py", line 548, in __new__
    result = cls._missing_(value)
  File "/usr/local/lib/python3.7/enum.py", line 577, in _missing_
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 202 is not a valid DeviceType

This was on HA 0.107.6

Does this component work with TVs?

Is your feature request related to a problem? Please describe.
I couldn't get my TV detected on my LG account

Describe the solution you'd like
I would like to have it detected. Its a LG B9

Describe alternatives you've considered
Tried reconnecting device, different countries.

Refrigerator- Other Sensors

Hi Ollo,

First of all, thanks for all of your time and effort on this! Got it working in no time and don’t have to use the app anymore! Brilliant!

Just wondering if you were planning to add any additional sensors to this? In particular my refrigerator has the following available:

9B8CCE18-D213-4BE5-9EB9-BAE2A565F669

It would be great if I could see filter status and hygiene fresh status of the fridge?

Let me know if your interested or need any more data and I’ll get it to you.

Thanks again for building this - I’ve been looking for years! 😂

No devices -- SSL Failure

I'm having a problem with this plugin. I recently upgraded my raspberry pi and python to the latest versions and now I cannot access the LG devices. My error log is as follows.

I'm running python 3.8
openssl 1.1.1d
The latest home assistant and the latest ha-smartthinq-sensors

Any help would be greatly appreciated. I have a feeling I need to run an older version openssl, but I'm not technically involved enough to know how to change my version. Thanks for any and all help.

2020-06-10 12:22:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for smartthinq_sensors which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-06-10 12:22:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-06-10 12:22:57 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry LGE Devices for smartthinq_sensors
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/contrib/pyopenssl.py", line 488, in wrap_socket
cnx.do_handshake()
File "/srv/homeassistant/lib/python3.8/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/srv/homeassistant/lib/python3.8/site-packages/OpenSSL/SSL.py", line 1671, in _raise_ssl_error
_raise_current_error()
File "/srv/homeassistant/lib/python3.8/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/connectionpool.py", line 976, in validate_conn
conn.connect()
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/connection.py", line 361, in connect
self.sock = ssl_wrap_socket(
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/util/ssl
.py", line 377, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/srv/homeassistant/lib/python3.8/site-packages/urllib3/contrib/pyopenssl.py", line 494, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])",)

How to use the binary_sensor.lavatrice_wash_completed

Hi,
I have an automation in my setup that listen for changes of the binary_sensor.lavatrice_wash_completed, but seems this never happens.
Also in history, the state is never changed.
The automation works, if i trigger manually the action is fired.
Can you tell me how to catch the washing complete event correctly?
Thanks

Howto for notifications

Hello can you please make a howto showing how to make push notification when washing/dryer machine is finished it sends out a notification to all devices like a iPhone

And also a howto so when it is finished it sends a command to my speakers to say washing machine is now finessed

Make the howto so it’s made for beginners

Sensor update failure

Browsing through my logs this morning and noticed the following error in the event it's useful.

HA Version: Home Assistant Core 0.108.6
SmartThinQ Integration: 0.2.4

2020-04-18 08:23:11 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.lg_washer fails Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Try again During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn conn.connect() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 308, in connect conn = self._new_conn() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fe3e16e4bd0>: Failed to establish a new connection: [Errno -3] Try again During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='aic-service.lgthinq.com', port=46030): Max retries exceeded with url: /v1/service/application/dashboard (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe3e16e4bd0>: Failed to establish a new connection: [Errno -3] Try again')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/smartthinq_washer/__init__.py", line 335, in update raise ex File "/config/custom_components/smartthinq_washer/__init__.py", line 321, in update state = self._device.poll() File "/config/custom_components/smartthinq_washer/wideq/washer.py", line 29, in poll res = self.device_poll("washerDryer") File "/config/custom_components/smartthinq_washer/wideq/device.py", line 651, in device_poll self._client.refresh_devices() File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 605, in refresh_devices self._load_devices(True) File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 560, in _load_devices self._devices = self._session.get_devices() File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 421, in get_devices devices = self.get2("service/application/dashboard").get("item", []) File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 413, in get2 language=self.auth.gateway.language, File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 133, in thinq2_get timeout=DEFAULT_TIMEOUT, File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='aic-service.lgthinq.com', port=46030): Max retries exceeded with url: /v1/service/application/dashboard (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe3e16e4bd0>: Failed to establish a new connection: [Errno -3] Try again'))

Dryer beta testing

I got this error with v0.2.1

Logger: homeassistant.core
Source: custom_components/smartthinq_washer/sensor.py:447 
First occurred: 12:03:38 PM (3 occurrences) 
Last logged: 12:04:37 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 552, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 328, in _async_write_ha_state
    attr.update(self.device_state_attributes or {})
  File "/config/custom_components/smartthinq_washer/sensor.py", line 382, in device_state_attributes
    ATTR_RESERVE_TIME: self._reserve_time,
  File "/config/custom_components/smartthinq_washer/sensor.py", line 447, in _reserve_time
    if int(reserve_min) < 10:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Washer Remote Start

It would be really great if this integration was not only a sensor, but could also support washer remote start function.

I would like to trigger remote start of a loaded washer in standby mode by using geolocation and automation when I or the other half are heading back in the direction of home, such as traveling back from the office etc.

Gui Titles missing

Hi there Ollo69,

First of all thanks to your work! 3x coffees for you :)

Got i working with the previous version today, setup through HA Gui was quiet simple. Upgraded to todays latest release 0.3.6 and something messed it up.
Reinstalled it via HACS, and now if i want to add the integration the popup do not show Titles anymore.

image

Not sure what i am doing wrong :(

br
mole

Missing logo brand for hass 0.108 (now beta)

Missing brands for this integration.

https://rc.home-assistant.io/blog/2020/03/27/release-108/

Integration logos & icons
We have created a new repository on GitHub containing all the brand icons and logos Home Assistant is able to integrate with. These images are, for example, used in our documentation.

In 0.108, we made a start on using the content from this repository in the Home Assistant frontend. The device information page got a layout update and the integrations page as well.

These pages will now show the icons and logos matching the integration.

Unknown Washer Status

This isn't breaking my functionality, just shows up in the Developer Log window so thought I'd bring it to your attention. I have the WVC9-1410W washer dryer combo which is relatively new.

Log Details (WARNING)
Logger: custom_components.smartthinq_sensors.wideq.device
Source: custom_components/smartthinq_sensors/wideq/device.py:819
Integration: SmartThinQ LGE Sensors (documentation)
First occurred: 7:05:39 PM (1 occurrences)
Last logged: 7:05:39 PM

ThinQ: received unknown WASHER status '@WM_TERM_NO_SELECT_W' of type 'SpinSpeed'

[BUG] Update for sensor.washer failes

Describe the bug
Getting these errors in my logs.

Environment details:

  • Environment (HASSIO, Raspbian, etc): HASSIO
  • Home Assistant version installed: 0.110.2
  • Component version installed: 0.4.7
  • Last know working version: N/A
  • LG device type and model with issue: Washer/WT7800CV
  • LG devices connected (list): Washer, Dryer

Output of HA logs
Paste the relavant output of the HA log here.

2020-06-04 13:39:06 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.washer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 308, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7faabe0248d0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='aic-service.lgthinq.com', port=46030): Max retries exceeded with url: /v1/service/application/dashboard (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7faabe0248d0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthinq_washer/sensor.py", line 256, in update
    self._api.device_update()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/smartthinq_washer/__init__.py", line 330, in device_update
    raise ex
  File "/config/custom_components/smartthinq_washer/__init__.py", line 318, in device_update
    state = self._device.poll()
  File "/config/custom_components/smartthinq_washer/wideq/washer.py", line 29, in poll
    res = self.device_poll("washerDryer")
  File "/config/custom_components/smartthinq_washer/wideq/device.py", line 646, in device_poll
    self._client.refresh_devices()
  File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 605, in refresh_devices
    self._load_devices(True)
  File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 560, in _load_devices
    self._devices = self._session.get_devices()
  File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 421, in get_devices
    devices = self.get2("service/application/dashboard").get("item", [])
  File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 413, in get2
    language=self.auth.gateway.language,
  File "/config/custom_components/smartthinq_washer/wideq/core_v2.py", line 133, in thinq2_get
    timeout=DEFAULT_TIMEOUT,
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='aic-service.lgthinq.com', port=46030): Max retries exceeded with url: /v1/service/application/dashboard (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7faabe0248d0>: Failed to establish a new connection: [Errno -3] Try again'))

Additional context
Add any other context about the problem here.

Notification upon load completion

Anyone have an example YAML or Node-Red of how you're detecting when the load is complete? I'd like to send a notification over my Alexa devices.

New warnings in HA 0.109.0b0

As the title says, HA is making some changes in 0.109 and so far I have seen these two warnings.

2020-04-22 15:40:33 WARNING (MainThread) [homeassistant.helpers.translation] smartthinq_sensors: the '.translations' directory has been moved, the new name is 'translations', starting with Home Assistant 0.111 your translations will no longer load if you do not move/rename this 
2020-04-22 15:37:53 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for smartthinq_sensors doing I/O at custom_components/smartthinq_sensors/wideq/device.py, line 234: return requests.get(info_url, timeout=DEFAULT_TIMEOUT).json()

Invalid redirection URL error

Hello I`m using you add on, I installed it from Hacs and configure by Integrations because I don't have any tokens. I am following your wiki tuto

but at the final of the process I get an
Invalid redirection URL error I try with almost all, includes my hassio duck dns domain.

Could you please help me ? Thanks and best regards

Remember tubclean count (feature request)

This is just a small tweak, the tubclean count shows N/A after turning off the washer for a while. I think it would make more sense to maintain the counter and update it as the number changes.

Thanks for all the updates, "patiently" waiting for the dryer release that you are working on.

Temp and spin error and showing wrong model

I’m on version V0.3.4
I have 2 problems

In my log I get this error

Log Details (WARNING)
Logger: custom_components.smartthinq_sensors.wideq.device
Source: custom_components/smartthinq_sensors/wideq/device.py:726
First occurred: 10:57:11 PM (2 occurrences)
Last logged: 10:57:11 PM

ThinQ: received unknown WASHER status '@WM_FL24_TITAN_SPIN_SPEED_1000_W' of type 'spin_option'
ThinQ: received unknown WASHER status '@WM_FL24_TITAN_TEMP_60_W' of type 'water_temp'

And in washing machine/dryer it doesn’t show the Temp and also it doesn’t show spinning, I have made a screenshot showing info

And also in one of the pictures showing status it seems it is identifying wrong model of my machine

I have a picture of the tag on my machine showing correct model

image
image
image
image
image

[Feature Request] More Languages to Translate

Dear ollo69,

This custom integration is awesome and it may be even greater if we all help in having more languages available.

Therefore, it would be great if you could share how we can translate it and what do you need from us in order to get it working with more languages.

I'm willing to translate it to Spanish ;)

Thank you!

LGE Washer: Invalid Login info!

I am receiving the following error in the log after I submit the access token:

Log Details (ERROR)
Logger: custom_components.smartthinq_washer.config_flow
Source: custom_components/smartthinq_washer/config_flow.py:67
First occurred: 10:23:30 PM (2 occurrences)
Last logged: 10:25:06 PM

LGE Washer: Invalid Login info!

Error Loading on 0.4.2

Seem to have a problem running on 0.4.2, 0.4.1 works flawlessly. Looks to error out attempting to load the devices. Worth noting that both my Refrigerator and Dishwasher are only Tap-On devices, so while they are attached to my LG account they don't actually report back data over Wi-fi, they still get loaded though.

2020-05-05 12:49:56 INFO (MainThread) [custom_components.smartthinq_sensors] SmartThinQ client connected.
2020-05-05 12:49:56 INFO (MainThread) [custom_components.smartthinq_sensors] Starting LGE ThinQ devices...
2020-05-05 12:49:56 INFO (SyncWorker_38) [custom_components.smartthinq_sensors.wideq.core_v2] Loading model info for REFRIGERATOR. Model: Normal-101, Url: https://aic.lgthinq.com:46030/api/webContents/modelJSON?modelName=Normal-101&countryCode=WW&contentsId=JS0314074028491784&authKey=thinq
2020-05-05 12:49:57 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry LGE Devices for smartthinq_sensors
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 216, in async_setup
    hass, self
  File "/config/custom_components/smartthinq_sensors/__init__.py", line 163, in async_setup_entry
    lge_devices = await lge_devices_setup(hass, client)
  File "/config/custom_components/smartthinq_sensors/__init__.py", line 398, in lge_devices_setup
    await hass.async_add_executor_job(dev.init_device)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthinq_sensors/__init__.py", line 280, in init_device
    self._model = f"{self._model}-{self._device.model_info.model_type}"
AttributeError: 'NoneType' object has no attribute 'model_type'

Additional attribute: remain_time_in_minutes

Hello,

is it possible to add an attribute: remain_time_in_minutes? I need this value for the lovelace ui for the custom:circle-sensor-card. And it would be easier for calculations in automations.

THX

Washer current state

Hi,
If I'm right, in a washer, the run state is what the washer is doing now and pre state is the previous state?

Right now I see on on run state "detecting" and on pre state "drying" (it's a washer/dryer), but the washer is drying. Seems that they are in the wrong order.

image

Thanks
Pablo

LG Refrigerator is not displaying fridge temperature

image

model: 1REB1GLPX1___-BF
mac_address: '#####'
refrigerator_temp: '-'
freezer_temp: '-17'
temp_unit: °C
door_open_state: 'off'
smart_saving_mode: Smart Saving Not Used
smart_saving_state: '-'
eco_friendly_state: 'Off'
ice_plus_state: 'Off'
fresh_air_filter_state: unknown
water_filter_used_month: '255'
friendly_name: Refrigerator
icon: 'mdi:fridge-outline'

The refrigerator_temp is not displayed at all, and i think the smart_saving_state is alos not diplayed properly. I can help test if needed.

Problem with upgrade on new version

Hi,

I have problem with upgrade from 0.3.8 to 0.4.6. After upgrade, next step is restart HA, after start HA I have version 0.3.8.

Where is problem? In log not show error with upgrade...

Thanks

Washing machine timer

Hi ollo69,

First of all, this is awsome, you are awsome!

I was just woundering as you are the expert, is it easy to make a countdown timer of % progress bar for a wash that is running?

Like the "initial_time" - "remain_time" = % done or a timer?
Now I only have the binary sensor which is also handy but a timer would be even more awsome.

I have seen a few solutions but I think you would probably have a better solution :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.