That’s odd. Not sure how or what the code does to get that info. Either way, you can just look at that file where you found that info a little more. I believe everything that the link would have is the stuff that’s already in the file. The link simply has it formatted better but it all should be in that file that you need. Just dive into that and see what you find in terms of statuses and such.
Hi, what all do i need to change to get it working n other countries? Im in India, and have an LG AC. I have got it working with sampsyo’s repository. I would like to get the fan speed control, sweep control and fast cooling mode (known as ‘himalayas cool’ in indian ACs) working as well. Thanks in advance.
any ideas why i would be getting this error - running the latest sampsyo component from github.
I’ve checked the token created in example.py and it found the device and matches exactly.
Error while setting up platform smartthinq
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/smartthinq/climate.py", line 41, in setup_platform
client = wideq.Client.from_token(refresh_token)
File "/srv/homeassistant/lib/python3.5/site-packages/wideq.py", line 570, in from_token
client.refresh()
File "/srv/homeassistant/lib/python3.5/site-packages/wideq.py", line 556, in refresh
self._auth = self.auth.refresh()
File "/srv/homeassistant/lib/python3.5/site-packages/wideq.py", line 279, in refresh
self.refresh_token)
File "/srv/homeassistant/lib/python3.5/site-packages/wideq.py", line 232, in refresh_auth
raise TokenError()
wideq.TokenError
That error indicates that the LG servers rejected your authentication token. This might be related to the country where your account resides, or it could be worth trying to just generate a new token by authenticating again.
@samps
thanks for responding - I had this working for me before doing a rebuild - when i run the example.py it detects the device so it appears to be working OK at that level. I’ve tried a few refreshes now however still no luck.
also I have modified the wideq.py to match the Australian region
Had exactly the same problem (wideq.py modified to German account). At every restart my modified wideq.py is overwritten by the standard US one causing above error. Fixed it by commenting out the requirement line in manifest.json in custom_components/smartthinq.
Hi, I got an error below when I change parameters in wideq.py file for Turkish Culture.
COUNTRY = ‘TR’
LANGUAGE = ‘tr-TR’
I think it is a encoding problem.
How can I solve this.
Traceback (most recent call last):
File "example.py", line 176, in <module>
example(sys.argv[1:])
File "example.py", line 162, in example
example_command(client, args)
File "example.py", line 139, in example_command
ls(client)
File "example.py", line 26, in ls
print('{0.id}: {0.name} ({0.type.name} {0.model_id})'.format(device))
UnicodeEncodeError: 'latin-1' codec can't encode character '\u015e' in position 42: ordinal not in range(256)
I am running the hassio image on a Raspberry PI and I am stuck at this step of the wideq installation:
$ python3 example.py
I get the following error
-bash: python3: command not found
Can someone help please ? I guess I need to install python or something like that but the usualy linux sudo commands do not appear to work when I am logged to the Raspberry with ssh
as you can probably tell, I am not a big expert here. Thanks
UPDATE: OK I realized I didn’t need to run example.py on the raspberry so I loaded Python in another computer and used that to get to the refresh token. After that all went well and I am now conrolling my LG AC with home assistant. Amazing work
I’m getting an LG AC in the next couple of weeks and looking for an integration with HA. How is the use of this component with Hassio? I read through all the posts and it seems pretty advanced before you can set it up.
I’ve been messing around with a fork of the custom component and the wideq library from @wkd8176 . I was able to fix 2 big issues I had with the component:
Washer and dryer entities were lost when home assistant was restarted if the washer/dryer were not on.
Instead of spamming the logs with not being able to connect to the washer/dryer after a cycle was done and the machine was no longer reachable, it now simply gets set to an ‘Unavailable’ state and will become ‘available’ again when it gets turned on for the next use.
I plan on cleaning up the diff and opening up a PR, right now it has a lot of extra code (mostly adding washer/dryer states) to make it work with my LG Washer and Dryer. My dryer is always reachable so I didn’t modify the component to set the dryer to unavailable.
If anyone wants to try it out the code is available here:
Hi karsie, I decided to go with the Broadlink climate control since I have one AC unit that can not support Smart ThinQ and was not able to make the component work in Hass.io.
Setup was easy and it does not rely on web services. All is done internally so it is very responsive.
Hi, folks—small update here. First, I’ve put wideq on PyPI:
which should make installation a little less error prone. I have also added configuration options for the language & country parameters, which should obviate all the hacking people have needed to do in non-US locales. You can just put this in your configuration YAML now, for example: