Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start washer - "expecting property name enclosed in double quotes" #710

Closed
Particpant opened this issue Feb 25, 2024 · 6 comments
Closed

Comments

@Particpant
Copy link

Describe the bug
When trying to start my washer, which has previously worked, I'm getting an error: "Failed to call service button/press. Expecting property name enclosed in double quotes: line 1 column 27 (char 26).
My dryer continues to allow for remote starts.

Expected behavior
Remote start button on washer device in home assistant triggers a remote start.

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

Environment details:

  • Environment (HASSIO, Raspbian, etc):
    HAOS / x86
  • Home Assistant version installed:
    HA: 2024.2.3 Supervisor: 2024.02.0 OS: 11.5
  • Component version installed:
    v0.38.3
  • Last know working version:
    Uncertain, possibly v0.37.2
  • LG device type and model with issue:
    Washer - F2L2CYV5W_WIFI-FL
  • LG devices connected (list):
    Washer - F2L2CYV5W_WIFI-FL
    Dryer - RV13B6ES_D_US_WIFI-Dryer

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

2024-02-24 20:01:57.908 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.devices.washerDryer] Prepared course data: {'State': '5', 'Remain_Time_H': '1', 'Remain_Time_M': '11', 'Initial_Time_H': '1', 'Initial_Time_M': '11', 'APCourse': '10', 'Error': '0', 'Soil': '5', 'SpinSpeed': '5', 'WaterTemp': '2', 'RinseOption': '3', 'DryLevel': '0', 'Reserve_Time_H': '0', 'Reserve_Time_M': '0', 'Option1': '0', 'Option2': '128', 'Option3': '2', 'PreState': '0', 'SmartCourse': 0, 'TCLCount': '52', 'LoadLevel': '0', 'courseType': 'APCourse', 'RinseCount': '0', 'Rinse_Spin': '0', 'ExtraRinseCount': '0'}
2024-02-24 20:01:57.908 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.devices.washerDryer] Command data content: [10,5,5,2,3,0,0,0,128,34,{{OPCourse}},0,0,0,0,0,0,0,0,0,0]
2024-02-24 20:01:57.927 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140205737257536] Expecting property name enclosed in double quotes: line 1 column 27 (char 26)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 139, in _async_press_action
    await self.async_press()
  File "/config/custom_components/smartthinq_sensors/button.py", line 146, in async_press
    await self.entity_description.press_action_fn(self._wrap_device)
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 634, in remote_start
    await self.set(keys[0], keys[1], key=keys[2])
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 653, in set
    await super().set(
  File "/config/custom_components/smartthinq_sensors/wideq/device.py", line 568, in set
    if full_key := self._prepare_command(ctrl_key, command, key, value):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 559, in _prepare_command
    return self._prepare_command_v1(cmd, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 455, in _prepare_command_v1
    str_list = json.loads(str_data)
               ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 27 (char 26)
2024-02-24 20:02:08.603 INFO (MainThread) [custom_components.smartthinq_sensors] 
-------------------------------------------------------------------
smartthinq_sensors
Version: 0.38.3
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
-------------------------------------------------------------------

smarthinq log.txt
Additional context
I see that a new version has released today, I'll be trying that and updating the bug shortly.

@Particpant
Copy link
Author

Here's a log (I get the same error) on v0.38.4.
Dryer remote start still works, the washer's pause and power off commands also work, and all the sensors seem to work as well.

2024-02-24 22:41:27.541 DEBUG (MainThread) [custom_components.smartthinq_sensors] Updating ThinQ device Washing Machine
2024-02-24 22:41:27.542 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.device] Updating ThinQ device Washing Machine
2024-02-24 22:41:27.542 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.device] Polling...
2024-02-24 22:41:27.543 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.core_async] lgedm2_post before: https://aic.lgthinq.com:46030/api/rti/rtiResult
2024-02-24 22:41:27.885 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.core_async] lgedm2_post after: {'lgedmRoot': {'returnCd': '0000', 'returnMsg': 'OK', 'workList': {'deviceId': 'ca4b7840-1b64-11ed-a6ec-2c2bf949aacc', 'deviceState': 'E', 'format': 'B64', 'returnCode': '0000', 'returnData': 'BQELAQsKAAUFAgMAAAAAgAAAHgAzNAAA', 'stateCode': 'S', 'workId': 'n-ca4b7840-1b64-11ed-a6ec-2c2bf949aacc'}}}
2024-02-24 22:41:27.887 DEBUG (MainThread) [custom_components.smartthinq_sensors] ThinQ status updated
2024-02-24 22:41:27.887 DEBUG (MainThread) [custom_components.smartthinq_sensors] Finished fetching smartthinq_sensors-Washing Machine data in 0.346 seconds (success: True)
2024-02-24 22:41:32.638 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.devices.washerDryer] Prepared course data: {'State': '5', 'Remain_Time_H': '1', 'Remain_Time_M': '11', 'Initial_Time_H': '1', 'Initial_Time_M': '11', 'APCourse': '10', 'Error': '0', 'Soil': '5', 'SpinSpeed': '5', 'WaterTemp': '2', 'RinseOption': '3', 'DryLevel': '0', 'Reserve_Time_H': '0', 'Reserve_Time_M': '0', 'Option1': '0', 'Option2': '128', 'Option3': '0', 'PreState': '0', 'SmartCourse': 0, 'TCLCount': '52', 'LoadLevel': '0', 'courseType': 'APCourse', 'RinseCount': '0', 'Rinse_Spin': '0', 'ExtraRinseCount': '0'}
2024-02-24 22:41:32.639 DEBUG (MainThread) [custom_components.smartthinq_sensors.wideq.devices.washerDryer] Command data content: [10,5,5,2,3,0,0,0,128,32,{{OPCourse}},0,0,0,0,0,0,0,0,0,0]
2024-02-24 22:41:32.648 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139933647255360] Expecting property name enclosed in double quotes: line 1 column 27 (char 26)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 139, in _async_press_action
    await self.async_press()
  File "/config/custom_components/smartthinq_sensors/button.py", line 146, in async_press
    await self.entity_description.press_action_fn(self._wrap_device)
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 642, in remote_start
    await self.set(keys[0], keys[1], key=keys[2])
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 661, in set
    await super().set(
  File "/config/custom_components/smartthinq_sensors/wideq/device.py", line 568, in set
    if full_key := self._prepare_command(ctrl_key, command, key, value):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 567, in _prepare_command
    return self._prepare_command_v1(cmd, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 463, in _prepare_command_v1
    str_list = json.loads(str_data)
               ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 27 (char 26)

@ollo69
Copy link
Owner

ollo69 commented Feb 25, 2024

Please attach diagnostic and if possible log with debug enabled.

@Particpant
Copy link
Author

Particpant commented Feb 25, 2024

smartthinq_sensors-f7d4fe04c78b3fc67f2d30601343d16b-Washing Machine-e1a31b7bd12b6c905fec4fdbd87c61f9.json
Here's the diagnostic.
The logs above were all debug enabled. There's an attached file in the initial post. Let me know if you need me to try any specific steps while debug logging is enabled. Here it is again https://github.com/ollo69/ha-smartthinq-sensors/files/14395492/smarthinq.log.txt

Thanks for building out the integration, btw!

@ollo69
Copy link
Owner

ollo69 commented Feb 25, 2024

No, thanks, this should be enough, I already see the issue in the log.
I'll work on this...

@ollo69
Copy link
Owner

ollo69 commented Feb 25, 2024

Please try new release, it should fix the issue.

@Particpant
Copy link
Author

Confirmed fixed in v0.38.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants