Maytag Smart Washer/Dryer Integration

Would also love access to the repo if possible.

Thanks for the effort!

Hey folks - sorry for the delay. Things have been (and will continue to be crazy) this month. Hoping to have some time around the holidays and will get that NodeJS solution up. If anyone could help port it to python that would be super.

Awesome thanks so much for your work :slight_smile:

Alright folks, finally got everything into a publishable state for the Node.js implementation that I have. I included sample sensor configs in the README.

If you’re familiar with Node.js it should take you 10 mins to implement - its super straight forward. Just set your .env variables and run.

If anyone wants to refactor this into a full-blown integration please be my guest.

Please open issues for bugs, and PRs for bug fixes and new features are always welcome.

3 Likes

@abmantis any thoughts on the level of effort to extend your whirlpool integration to use the endpoints/attributes in this repo? It’s read-only right now, but I think even that would be a good first step.

I would need to port it to the python lib first and then update the integration.
Would you like to open a PR for the lib?

Sorry, jumping on this thread because I ordered this dryer. It looks like the @abmantis code for whirlpool-sixth-sense already includes an appliance.py function. Only difference in the endpoints in that and the node.js above is the country code of the URL.

IIRC, the country code is not relevant and should work as it is now.

Please let me know if you need any help in adding the code to the lib. I can take a shot at it as soon as I find some free time.

You can take a look at the Aircon class. It simply extends from Appliance and parses the aircon related attributes.

I’ve been playing a bit with this. Unfortunately, for my Maytag branded device to work I had to change all the .eu → .com and change headers(client_id,secret, etc) as in the node.js implementation in your auth.py. So far, I can get the raw status (Option V in whirlpool_ac.py) to work. I’ll keep messing with it.

Ah! Interesting! I thought they all used the same servers.
I can work on the lib to allow specifying the region and Brand, and later update the HA integration to allow choosing that during the setup of the integration.

2 Likes

I made a super crappy integration for the Maytag dryer only, which is all I have. Should be enough to get other’s started. Thanks to @abmantis and @funkybunch and @jbronikowski for posting code.

Integration is here for anyone who wants to try it: jdeath/maytag_dryer_homeassistant (github.com)

@abmantis : Would love to edit your awesome config_flow integration, but it is too complicated for me. I just made something super basic.

1 Like

I could help you to quickly get the basics of it working (like turn on/off as a start) on the python lib, and then I can take care of the integration on HA side (and the config_flow too).

If you want, send me a PM and we can chat on Matrix chat for example, so I can help you more quickly.

Will this work for washers too?

No, it won’t work washers yet. I don’t have one. I (or someone else) just needs to have it pull the right fields in. The fields are in the node.js version that @funkybunch posted. I may try to add that capability in the future.

My python isn’t great, but I’m happy to help however is useful @jaaem @abmantis.

Their API is a mess. For quick reference here are the value mappings for the readonly attributes: washers, dryers.

Also, I’ll add this to the README but the status code mappings are buried in a comment in that file too.
0 = off
1 = on but not running
7 = running
6 = paused
10 = cycle complete

Those status codes are the same for washers and dryers.

Thanks. All the code was lifted from your node.js code. I made an update to support washers. Since I do not have a washer, it is untested and I have no idea if it will work. Post any errors you find and I’ll try to update. Due to things happening in a try/except it may be difficult to find the issues, but most likely just typos in the fields.

Awesome! Thanks @jaaem. I’ll test it out sometime today or tomorrow.

I am just finishing setup and will be testing a washer. It is a Whirlpool, but from what I have read they use the same API. I hope that’s correct! I’ll let you now when I have results to share!

Thanks for the work you put into this!

After a server reboot I get this error in the log and no sensor.

Error while setting up maytag_dryer platform for sensor

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 249, in _async_setup_platform
await asyncio.shield(task)
File “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 52, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/maytag_dryer/sensor.py”, line 54, in setup_platform
add_entities(entities, True)
NameError: name ‘entities’ is not defined