Sureflap Connect - Pet Door

Thanks @peterl :+1:

Maybe there is some way on android due to the html5 push thing? But I don’t know enough about it to answer this…

1 Like

The SPA page polls for updates when you login via surepetcare.io and I wouldn’t trust things to not break in future so I think how your integration works right now is the best approach @benleb
Could look further into having a long running socket if there is a Ajax or similar style push from the page but I don’t think there is.
Trying to break open the notifications system seems like a whole lot of work as I think they are using AWS SNS so you would need to fully decompile the app and get the SNS keys that the app was using to register.

When if they REALLY wanted it just use pethublocal or even get PolarProxy in place and then still have the app being used but picking the messages out on the way past.

1 Like

Hey,

My integration has stopped working - no state changes occur for binary sensor for the cat flap. I have tried uninstalling and reinstalling the official and the HACS custom component.

I have received this error in logs

Logger: surepy.client
Source: /usr/local/lib/python3.8/site-packages/surepy/client.py:267
First occurred: 0:52:47 (8 occurrences)
Last logged: 2:22:47

Can not load data from https://app.api.surehub.io/api/me/start

I upgraded from 2021.7.3 to 2021.8.4 today and the integration no longer works. Any tips to get it working again?

Anything in the logs?

I’m no expert but mine broke as well but I did manage to get it working again by removing what I had in custom_components and using the HACS integration.
Unfortunately I did not note down the exact steps I took.

Ok thx. The log has no entries from surepet integration.

I’m using the SureHA beta integration. If you happened to be using the suprepetcarebeta previously, I’d rip everything out and start over.

And don’t forget that credentials are no longer added via YAML, you’ll need to actually add the integration via the UI.

Hello flyize,

thank you very much for your answer.

I have used the standard surepet integration in HA. This also worked perfectly up to version 2021.7.3.
I have now installed sureha and that works now too.
But wouldn’t it be a shame if only the custom integration worked?

It will most likely be fixed by this: Surepetcare integration update & add Feeder & FeederBowl sensors by benleb · Pull Request #53399 · home-assistant/core · GitHub

1 Like

Thank you for this link. I’m looking forward to the next release

On the latest version updates seem to be very slow 30 to 40 minutes for the felaqua.

@benleb Since I do not get any response from you anywhere else, I try here:

Any update on this?

Could you take a look at this?

1 Like

Has the integration broken for anyone else? It’s dead won’t set up anymore.

Will take care for this tomorrow or on tuesday :+1: :wink:

2 Likes

@benleb Any idea why the integration won’t set up anymore? Has surepet changed something?


Logger: homeassistant.config_entries
Source: custom_components/sureha/__init__.py:95
Integration: SureHA (documentation, issues)
First occurred: 23:31:28 (1 occurrences)
Last logged: 23:31:28

Error setting up entry Sure Petcare for sureha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/sureha/__init__.py", line 75, in async_setup_entry
    return await spc.async_setup()
  File "/config/custom_components/sureha/__init__.py", line 129, in async_setup
    await self.async_update()
  File "/config/custom_components/sureha/__init__.py", line 95, in async_update
    self.states = await self.surepy.get_entities(refresh=True)
  File "/usr/local/lib/python3.9/site-packages/surepy/__init__.py", line 365, in get_entities
    await self.get_latest_anonymous_drinks(household_id=household_id)
  File "/usr/local/lib/python3.9/site-packages/surepy/__init__.py", line 219, in get_latest_anonymous_drinks
    device_id = felaqua_related_entries[0]["weights"][0]["device_id"]
IndexError: list index out of range

japp also got this -.- I have a fix already done and will push it this evening probably :+1:

@Blair_Pollard… after having a deeper look… might the issue perhaps be an empty battery which prevents the felaqua from transmitting its status? :>

Ok thanks I’ll have to wait for GF to get home and change batteries :sweat_smile: had an operation on my eyes so can’t see to good at the moment.

ah, get well soon! :slight_smile: :+1:

seems its working again now :stuck_out_tongue: what a nice issue :smiley: <3

All good integration loads again now will monitor if other issues is present about not seeing changer when it doesn’t see the tag.