sampsyo / wideq

reverse-engineered client for the LG SmartThinQ API
https://pypi.org/project/wideq/
MIT License
333 stars 158 forks source link

wideq.core.APIError: ('0011', '등록되지 않은 모델입니다.') #76

Open dacrypt opened 4 years ago

dacrypt commented 4 years ago
  1. Working normal
  2. Go to the app and use it
  3. python3 example.py -c BR -l pt-BR ac-config XXXXX-XXX-XXXX...
    Traceback (most recent call last):
    File "example.py", line 252, in <module>
    main()
    File "example.py", line 248, in main
    example(args.country, args.language, args.cmd, args.args)
    File "example.py", line 196, in example
    example_command(client, cmd, args)
    File "example.py", line 172, in example_command
    func(client, *args)
    File "example.py", line 146, in ac_config
    print(ac.get_filter_state())
    File "/Users/david/dev/dacrypt/wideq/wideq/ac.py", line 239, in get_filter_state
    return self._get_config('Filter')
    File "/Users/david/dev/dacrypt/wideq/wideq/client.py", line 443, in _get_config
    data = self.client.session.get_device_config(
    File "/Users/david/dev/dacrypt/wideq/wideq/core.py", line 395, in get_device_config
    res = self.post('rti/rtiControl', {
    File "/Users/david/dev/dacrypt/wideq/wideq/core.py", line 303, in post
    return lgedm_post(url, data, self.auth.access_token, self.session_id)
    File "/Users/david/dev/dacrypt/wideq/wideq/core.py", line 144, in lgedm_post
    raise APIError(code, message)
    wideq.core.APIError: ('0011', '등록되지 않은 모델입니다.')
  4. Close the app and try again wideq command line utility. It works fine

I'm guessing this error happens because LG doesn't allow 2 users to connect at the same time.

sampsyo commented 4 years ago

I'm guessing so! Unfortunately, if that's the case, there's not much we can do about it on the client side…

dacrypt commented 4 years ago

After testing it several times, I can confirm that is indeed the case.

Maybe just make the utility understand that and inform humanly to the user instead of reporting a python error

techinpark commented 4 years ago

등록되지 않은 모델입니다. in korean mean is unregistered model