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.
Hmm interesting @Neoc83. I had no idea that fork existed, did you dive into why they did it? Sampsyo code obv works fine for me, but wondering if its LG device dependant.
I DONT get those warning in my logs. See my grep looking for any hits on ‘limate’ (capital or lower case c) just now
Sampsyo is very responsive, ive pinged him a few times on github via the ‘raise a new issue’. I wonder if he is aware of the update that hass is asking of him. Perhaps log a new issue if not?
What version of hass are you guys on? Im on v0.107.7 (and confirm it was working to versions a year earlier than that), and in versions upto v0.111 (i had to roll back as something else not related to this broke on the very latest code)… but i cant comfirm i didnt see that same warning. I still dont think thats your problem (its a warning only, and ive seen that a few times before for other things if i recall correct) but not 100% here.
As to if it shows up in integrations, dont think so (i never hunted for it there), sorry. Dev tools -> states defo the place to hunt IMO.
Well it could be device dependent but I expect more people to suffer from it then. From what I can tell the fork is API v2 specific. Apparently there is an API v1 and v2. Maybe that’s also causing the issues. I’m on HA v0.112.4 btw.
I tried some additional things like I was able to install in HASS and it now shows up in the HASS integration:
(For people like me that couldn’t find it: to add custom integrations you need to go to HASS > Integrations > 3 dots icon > Custom integrations)
However, that was causing the same Warning message and still no devices.
Then, I saw a suggested quick fix for the sampsyo repo that was not released yet:
I applied the fix (just a single line of code needs to be changed) and the warning is gone now but still no luck with the device in HA.
I’m thinking of diving into the world of Python programming to see if I can work out a solution myself :-).
I installed this software i get 2 tokens (washing machine and aircodnition). When I add this to configuration file i recive error “The following integrations and platforms could not be set up: smartthinq”
Marcin
@Neoc83 have you tried running wideq from the command line? Heres and example of mine thats working. You plug in the first command, get its output and insert into the second (and third) command. If you DONT get values back like mine then that would be something to look into (sorry for night mode colors on my screenshot!)
Good soot on the issue on GitHub by the way (bless that platform!). And yeah it seems i was right, dont reckon thats your issue
The first command “ls” is working fine but the other 2 “ac-mon” and “ac-config” are throwing an error:
NameError: name 'lgedm_post' is not defined.
Python traceback:
Traceback (most recent call last):
File "example.py", line 237, in <module>
main()
File "example.py", line 233, in main
example(args.country, args.language, args.cmd, args.args)
File "example.py", line 193, in example
example_command(client, cmd, args)
File "example.py", line 169, in example_command
func(client, *args)
File "example.py", line 144, in ac_config
print(ac.get_filter_state())
File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/ac.py", line 239, in get_filter_state
return self._get_config('Filter')
File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/client.py", line 436, in _get_config
key,
File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/core_v2.py", line 382, in get_device_config
'data': '',
File "/home/coen/docker/hassio/homeassistant/custom_components/wideq/wideq/core_v2.py", line 277, in post
return lgedm_post(url, data, self.auth.access_token, self.session_id)
NameError: name 'lgedm_post' is not defined
Hmm…I don’t get anything back when I run “python3 example.py ls -c US -l en-US”. No errors either. I was able to log in and it generated the .json with the token, etc.
I’m using Facebook login to LG, which according to the wideq github should work.
It works with the apiv2 branch https://github.com/gladhorn/wideq/tree/api2_merged :
# python3 example.py -c US -l en-US
#####: AC (AC WIN_056905_WW)
Id suggest reaching out to sampsyo and gladhorn (via a GitHub ‘ issue ‘) and get them merge and reconcile the fork. Ive no idea of the reasons for the fork that gladhorn made, and i wonder if sampsyo knows it exists. Obv better to have all exceptions handled in the same code if possible.
Hello to everyone. I have alreasy setup the air condition, but I have to tell there is a delay of the responses. Do you also have this problem?
i am struggle with the LG AC integration.
wideq from https://github.com/sampsyo/hass-smartthinq only find an manualy added AC (DB-klima-test) in the ThinQapp
wideq from https://github.com/gladhorn/wideq/tree/api2_merged find the the manualy and the real (Klimaanlage) AC
$ python3 example.py -c DE -l de-DE
DB-klima-test (AC Normal-401)
Klimaanlage (AC RAC_056905_WW)
after the integration i add it in the configuration.yaml and reboot the system
smartthinq:
token: [refresh_token]
region: DE
language: de-DE
i get the homeassistant notification:
SmartThinQ Error
SmartThinQ device not available: Db-klima-test > i think this is ok.
But i can not find the AC´s “Klimaanlage” or "Db-klima-test " in Devices or Entities
How do-able is this for a Linux amateur? Can all the scripts be executed from within HASSIO? Also is there any delay in response?
Thanks
Karsten,
It is pretty straightforward if you follow the instructions. I had very little Linux to do - that was more about not having some pre-requisites installed particular to my Hyper-V based VM.
Give it a go - the peeps on here are really helpful if you get stuck but the key is to follow the instructions as far as you can first.
Cheers,
Phil
Is it true that the Python command can not be executed from within Terminal/SSH from within Home Assistant?