hass-smartthinq icon indicating copy to clipboard operation
hass-smartthinq copied to clipboard

add Washer

Open PawelTroka opened this issue 5 years ago • 13 comments

since Washer is already exposed in https://github.com/sampsyo/wideq, it should be pretty straightforward to map existing entities to Home Assistant

PawelTroka avatar Oct 13 '19 19:10 PawelTroka

I would also be happy if the plugin would support washing machines.

The following code I get from wideq example.py when the washer is running:

State: @WM_STATE_RUNNING_W
Remain_Time_H: 1 (0-30)
Remain_Time_M: 33 (0-59)
Initial_Time_H: 1 (0-30)
Initial_Time_M: 41 (0-59)
Wash: @WM_TITAN2_OPTION_WASH_NORMAL_W
SpinSpeed: @WM_TITAN2_OPTION_SPIN_1200_W
WaterTemp: @WM_TITAN2_OPTION_TEMP_40_W
RinseOption: @WM_TITAN2_OPTION_RINSE_NORMAL_W
DryLevel: -
Reserve_Time_H: 0 (3-19)
Reserve_Time_M: 0 (0-59)
PreState: @WM_STATE_DETECTING_W
TCLCount: 40 (0-60)
LoadItem: 0
CourseType: 0
CourseType: 0
Standby: @CP_OFF_EN_W_

dieneuser avatar Oct 27 '19 10:10 dieneuser

Would also love to help expose this, just got an LG washer and setup thinq

rwarner avatar Oct 31 '19 23:10 rwarner

@PawelTroka and @rwarner can you also give an example output just like @dieneuser did? I am planning on adding it in: https://github.com/sampsyo/hass-smartthinq/pull/32

gvdhoven avatar Nov 07 '19 14:11 gvdhoven

@Webunity sure thing, I would love to. Last time I ran example.py however for some sample output on the network it didn't seem to find the Washer at all. Just gave me blank output.

I think other people are encountering the same thing here: https://github.com/sampsyo/wideq/issues/46

Any suggestions on how to proceed?

rwarner avatar Nov 07 '19 14:11 rwarner

I just downloaded the latest code from wideq, setup a new account and managed to find and poll my washing machine. I've managed to add a new washing machine sensor to your code which seems to be working. I don't mind creating a pull request if that helps?

BottlecapDave avatar Dec 14 '19 10:12 BottlecapDave

Good day. I installed the server HA as a virtual machine with Ubuntu. Installed your plugin wideq. Can I do something to help add refrigerator LG support?

scrol8 avatar Dec 14 '19 12:12 scrol8

hi, sorry for my bad english. i'm french. i add your github in my Home assistant. I only have a washer. do you know when it will be available please? Thank you for your work ;)

JeedHome44 avatar Dec 27 '19 17:12 JeedHome44

I can test the addon for you with my washing machine if you tell me how to do it. thank you

JeedHome44 avatar Jan 15 '20 05:01 JeedHome44

Hello everybody. Great work! Very appreciative! The only LG appliance I have is a (clothes) washing machine. I saw some indications that this wasn't supported, but saw some mixed messages too, so I just tried it anyway.

I followed instructions today on this repo, master branch, and setup hass-smartthing. As it advises, I also set up wideq (also today, master branch) in a temp folder to get a refresh_token.

When I use wideq standalone CLI example.py, I see my washing machine (in ls, with a UUID), and if I do mon UUID on the washing machine, it correctly spams the device status out to the terminal. So I know this part is working.

I know that Home Assistant correctly loaded this as custom_component and the component is running, because at first, every time I rebooted Home Assistant, it threw an error regarding token problem to Notifications and to Logs. I then figured out this was because I used access_token instead of refresh_token, fixed the token accordingly, and it no longer puts any error messages into Notifications or into Logs. So for (only) this reason (errors, then no more errors), I think the component is properly loaded and is running.

But I check Developer Tools -> States and scroll the list of current entities, and I do not see anything new regarding a washing machine. Am I looking in the correct place? If this was working, should I be correct in expecting a new entity to magically appear in this list? Do I have the correct state of the problem as per this Issue #30 thread here? Or am I misunderstanding how to use it?

If I have the correct understanding of the issue, is there anything that I can do to get the washing machine to appear? Is there a custom branch or custom fork of this which might provide this type of support?

Hello @BottlecapDave I see here that you commented saying you were able to add this entity. Is this something you might be able to share? (I creeped on your public repos but did not see a fork.)

maarxx avatar Feb 02 '20 03:02 maarxx

Sorry I've been quiet. I was wanting to look at the othe forks of this repo to see what they'd implemented but I haven't found the time.

So I've pushed my fork of this repo to https://github.com/BottlecapDave/hass-smartthinq which includes my washer sensor. Disclaimer - My washing machine is a UK branded one that was purchased ~ 2 years ago so I can't guarantee that other regions/older/newer washing machines will work as well.

I've also updated the base entity to include a unique id so that you can change the name in the Home Assistant UI.

BottlecapDave avatar Feb 02 '20 09:02 BottlecapDave

Thanks @BottlecapDave !

It worked flawlessly. I only had to switch to your fork, restart Home Assistant, and my washing machine immediately appeared as a sensor entity in Developer Tools -> States.

For anyone here less tech savvy, the approximate steps to switch to Dave's version is something like this:

cd ~/.homeassistant/custom_components/smartthinq/
git remote add bottlecapdave [email protected]:BottlecapDave/hass-smartthinq.git
git fetch bottlecapdave
git checkout bottlecapdave/master

maarxx avatar Feb 03 '20 23:02 maarxx

BottlecapDave's fork works great with my new LG washer. I'm in the US. My dishwasher still shows up correctly too. Now I just need the dryer. Might try to look at the code to see how easy it would be to add it.

bakazm avatar Feb 06 '20 03:02 bakazm

This github work very well with washer! i use it! it's very simple to add this in Hassio! https://github.com/ollo69/ha-smartthinq-sensors

JeedHome44 avatar May 10 '20 20:05 JeedHome44