Snoo Smart Sleeper custom component

Looks like this is no longer working

2021-11-06 17:21:06 ERROR (SyncWorker_0) [homeassistant.loader] The custom integration 'snoo' does not have a version key in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details

You can modify the manifest file manually to add a version and it will start working again

I was able to get this working yesterday and just wanted to share how to do it. Once you place the snoo folder into the custom_components folder, edit the manifest.json file by adding ā€œversionā€: ā€œ1.0.0ā€, to it:

{
    "domain": "snoo",
    "name": "Happiest Baby Snoo Smart Bassinet",
    "config_flow": true,
    "documentation": "https://bitbucket.org/pjhardy/homeassistant-snoo",
    "requirements": [
        "snoo==0.3.0"
    ],
    "version": "1.0.0",
    "ssdp": [],
    "zeroconf": [],
    "homekit": {},
    "dependencies": [],
    "codeowners": [
        "@pjhardy"
    ]
}

Then restart home assistant and go to Settings ā†’ Devices and Services ā†’ Add Integration and search for ā€œHappiest Baby.ā€ If it doesnā€™t show up, try refreshing the page. Once you have it added, it will prompt for a username and password but the two fields will appear blank. Username goes first, password goes second.

are you getting the ā€œlevelā€ attribute?

Iā€™ve updated my instance to include version but now Iā€™m only getting the state where as before I also got attributes.

Cannot login with a fresh install.
Added instance as suggested and get to the login page, but no success in logging in.

Any suggestions or is there additional requirements other than the custom integration folder?
Thanks

This error originated from a custom integration.

Logger: custom_components.snoo.config_flow
Source: custom_components/snoo/config_flow.py:22
Integration: Happiest Baby Snoo Smart Bassinet (documentation)
First occurred: 22:50:24 (7 occurrences)
Last logged: 23:07:17

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/snoo/config_flow.py", line 52, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/config/custom_components/snoo/config_flow.py", line 36, in validate_input
    result = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/snoo/config_flow.py", line 22, in fetch_token
    client.auth["password"] = password
  File "/usr/local/lib/python3.10/configparser.py", line 1263, in __setitem__
    return self._parser.set(self._name, key, value)
  File "/usr/local/lib/python3.10/configparser.py", line 1205, in set
    super().set(section, option, value)
  File "/usr/local/lib/python3.10/configparser.py", line 895, in set
    value = self._interpolation.before_set(self, section, option,
  File "/usr/local/lib/python3.10/configparser.py", line 402, in before_set
    raise ValueError("invalid interpolation syntax in %r at "
ValueError: invalid interpolation syntax in '6MaN5dxxxxxxcjSW8%dk' at position 17

Any current snoo users out there?

I have this setup enough that you can add it to HACS as a custom repo GitHub - SgtBatten/ha-snoo: A custom repository for Happiest baby Snoo

image

It only gives me 3 entities though and no control functionality despite using the pubnub api which does have control functionality. Curious if anyone has more working currently?

Iā€™m a current Snoo user, but have just started looking at this integration recently.

Last I had checked the pubnub API still didnā€™t allow control functionality, where are you seeing that it does?

The pubnub api itself seems to, but the integration doesnā€™t utilise everything. It needs some work and iā€™m eager to do it, but have little experience with python.

I have updated both the snoo API and HA plugin to work with the latest changes made by snoo, still a work in progress:

https://github.com/DanPatten/ha-snoo

Thanks, do I have to install your pysnoo any way to make it work? I tried just doing your integration through Hacs but get an error when trying to add my snoo as a device. ā€œConfig flow could not be loadedā€

Try again GitHub - DanPatten/ha-snoo

I fixed a dependency import yesterday

Great, I can confirm it now works! Did you setup any automations or usage tracking?

It could be interesting to have it save some of the data .

This was working for me a few times but it seems the integration needs to be reloaded after a little bit in order to pick up state changes with the snoo. Any idea what that could be?

Im having the same issue now. Still in testing as baby has not arrived yet, so wonder if updating will be more reliable when using more frequently.

Iā€™m trying to use mine every day with the baby to log itā€™s usage and notifications, and it requires a reload before each use. So itā€™s defintely timing out somehwere.

Probably this:

Logger: pysnoo2.oauth2_session
Source: runner.py:188
First occurred: April 6, 2024 at 7:54:42 PM
(1314524 occurrences)
Last logged: 1:00:47 PM

Token expired, getting new token