dahlb / ha_hatch

Home Assistant Integration for Hatch Rest Mini
MIT License
92 stars 16 forks source link

Request: Hatch Restore support #37

Open bmcclure opened 1 year ago

bmcclure commented 1 year ago

Hello!

I tried to use this integration first, but it didn't seem to recognize my Hatch Restore. I moved over to the Homebridge plugin instead (https://github.com/dgreif/homebridge-hatch-baby-rest), and it sort of works there, except it only allows me to turn it on (starting from the first step of my workflow only) or off, rather than actually being able to control anything on it.

So this is a two-parter:

  1. It would be awesome to at least support the Restore to the same degree as the Homebridge integration plugin so that Homebridge isn't needed as middleware
  2. It would be even better if it supported more features of the Restore. The biggest one for me is being able to set and unset alarms, so that I don't have to remember to go to the Hatch app every night and check my alarm settings.
bmcclure commented 1 year ago

Maybe this is supposed to be working already? I noticed it says this integration was based on the same Homebridge plugin that does work with my Restore, and I noticed there's a file for the Restore IOT device in the integration, so I decided to check my logs and found this:

2023-03-16 00:53:33.351 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry (redacted) for ha_hatch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 539, in async_unload
    result = await component.async_unload_entry(hass, self)
  File "/config/custom_components/ha_hatch/__init__.py", line 178, in async_unload_entry
    config_update_listener = hass.data[DOMAIN][DATA_CONFIG_UPDATE_LISTENER]
KeyError: 'config_update_listener'

I did try reloading the integration so maybe that's the only reason that showed up. I'm not sure if it's relevant or not.

dahlb commented 1 year ago

I aim to only add support for devices I can test so I'll leave this open for another developer to pickup.

As for that config_update_listener that is an error being caused by unused code so I have fixed it by removing the unused code.

bmcclure commented 1 year ago

Thank you for the info!

I'm a developer so maybe I can figure out how to get the Restore and Restore 2 in there. I will try and figure that out soon.

bmcclure commented 1 year ago

It seems like this PR is what recently added Restore support, however my first-gen Restore doesn't get detected: https://github.com/dahlb/ha_hatch/pull/36

Perhaps this is a bug fix instead of a feature request, but I'd also like to add support for the Restore 2 if I can figure out the API so it can probably stay as a request.

JonGilmore commented 1 year ago

hey @bmcclure - wondering if you've looked into this any further? I also have a Restore and it's not showing up in the integraiton.

bmcclure commented 1 year ago

hey @bmcclure - wondering if you've looked into this any further? I also have a Restore and it's not showing up in the integraiton.

I haven't looked much further into this yet. So far I haven't been able to get my Restore (1 or 2) to be detected by the integration. Currently I'm still using the Homebridge plugin as a workaround, though the functionality is extremely limited.

TheClassyTurkey commented 7 months ago

Wanting to come in here and see if there is any status update on this request? By chance are you still using the workaround with Homebridge plugin @bmcclure ? If so how is that setup?

JonGilmore commented 7 months ago

@TheClassyTurkey I did see that this was released, but my restore still isnt recognized by this integration.

bmcclure commented 7 months ago

Wanting to come in here and see if there is any status update on this request? By chance are you still using the workaround with Homebridge plugin @bmcclure ? If so how is that setup?

I'm still using the Homebridge plugin myself, as it seems to be the only thing that works with my Hatch Restore.

It works pretty smoothly once set up, but getting Homebridge running is the main hurdle. In my case, I'm running it in a Virtualbox VM alongside my Home Assistant VM. From there, you can easily install plugins through the Homebridge UI, such as the Hatch plugin.

Everything that Homebridge exposes are automatically detected by Home Assistant, so it's pretty seamless after that.

I'd much rather use this integration if it would work for me, but I haven't had time to make progress on that myself. Though admittedly I haven't tried to use it for many months since switching to this alternate integration, so I'm not sure if there's been any significant progress on getting Restores working.

skynet01 commented 1 month ago

Any updates on this? Would love to get hatch restore working