JeffSteinbok / hass-dreo

Dreo Smart Device Integration for Home Assistant
MIT License
118 stars 34 forks source link

Dreo Smart Humidifier #60

Closed raptor464 closed 2 weeks ago

raptor464 commented 1 year ago

Are there any plans to support DREO Smart Humidifier, Model # HM311S

https://www.amazon.com/Dreo-Humidifier-Humidifiers-Ultrasonic-Nightlight/dp/B0CCVX6FSD?ref_=ast_sto_dp

JeffSteinbok commented 1 year ago

No immediate plans but perhaps. If it just acts like a fan perhaps.

Send me the diagnostics pls.

raptor464 commented 1 year ago

Here is the diagnostics file:

config_entry-dreo-c4f6978b7273aaf72105a86d1b4f1180.json.txt

JeffSteinbok commented 1 year ago

Ok, it's quite different than the fans. So, right now, no, I'm going going to be able to add it. I may be able to give you a private drop that contains power on/off and you can tell me if it works for you.

tensiondriven commented 9 months ago

+1 for HM311S.

My ideal needs would be (and in order of importance):

The ability to set a target humidity, control the internal light/illumination, control the display, or control sleep mode is less important to me.

asheroto commented 9 months ago

Hey I'm interested in this as well! Same model.

I'm willing to help contribute to the code base so will look at this closer tomorrow.

asheroto commented 8 months ago

Finally had a chance to look at it and was able to capture some debug info. (also submitted a PR!)

The only difference between mine the other one mentioned is that I'm using the white colored Dreo humidifier. Amazon link

I'm not sure if this will give you any more information, but thought I'd share anyway.

Here is the log: log.txt

And here is the diagnostics: config_entry-dreo.json

Also thought I'd mention, in case you don't already use it, JSON Crack is a wonderful way to visualize JSON data. Makes it easier to read. They have a VS Code add-in as well.

PapiOrtiz commented 3 months ago

I just wanted to jump on the Humidifier train -- just got a HM713S. Gonna see if I can figure out getting some logs + the JSON diagnostics.

PapiOrtiz commented 3 months ago

This was a fun project to figure - and turned out to be a lot easier than I expected. The docs attached below are for the following Dreo Humidifier. Model: DR-HHM003S Series Name: HM713S/HM813S Amazon Link: https://a.co/d/00PblSU2

Here is the config entry for the Humidifier: config_entry-dreo diagnostics-5a43b239033815df280aced23abaa2c4.json

Here are the Debug Logs for all the functions I called to the Device -- I spaced them out so it's easier to read. Let me know if you have any questions on what I did vs. the command reported. Dreo Debug logs - clean.txt

Last - I saw in the config entry (line 313) that it can report when the humidifier needs to be cleaned. I didn't see it in the logs, but if this could be pulled in, that would be awesome.

Thanks again for the help & let me know if there's anything I can do to make this easier on you.

PapiOrtiz commented 3 months ago

For added context, I've also attached some screenshots of how the device operates from within the app. Device Controls - Auto Mode

Controls_Auto

Device Controls - Manual Mode

Controls_Manual

Device Controls - Sleep Mode Controls_Sleep

Device Entities - Humidity + Filter Life

Device Entities_Humidity + Filter Life

Device Entities - Cleaning Reminder

Device Entities_Cleaning Reminder

asheroto commented 3 months ago

I have the HM311S, same as the OP, and the screenshots you shared look the same as what I see in the Dreo app, except my model does not have a "Warm Mist" feature. Let me know if I can provide any additional information or test a beta version.

jprocket45 commented 1 month ago

It has been a while but I have the new HM524S and would love to see humidifiers added, not sure if this is dead but figured I would say something as well to show more interest!!

droolingtaz commented 1 month ago

I just purchased a HM311S. It would be really awesome to be able to automate it with my Home Assistant.

JeffSteinbok commented 3 weeks ago

I need an additional log from someone with a humidifier. Sync the attached branch into HA and run Diagnostics.

Alternatively, if you have a Python installation... Just change the username/password

import time
import sys
import importlib.util
spec = importlib.util.spec_from_file_location("pydreo", "custom_components/dreo/pydreo/__init__.py")
pydreo = importlib.util.module_from_spec(spec)
sys.modules["pydreo"] = pydreo
spec.loader.exec_module(pydreo)
import logging
import asyncio
import threading
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

dreo = pydreo.PyDreo(username='x', 
    password='y'
    )
dreo.login()
dreo.enabled = True
dreo.load_devices()
JeffSteinbok commented 3 weeks ago

Specifically I need the JSON response from the GetDeviceState call.

The branch may actually partially work too.

jprocket45 commented 3 weeks ago

I will take a look at this later today and see if I can figure this out, I have the Diagnostics feature setup in HA but have no idea where to put this information but give me a little bit, and I'll see If I can figure it out, if not hopefully someone else is more advanced in this lol, I have the JSON from dreo add-on in HA that shows the humidifier but have no figured out where to run the code above. ( I am not good at this kind of thing )

jprocket45 commented 3 weeks ago

config_entry-dreo-5f32b88582efd2df9ea5fa282dbe0592.json

let me know if this helps!

novamcgurk commented 3 weeks ago

Just bought an ‎DR-HHM001S and would be very interested as well.

config_entry-dreo-01J7EB5H63BRRSCDK3Q67MQJ1W.json

JeffSteinbok commented 3 weeks ago

config_entry-dreo-5f32b88582efd2df9ea5fa282dbe0592.json

let me know if this helps!

This doesn't have what I need unfortunately. Are you able to use HACS to install from this specific branch? There is a service to call where you can pass in the commit hash to install from therem.

JeffSteinbok commented 3 weeks ago

See https://github.com/hacs/integration/issues/4009 for info. Try to install the latest one from the branch

JeffSteinbok commented 3 weeks ago

Just bought an ‎DR-HHM001S and would be very interested as well.

config_entry-dreo-01J7EB5H63BRRSCDK3Q67MQJ1W.json

Thanks! Can you please do that with the latest commit from the attached branch, or the python script above?

novamcgurk commented 2 weeks ago

Hope i used the python script the right way, this is what i got. (removed username and password informations)

dreo_py_export.txt

JeffSteinbok commented 2 weeks ago

You did. Thanks.

If you're comfortable trying out the integration from that branch, there is a decent chance it works at least partially for your device. Let me know.

JeffSteinbok commented 2 weeks ago

Please check out 1.1.0b1 and let me know how it works. Once you confirm it works, let me know and I'll promote.

jprocket45 commented 2 weeks ago

I am unsure if this was meant for all humidifiers but I checked out 1.1.0b1 as of now it recognizes my Humidifier but gives only the Panel Sound in controls, will wait to see if @novamcgurk has any better luck since they have a different model and you got the txt from them. image

PapiOrtiz commented 2 weeks ago

Hi @JeffSteinbok

Similar to above comment, i have a different model Humidifier (HM713S) and the device pulled in now, but only Panel Sound is available.

Aside from this, the below errors are now appearing in my Logs.


This error originated from a custom integration.

Logger: py.warnings Source: custom_components/dreo/pydreo/init.py:20 integration: Dreo (documentation, issues) First occurred: 9:43:22 AM (1 occurrences) Last logged: 9:43:22 AM

/config/custom_components/dreo/pydreo/pydreotowerfan.py:75: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? if (preset_modes.count is 0):


Source: custom_components/dreo/pydreo/init.py:21

/config/custom_components/dreo/pydreo/pydreoaircirculator.py:76: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? if (preset_modes.count is 0):


Source: custom_components/dreo/pydreo/init.py:22

/config/custom_components/dreo/pydreo/pydreoceilingfan.py:63: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? if (preset_modes.count is 0):


Source: custom_components/dreo/pydreo/init.py:23

/config/custom_components/dreo/pydreo/pydreoairpurifier.py:55: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? if (preset_modes.count is 0):


Source: custom_components/dreo/pydreo/init.py:27

/config/custom_components/dreo/pydreo/pydreohumidifier.py:57: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? if (modes.count is 0):

JeffSteinbok commented 2 weeks ago

Found it - one of the parts I can't easily test without the device. 1.1.0b2 coming very soon

jprocket45 commented 2 weeks ago

this works! I now have on/off then manual auto/sleep with humidity lvl adjustment is it possible to add the cleaning reminder percent?? if not that is fine not sure what can all be brought in and can't thank you!! image image

JeffSteinbok commented 2 weeks ago

We can, but I’m going to do some other work before cleaning %. Assuming all the core humidifier functions work, I’ll push this release out.

Please file a new issue for the other ancillary features you feel are needed.

-Jeff

On Sep 12, 2024, at 10:08 AM, jprocket45 @.***> wrote:



this works! I know how on/off then manual auto/sleep with humidity lvl adjustment is it possible to add the cleaning reminder percent?? if not that is fine not sure what can all be brought in and can't thank you!! image.png (view on web)https://github.com/user-attachments/assets/e22c93d9-7ff5-4430-bbce-8fb821158b55 image.png (view on web)https://github.com/user-attachments/assets/d9a24a52-be57-4c79-83b6-31674fe099bd

— Reply to this email directly, view it on GitHubhttps://github.com/JeffSteinbok/hass-dreo/issues/60#issuecomment-2346823444, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX5XT3CAROOKBKT7V5GFRLZWHDBZAVCNFSM6AAAAAA5NWGJUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBWHAZDGNBUGQ. You are receiving this because you modified the open/close state.Message ID: @.***>

jprocket45 commented 2 weeks ago

after testing things out I can confirm everything works but one thing is a bit buggy if you are in manual mode you have to go to auto to go to sleep mode it will not go manual to sleep will wait for others to respond as well.

JeffSteinbok commented 2 weeks ago

Are you saying you can't transition from "Manual" to "Sleep" mode? Are you able to do this from the Dreo app itself? If so, can you please enable logging, then perform the actions in the Dreo app and send me the relevant portions of the logs?

From: jprocket45 @.> Sent: Thursday, September 12, 2024 11:00 AM To: JeffSteinbok/hass-dreo @.> Cc: Jeff Steinbok @.>; State change @.> Subject: Re: [JeffSteinbok/hass-dreo] Dreo Smart Humidifier (Issue #60)

after testing things out I can confirm everything works but one thing is a bit buggy if you are in manual mode you have to go to auto to go to sleep mode it will not go manual to sleep will wait for others to respond as well.

- Reply to this email directly, view it on GitHubhttps://github.com/JeffSteinbok/hass-dreo/issues/60#issuecomment-2346919253, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX5XT4ERHBNMYJRJG3KRPTZWHJC7AVCNFSM6AAAAAA5NWGJUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBWHEYTSMRVGM. You are receiving this because you modified the open/close state.Message ID: @.**@.>>

jprocket45 commented 2 weeks ago

I am sorry I can specify better now that I am home and trying it all out basically what is going on is when I push

Dreo App Manuel = Sleep in HA

Dreo App Auto = Manuel HA

Dreo App Sleep = Auto in HA

I am trying to help and apologize that the last report didn't explain anything I hope this explains better if you need me to still enable logging and send a report just let me know. I am far from good at this but working threw it and will try to figure out how to do logging if needed.

JeffSteinbok commented 2 weeks ago

Ok, I'll see if I have what I need, but logs wouldn't hurt. Wonder if I messed up some number mappings.

From: jprocket45 @.> Sent: Thursday, September 12, 2024 12:54 PM To: JeffSteinbok/hass-dreo @.> Cc: Jeff Steinbok @.>; State change @.> Subject: Re: [JeffSteinbok/hass-dreo] Dreo Smart Humidifier (Issue #60)

I am sorry I can specify better now that I am home and trying it all out basically what is going on is when I push

Dreo App Manuel = Sleep in HA

Dreo App Auto = Manuel HA

Dreo App Sleep = Auto in HA

I am trying to help and apologize that the last report didn't explain anything I hope this explains better if you need me to still enable logging and send a report just let me know. I am far from good at this but working threw it and will try to figure out how to do logging if needed.

- Reply to this email directly, view it on GitHubhttps://github.com/JeffSteinbok/hass-dreo/issues/60#issuecomment-2347119520, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX5XTYPHGH6KF2RILKEPJLZWHWMHAVCNFSM6AAAAAA5NWGJUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBXGEYTSNJSGA. You are receiving this because you modified the open/close state.Message ID: @.**@.>>

ryakat commented 2 weeks ago

I have DR-HHM001S and I can confirm there's something going on with the sleep function drop down. If I am in manual mode and then select Sleep the toggle will stay on Sleep for a second and then revert back to Manual. It will also do the same behavior with Auto, if you try to go to Sleep from Auto it will stay on Sleep for a moment and then toggle back to Auto.

jprocket45 commented 2 weeks ago

@ryakat are ur buttons messed up as well though? I am trying to help Jeff with logs if you know how to provide logs better please help since I am not sure what I am doing. @JeffSteinbok I enabled debugging is that the file you need?

raptor464 commented 2 weeks ago

OP here. Just updated to the latest version in HACS and both of my HM311S humidifiers are showing up in HA. I haven't tried messing with them yet but they are showing up and I'm seeing the statuses now. I'll try messing with them to see if the controls work too.

JeffSteinbok commented 2 weeks ago

Think I figured out what may be wrong with modes.

JeffSteinbok commented 2 weeks ago

See 1.1.0b3

jprocket45 commented 2 weeks ago

after doing tests on 1.1.0b3 I can confirm modes are fixed correctly and as I was thinking since those are fixed the sleep mode is also fixed that was reported, it appears everything is up and working on my end.

novamcgurk commented 2 weeks ago

Hi, haven´t had time to test it but did the test with 1.1.0b2 and now with 1.1.0b3 and everything seems to be working as intended with my DR-HHM001S. Than you so much. 🙏

asheroto commented 2 weeks ago

Using a Dreo HM311S and can confirm it works. Thanks for your hard work @JeffSteinbok!!!

I'm guessing these are the other things on the todo list?

JeffSteinbok commented 2 weeks ago

The latter two, maybe. The Schedule, no, use HA for that


From: asheroto @.> Sent: Monday, September 16, 2024 11:00 AM To: JeffSteinbok/hass-dreo @.> Cc: Jeff Steinbok @.>; Mention @.> Subject: Re: [JeffSteinbok/hass-dreo] Dreo Smart Humidifier (Issue #60)

Using a Dreo HM311S and can confirm it works. Thanks for your hard work @JeffSteinbokhttps://github.com/JeffSteinbok!!!

I'm guessing these are the other things on the todo list?

— Reply to this email directly, view it on GitHubhttps://github.com/JeffSteinbok/hass-dreo/issues/60#issuecomment-2353565044, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX5XT32WM5SAYRBBZBMAPTZW4MEVAVCNFSM6AAAAAA5NWGJUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJTGU3DKMBUGQ. You are receiving this because you were mentioned.Message ID: @.***>

asheroto commented 2 weeks ago

Understood, that makes sense.

If you set a up a sponsors section I'll contribute to your work as a thank you. 😊

https://docs.github.com/en/sponsors/getting-started-with-github-sponsors/about-github-sponsors

JeffSteinbok commented 2 weeks ago

Appreciate that, I’ll look into it. Feel free to file a new Issue for the specific features you’re interested in, that way people can grab them.

From: asheroto @.> Sent: Monday, September 16, 2024 11:20 AM To: JeffSteinbok/hass-dreo @.> Cc: Jeff Steinbok @.>; Mention @.> Subject: Re: [JeffSteinbok/hass-dreo] Dreo Smart Humidifier (Issue #60)

Understood, that makes sense.

If you set a up a sponsors section I'll contribute to your work as a thank you. 😊

https://docs.github.com/en/sponsors/getting-started-with-github-sponsors/about-github-sponsors

— Reply to this email directly, view it on GitHubhttps://github.com/JeffSteinbok/hass-dreo/issues/60#issuecomment-2353600003, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX5XT2RH7ETZYJJDT4L3QTZW4OL7AVCNFSM6AAAAAA5NWGJUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJTGYYDAMBQGM. You are receiving this because you were mentioned.Message ID: @.**@.>>

asheroto commented 1 week ago

Not sure if you want me to create a separate issue, but noticed that there is an error in the HA logs related to Dreo Humidifiers.

2024-09-18 12:49:01.301 ERROR (MainThread) [homeassistant.components.humidifier] Error while setting up dreo platform for humidifier
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/dreo/humidifier.py", line 48, in async_setup_entry
    _LOGGER.debug("Humidifier:async_setup_entry: Adding Humidifiers (%s)", humidifier_entities_ha.count())
                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: list.count() takes exactly one argument (0 given)
JeffSteinbok commented 1 week ago

please do. This just noise in logs or something not work?

Get Outlook for iOShttps://aka.ms/o0ukef


From: asheroto @.> Sent: Wednesday, September 18, 2024 11:12:39 AM To: JeffSteinbok/hass-dreo @.> Cc: Jeff Steinbok @.>; Mention @.> Subject: Re: [JeffSteinbok/hass-dreo] Dreo Smart Humidifier (Issue #60)

Not sure if you want me to create a separate issue, but noticed that there is an error in the HA logs related to Dreo Humidifiers.

2024-09-18 12:49:01.301 ERROR (MainThread) [homeassistant.components.humidifier] Error while setting up dreo platform for humidifier Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/dreo/humidifier.py", line 48, in async_setup_entry _LOGGER.debug("Humidifier:async_setup_entry: Adding Humidifiers (%s)", humidifier_entities_ha.count()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: list.count() takes exactly one argument (0 given)

— Reply to this email directly, view it on GitHubhttps://github.com/JeffSteinbok/hass-dreo/issues/60#issuecomment-2359115611, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABX5XT5OCQCXYCXM356KOILZXG7BPAVCNFSM6AAAAAA5NWGJUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGEYTKNRRGE. You are receiving this because you were mentioned.Message ID: @.***>

asheroto commented 1 week ago

Humidifier shows unavailable now, not sure what happened. Wondering if an update knocked it out. Created issue #211. Thank you!