I managed to track down a Wi-Fi unit (PWFMDD201) locally for $111. I’m getting excited now!
I have my WiFi dongle, and my AC unit arrived just now… the unit is slightly different than advertised.
The item description said B55AWY N7G5A but I got a B55AWY N7G6
The ‘Outside-Unit Model’ is the same (B55AWY U3G6) though.
Hi all, I have try again with Home Assistant Core. And after enter the URL I got some error in the image. If you could please help me fix this. Thanks you all.
Device: Rasberry pi 4, Home Assistant Core, copy by WinSCP and using PuTTY for SSH.
Just glancing… that seems like an SSL error… I think some regions need to be forced to use (the horribly insecure) SSLv1 to work.
Ok so found a few threads on this, and this one got me the furthest so far. I was able to download both items, run the example from within the docker container (was trying from Ubuntu host before with errors), and get the .json output file to get the token…
Added the lines to HA, and rebooted and no errors thrown, so success? No, when I look in both integrations an devices I don’t see Smartthinq anywhere, and when I try to add a thermostat I only see my ecobee (that I added earlier), and not the LG portable unit.
Only thing in extended logs are a informational warning that I have loaded smartthinq as a custom item and it will need to be maintaned manually.
Any ideas on what next? Is this an API 1 vs 2 thing? I’m also in Canada, created the LG account back around May/June 2020, and the unit is a LG LP1419IVSM (14,000 BTU portable with wifi)
You can confirm the APIv1/2 thing by trying the fork of wideq (mentioned above somewhere) that supports APIv2 devices… if your device shows up (outside of HA) then you know that is the issue.
Ok so I found that and ran it, and yes, I do get a return from the wideq for API v2 (used the gladhorn/ wideq version mentioned above). So does this mean I can somehow use this instead of the other version, or that I’m SOL until v2 works somehow?
If it is the former, how would I go about doing it? just replace the wideq folder with the one from the “updated” version?
EDIT: I did just try replacing the wideq folder(s) with this newer one, regen the refresh token, and rebooting HA, but still same thing. No errors in log, but also no AC unit either.
I do not think it is as simple as swapping out the wideq folder. I think they are incompatible and work needs to continue on this branch before we will have success in HA.
My aircon should be installed next week, and I suspect I will be in the same situation as you.
Eureka, vola…Finally I can add my LG AC to HA Thanks all and @sampsyo for hass_smarthinq and wideq
Here are my experiment:
- If you are using hassio and cant run python, try Home Assistant Core.
- If you got token error, try new account with US country.
- If you got SSL error, try edit the line in the image below
How About a Step by Step from very beginning to the end thanks
Good to hear it is working for you… I assume the device is an APIv1 device?
When you say APIvX device, the API call from HASS is against LG cloud. Help me understand, is the working theory that the device you buy somehow puts you in a different zone in that LG cloud, hence a diff API? I guess im lucky im on the working variant. I would have first assumed that it was region based (i.e AU LG cloud works), but i guess thats not the theory?
To be honest, I am quite confused about it…
As far as I can tell, the theory seems to be:
- Newly created LG accounts use APIv2
- New hardware uses APIv2
But, that doesn’t seem to make sense… what if you get an ‘older model’ unit, but a new account? It must work. Otherwise LG would have a lot of complaints against them… or, a new unit, with an existing LG account.
An installer is coming tomorrow to quote on my install, so hopefully I will know more within a week or so.
Can you (sanitise it first) show me your wideq_state.json? I want to see what API endpoints and stuff you’re using… Im hoping since I am also in AU, mine is going to work.
I tried both wideq from sampsyo and gladhorn, both way can get information from LG cloud. With my situation, information from gladhorn wideq are more than sampsyo ( gladhorn way provice ssid name, type of AC, mac address…, sampsyo just show name of AC and type of AC ), I get the wideq_state.json file firstly from gladhorn way but i got some problem with swing function of my AC so i change back to sampsyo way and get the same problem So I thinks APIv2 or APIv1 is not the problem.
FYI: My VN account is 5 months old, and my US account is 2 days old. My LG AC CST_570004_WW is working with US account.
Ok, based off that, I am using the same auth_base, api_root and oath_root URLs, so I hope that means it will all work for me, as it does for you.
So just to chime in here again…at least in my case, when I ran the original “v1” wideq, I got no return from the cli, but in the .json file I got essentially the same as Keiran posted above. When I ran the “v2” wideq, I got similar, but also a bunch of stats on my AC unit from temp, to mode, etc, etc.
Using v1, I got no errors in HA (just a warning I was using a custom component that could break in future updates), but also no devices added. V2 should work, but then no idea how to make things use that version instead, and simply replacing the wideq folders with the new one did nothing.
As for v1 vs v2, all I can say is I made my account back around June 2020, and could authenticate to both, so logins seem to work independent of each. But again, I only got a device return on v2, so maybe it forks depending on which device is accessed within an account? (eg. a new account can make calls to either api depending on device in the official app, if that makes any sense)
How About a Step by Step from very beginning to the end thanks
Hi,
First, If you are using hassio ( Check by configuration -> Info -> Hassio = true ) I cant help you, because I dont know how to run python command
So, prepare some tool for using ssh command, file editor ( FILE EDITOR addon ) and some basic knowledge of python and start with https://github.com/sampsyo/hass-smartthinq , follow the instructions step by step. When you run below command
$ python3 example.py -c US -l en-US
If you got SSL error like my previous question, just edit the file in the picture of my last post.
After that, if you got an error like " permission " lets try again with the command below
$ sudo python3 example.py -c US -l en-US
If everything right, you will get an file name wideq_state.json in wideq folder. At this moment 90% of work complete. Just follow the next step in the link.
Because of some AC model in different country have different function so they will not work with sampsyo code, you need to remove some line of his code for your AC can work. If you got error, just post here and every one can help you.