Same problem here. Followed The guide to a T. The log showed the problem detailed here. I fixed that and still no dice.
Any ideas?
Same problem here. Followed The guide to a T. The log showed the problem detailed here. I fixed that and still no dice.
Any ideas?
hi, after installing it from HACS I can’t understand what I need to do to configure it. where do I find the token?
Hi both. Difficult to gauge where you guys are falling down without spelling out exactly what your prob is with logs / screenshots etc.
how confident are you with linux? You just have to follow the instructions here —> https://github.com/sampsyo/hass-smartthinq but I understand thats tricky if you dont know your way around linux/bash. It might be a journey for you (but a good one!) if you dont know those skills yet.
hi, but I don’t have Linux, I have hassio on Raspberry
I am quite confident with linux. I am a network engineer that uses linux daily. I have also been on the development team for 2 commercial IoT devices.
My AC model is the LW1817IVSM
A bit of backstory, I originally tried just doing a vanilla wideq install so I could code up my own webpage and host it on a home server. Wideq never ended up working, but the wideq fork that implements the v2 api sort of did. It could find the AC unit, but not communicate with it. This lead me to the home assistant community. I installed the sampsyo stuff just as asked.
My directory structure is as follows:
/config
custom_components
smartthinq
wideq
After grabbing the refresh token the configuration.yaml file looks like this
Home assistant was rebooted and nothing came up. The next thing I tried to do to troubleshoot was switch out the wideq api v1 and apiv2 repositories and replace the refresh token in configuration.yaml. No dice. I have switched it back and here we are.
If you need more info just let me know. Thank you so much for your time!
Regards,
Jon
Ok, so different levels of t/shooting then by the looks…
@brazil885 - you need to get a CLI up yes, certainly just for step1 (getting wideq to give you back a token, you need to type some stuff and get back other stuff - the token - to copy/paste into your config.yaml). I have a different setup to you (i dont use hassio) but some googling seems to show you can install some stuff to get access to your CLI. See --> Can't access hassio command line from hass.io installed on Ubuntu
@MrPotshot - no way, im actually a network engineer too! first thing that jumps out at me is your directory structure is wrong (if i understand your snip correctly), smartthinq and wideq need to be under custom_components i believe. At least they are for me.
Then after that, and a clean boot, mine just sprung to life - specifically i could see climate.XXXX (XXXX is what you name the device in your LG smartthinq app - for me its ‘air’) so i get the following in developer -> states:
what does your boot up look like? mine looks like this (i schedule a nightly reboot of hass at 1am) - pretty clean in the logs from a smartthinq point of view just one warning (and some other failure at 5am for some other reason - shitty LG API i guess), and then if i look for climate.air in the same log, i get the occasional warning its taking > 10 secs to poll the API (again, same reason!).
Hopefully this gives you enough of a comparison point to crack your problem.
Good luck both!
thanks for the help, when I put the line python3 example.py -c IT -l it-IT, it tells me COMMAND NOT FOUND
Can i get a screenshot? Ive no idea how hassio works to give you a shell. But i suspect its either a PATH problem to python3 (please also type “which python3” to help here) or you are not executing the example.py script from the wideq directory (typing “pwd” will help me here too so please type that too). Screenshot of all this will help. Thanks!
Hi! You are Brazilian? I’m brazilian and I believe I had some problems like you. Maybe I can help you, and if you speak portuguese, can be easier.
Hi Brazil885! Yes, I’ll try help you in english (Google Translate can help me, lol), so I apologize for any mistakes with the language.
In reality “hassio” works with background linux. However, I spent days and nights researching and trying to understand what nobody explains, which is how to give the command in Python inside the Home Assistant.
First of all, copy the “smartthinq” and “wideq” folders that you downloaded from the repository to the “custom_components” folder, which in turn must be inside “config”!
Now that the secret comes, lol … After a lot of research and several attempts, I finally found out that I needed to use an “Add-on” in the Home Assistant, called “Portainer”, that’s where you’ll run example.py with Python.
To do this, go to “Surpevisor” >> “Add-on Store” and search for “Portainer”. After installing it, go to “Configuration” and add these two lines:
log_level: info
agent_secret: YOUR PASSWORD FOR HOME ASSISTANT
Save. Returns to “Info”. Enable “Show in sidebar” and disable “Protection mode”. You can now start “Portainer”.
Open the “Portainer” in the sidebar. Click on “Primary” on the home screen, then click on “Container”, this will show “homeassistant”. In the “Quick actions” column, click on Exec Console (> _), then on “Command”, select “/ bin / ash” and click “Connect”.
The console written: “/ config #” will open. Then type: “cd custom_components” (without quotes) and press Enter. The console will then display: “/ config / custom_components #”. Type now: “cd wideq” (again without quotes). At that moment you will be inside the “wideq” folder under “custom_components”. Now just type the command “python3 example.py -c US -l en-US” with your country and language. This will return a link, which you must copy and paste into your browser. This link will open a LG Smartthinq login screen. Log in with your username and password, (it will not work if you are logging in with Google) this will open a blank screen, but it does not matter, as you will only need what is written in the address bar. Copy the code between “refresh_token =” and “&”.
Now just open the file “” and type the following lines:
smartthinq:
token: YOUR TOKEN CODE
region: YOUR COUNTRY
language: YOUR LANGUAGE
Save the file. Return to the Home Assistant, validate the configuration and restart the server.
After restarting the home assistant, your air conditioning should be set to “Unused entities”.
I hope everything goes well, but if you encounter any problems let me know so I can try to help you.
Try entering this line before you call your python3 command
export PYTHONPATH="${PYTHONPATH}:/config/custom_components/wideq/"
then I managed to do everything, but once restarted I don’t see the entities. I have 2 air conditioners but I don’t see them. Filipecalvo says I visualize them in Unused entities, but where are they located?
I reckon it might be to do with the fact that your hassio container setup forgets the EXPORT command that I mentioned above, between reboots. Sorry again, i dont run mine with hassio so its a bit of guesswork. The best way to start troubleshooting this is check your /config/home-assistant.log file. Do you get any errors in there regarding wideq or smartthinq when you boot up?
2020-07-04 00:20:02 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alexa_media 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-07-04 00:20:02 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-07-04 00:20:02 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-07-04 00:20:02 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for smartthinq 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-07-04 00:20:03 WARNING (MainThread) [homeassistant.components.http] The ‘base_url’ option is deprecated, please remove it from your configuration
2020-07-04 00:20:07 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for samsungtv_tizen 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-07-04 00:20:27 ERROR (SyncWorker_2) [homeassistant.components.google_maps.device_tracker] The cookie file provided does not provide a valid session. Please create another one and try again.
2020-07-04 00:20:27 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
2020-07-04 00:20:28 WARNING (MainThread) [homeassistant.components.climate] ClimateDevice is deprecated, modify LGDevice to extend ClimateEntity
2020-07-04 00:20:32 ERROR (MainThread) [homeassistant.components.vacuum] xiaomi_miio: Error on device update!
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 319, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 466, in async_device_update
self.update # type: ignore
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/components/xiaomi_miio/vacuum.py”, line 470, in update
state = self._vacuum.status()
File “/usr/local/lib/python3.7/site-packages/miio/vacuum.py”, line 197, in status
return VacuumStatus(self.send(“get_status”)[0])
File “/usr/local/lib/python3.7/site-packages/miio/device.py”, line 147, in send
command, parameters, retry_count, extra_parameters=extra_parameters
File “/usr/local/lib/python3.7/site-packages/miio/miioprotocol.py”, line 150, in send
self.send_handshake()
File “/usr/local/lib/python3.7/site-packages/miio/miioprotocol.py”, line 62, in send_handshake
header = m.header.value
AttributeError: ‘NoneType’ object has no attribute ‘header’
some idea?
Those logs are ok. WARNINGS are ok. ERROR lines are not.
Could it be you just dont know how to tell if its been detected ok?
What did you call your LG in the smartthinq app? For me, its “air” so what i have is “climate.air”. Go to developer->states and search in your browser for “climate” - see what you find.
thanks for the help, but no entity appears to me, something is wrong!in my opinion this line of the log has something to do with it:
2020-07-06 21:18:51 WARNING (MainThread) [homeassistant.components.climate] ClimateDevice is deprecated, modify LGDevice to extend ClimateEntity
Could SmartThinQ LGE Sensors conflict with this component?
After struggling to get the integration working with my LG AC (no device listed in both wideq and HA) I tried to use a fork of wideq:
I repeated the setup process with this wideq fork and was able to list my device. Then I changed the HA config to reflect the newly generated refresh token and restarted HA. Unfortunately, the device was not listed in HA (checked via Configuration > Devices and Developer Tools > States).
In the logging I found the same warning as @brazil885:
2020-07-09 15:39:41 WARNING (MainThread) [homeassistant.components.climate] ClimateDevice is deprecated, modify LGDevice to extend ClimateEntity
In another topic I found that the custom integration should probably be updated:
Could this be the cause of my problem?
Another question: when correctly installed, should the SmartThinq integration pop up in the HACS or HA Integration sections? I don’t see it in both sections:
hello, I have not yet managed to integrate them, let’s see if we can.