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

After upgrade to Bookworm, Error: LG ThinQ WP: wideq_state file not found! #24

Open
PvdGulik opened this issue Dec 14, 2024 · 6 comments

Comments

@PvdGulik
Copy link

PvdGulik commented Dec 14, 2024

2024-12-14 23:39:34.700 Status: LG ThinQ WP: Entering work loop.
2024-12-14 23:39:34.701 LG ThinQ WP: Worker thread started.
2024-12-14 23:39:34.701 Status: LG ThinQ WP: Started.
2024-12-14 23:39:35.688 Status: LG ThinQ WP: Initialized version 2.2.2, author 'majki'
2024-12-14 23:39:35.696 Error: LG ThinQ WP: wideq_state file not found!

Version: 2024.7
Build Hash: b317cfab1
Compile Date: 2024-07-13 16:59:31
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0]

@PvdGulik
Copy link
Author

2024-12-14 23:39:35.696 Error: LG ThinQ WP: wideq_state file not found!
Tried: [(https://github.com//issues/7)]

which end in while registering:

Traceback (most recent call last): File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 427, in <module> main() File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 423, in main ret = example(args.country, args.language, args.verbose, cmd=args.cmd, args=args.args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 339, in example resp = example_command(client, cmd, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 287, in example_command return func(client, *args) ^^^^^^^^^^^^^^^^^^^ File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 75, in ls print("{0.id}: {0.name} ({0.type.name} {0.model_id} / {0.platform_type})".format(device)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/client.py", line 317, in type return DeviceType(self.data["deviceType"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/enum.py", line 717, in __call__ return cls.__new__(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/enum.py", line 1133, in __new__ raise ve_exc ValueError: 406 is not a valid DeviceType

And in domoticz log:

2024-12-16 19:54:30.133 LG ThinQ WP: Worker thread started. 2024-12-16 19:54:30.132 Status: LG ThinQ WP: Entering work loop. 2024-12-16 19:54:30.133 Status: LG ThinQ WP: Started. 2024-12-16 19:54:31.082 Status: LG ThinQ WP: Initialized version 2.2.2, author 'majki' 2024-12-16 19:54:31.090 LG ThinQ WP: wideq_state file found in non-docker location. 2024-12-16 19:54:31.091 LG ThinQ WP: State data loaded from '/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq_state.json' 2024-12-16 19:54:32.097 Error: LG ThinQ WP: Call to function 'onStart' failed, exception details: 2024-12-16 19:54:32.113 Error: LG ThinQ WP: Traceback (most recent call last): 2024-12-16 19:54:32.113 Error: LG ThinQ WP: File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/plugin.py", line 554, in onStart 2024-12-16 19:54:32.113 Error: LG ThinQ WP: _plugin.onStart() 2024-12-16 19:54:32.113 Error: LG ThinQ WP: File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/plugin.py", line 107, in onStart 2024-12-16 19:54:32.113 Error: LG ThinQ WP: self.lg_device = self.wideq_object.operate_device(device_id=self.DEVICE_ID) 2024-12-16 19:54:32.113 Error: LG ThinQ WP: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-12-16 19:54:32.113 Error: LG ThinQ WP: File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/plugin.py", line 740, in operate_device 2024-12-16 19:54:32.113 Error: LG ThinQ WP: client._auth = self.authenticate(client.gateway) 2024-12-16 19:54:32.113 Error: LG ThinQ WP: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-12-16 19:54:32.113 Error: LG ThinQ WP: File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/plugin.py", line 712, in authenticate 2024-12-16 19:54:32.113 Error: LG ThinQ WP: callback_url = input() 2024-12-16 19:54:32.113 Error: LG ThinQ WP: ^^^^^^^ 2024-12-16 19:54:32.113 Error: LG ThinQ WP: EOFError: EOF when reading a line 2024-12-16 19:59:12.723 Status: [web:8080] Incoming connection from: 192.168.1.111 2024-12-16 20:00:01.429 Status: Notification: Battery Low: Garage voordeur (Level: Low)

System info:
Version: 2024.7
Build Hash: b317cfab1
Compile Date: 2024-07-13 16:59:31
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0]

@ajongen
Copy link

ajongen commented Dec 27, 2024

I had the same problem. What I did was replicate the hardware in the hardware page by selecting the old Airco and click Add. This recreates the airco. Then I deleted the old hardware instance. This solved the problem for me. Maybe this solves your problem too.

@PvdGulik
Copy link
Author

Thanks, but sadly it did not solve my problem...

2024-12-27 15:13:37.928 LG ThinQ WP: Worker thread started.
2024-12-27 15:13:37.928 Status: LG ThinQ WP: Entering work loop.
2024-12-27 15:13:37.928 Status: LG ThinQ WP: Started.
2024-12-27 15:13:39.770 Status: LG ThinQ WP: Initialized version 2.2.2, author 'majki'
2024-12-27 15:13:39.773 Error: LG ThinQ WP: wideq_state file not found!

@PvdGulik
Copy link
Author

I completly removed the plugin and started all over, but still no result.:

pi@Domoticz:~/domoticz/plugins/domoticz_lg_thinq_plugin $ python3 example.py -c NL -l en-US
2024-12-28 18:38:22 ERROR [wideq.example] wideq_state file not found. Trying to load default STATE_FILE: wideq_state.json
2024-12-28 18:38:22 INFO [wideq.example] wideq_state will be loaded from: wideq_state.json
2024-12-28 18:38:22 ERROR [wideq.example] No state file found (tried: '/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq_state.json')
Log in here:
https://nl.m.lgaccount.com/spx/login/signIn?country=NL&language=en-US&svc_list=SVC202&client_id=LGAOXXXXXXX&division=ha&redirect_uri=https%3A%2F%2Fkr.m.lgaccount.com%2Flogin%2FiabClose&state=89514028c54211ef911cb827eXXXXXXXX&show_thirdparty_login=AMZXXXXXX
Then paste the URL where the browser is redirected:
https://kr.m.lgaccount.com/login/iabClose?state=89514028c54211ef911cb827ebe2XXXXXXX&code=0frGUgPzX8fxwUIzoyzdqKrHNXXXXXX&user_number=NL190810XXXXXX&oauth2_backend_url=https%3A%2F%2Fgb.lgeapi.com%2F

thinq2 devices: 2
75b21e19-0b3b-1424-886b-b8165XXXXXX: Lucht-water H/P (AC AWHP_019101_WW / thinq2)
Traceback (most recent call last):
  File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 427, in <module>
    main()
  File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 423, in main
    ret = example(args.country, args.language, args.verbose, cmd=args.cmd, args=args.args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 339, in example
    resp = example_command(client, cmd, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 287, in example_command
    return func(client, *args)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/example.py", line 75, in ls
    print("{0.id}: {0.name} ({0.type.name} {0.model_id} / {0.platform_type})".format(device))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/domoticz/plugins/domoticz_lg_thinq_plugin/wideq/client.py", line 317, in type
    return DeviceType(self.data["deviceType"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/enum.py", line 717, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/enum.py", line 1133, in __new__
    raise ve_exc
ValueError: 406 is not a valid DeviceType

Please help, don't know what else to do...

@majki09
Copy link
Owner

majki09 commented Jan 3, 2025

ValueError: 406 is not a valid DeviceType

It seems that your device is not yet supported by the plugin or LG has changed something in their API.

What kind of device you are trying to add to domoticz? Is it air conditioner?

@PvdGulik
Copy link
Author

PvdGulik commented Jan 3, 2025

Your plugin worked with the two devices, only after upgrading tot Bookworm it stopped working.
I have two devices:

  1. AirWaterHeatPump (AWHP), type HM093MR.U44, which always worked in Domoticz.
  2. HeatPumpBolier, type WH27S, which is not supported in your plug-in, see lg-wh27s #19

Even with the not supported WH27S, the AWHP was working till the upgrade to Bookworm.

Both devices are working in HomeAssistant with the plugin https://github.com/ollo69/ha-smartthinq-sensors
And the AWHP is also working in HomeBridge with the plugin https://github.com/nVuln/homebridge-lg-thinq

So I don't understand why I can't it running anymore in Domoticz under Bookworm.

Thanks!

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

3 participants