Sureflap Connect - Pet Door

I use it with the cat flap connect rather than the pet door if that’s what you mean?

https://www.surepetcare.com/en-gb/pet-doors/microchip-cat-flap-connect

I don’t think any progress has been made towards talking direct to the flap without the hub.

All working fine until I updated, it seams to have run into issues with 0.94:

  File "/config/custom_components/sure_petflap/__init__.py", line 11, in 
    import utils as utils
ModuleNotFoundError: No module named 'utils'

Any ideas what to check or do please.

I ordered the cat flap dualscan connect (other vendors sold the cat flap connect only), but from what I see the dualscan is implicit on the connect model :slight_smile:

Has anyone else got this working under 0.94? mine no longer works.

Same here. Stopped working after the update to .94.

Error:

Error loading custom_components.sure_petflap. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 263, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/sure_petflap/__init__.py", line 11, in <module>
    import utils as utils
ModuleNotFoundError: No module named 'utils'

I don’t know if this ever will be merged and I am quite sure it will not until august. In the meantime you can copy the components/surepetcare folder from the PR to your custom_components/ and use it this way :v:

5 Likes

I’m thinking of trying out your component, but where do I find the “household ID”?
I have found Flap ID and Pets ID(s)…

Update:
Ah, found it… Had to dig in the “console” (development tools) on the SurePet site.
I’m not sure where to look. But what “sensors” and “binary’s” do I get with your component?
Is there a list somewhere? :slight_smile:

Update:
Here is what I got…
binary_sensor.flap_laundery_flap = off
battery_voltage: 1.2918749999999999
locking_mode: 4
device_rssi: -53.142857142857146
hub_rssi: -54.5
mac_address: XxXxXxXxXxXxX
version: MzIx
friendly_name: Flap Laundery
icon: mdi:lock
device_class: lock

binary_sensor.pet_cappuccino = on
pet_id: nNnNnNnN
tag_id: nNnNnNnN
device_id: nNnNnNnN
where: 1
since: 2019-06-09T13:59:38+00:00
ETag: XxXxXxXxXxXxXxXxXxXxXxXxX=
friendly_name: Pet Cappuccino
icon: mdi:cat
device_class: presence

binary_sensor.pet_kakan = off
pet_id: nNnNnNnN
tag_id: nNnNnNnN
device_id: nNnNnNnN
where: 2
since: 2019-06-09T14:20:38+00:00
ETag: XxXxXxXxXxXxXxXxXxXxXxXxX=
friendly_name: Pet Kakan
icon: mdi:cat
device_class: presence

sensor.flap_laundery_flap_battery_level = 11
voltage: 5.17 V
voltage_per_battery: 1.29 V
unit_of_measurement: %
friendly_name: Flap Laundery Battery Level

However, it’s not updating the status correctly (at all?), the status is not correct…
And the flap I have are usually in “Curfew mode” (open and closed on specified times), that does not show…

Have I missed something?

I have the same issue.
I tried this config:

surepetcare:
  username: xxxxx
  password: xxxxx
  household_id: 29838
  flaps: [{id: xxxxx, name: Balkongen}]
  pets: [{id: xxxxx, name: Jenna}]
  scan_interval: 00:00:100:

However its not updating at all. I see that you are using:
from surepy import SurePetcare

But it feels like surepy is very slow at updating, or even udating at all?
At least I would like the component to update every minute or so.

Are we doing something wrong here @benleb?

Visit https://surepetcare.io while your browsers dev/js console is open. The household ID will be visible there multiple times, searching for “household” gets you to your ID :+1:

1 Like

The component is working, I get all the sensors. But its not updating.
My cat is inside, the component shows inside, when she goes out, it doesnt update. Waited like 45 minutes. If i restart home assistant ,then its updated. So it seems like the component only fetches the status upon restart. But not after that.

I guess it has to do something with surepy…

you are using hass.io right? I will check this, but dont expect an solution today… I stripped many lines of code from this component this weekend, maybe also one which I shouldnt… :sweat_smile:

Besides that… The scan_interval defaults to 3 minutes as Sure Petcare explicitly does not like/want that their API is used this way. I have talk to them a few times and it was really disappointing… So, you can change the update interval via the scan_interval config option, but please be aware that nobody knows what will happen if you pull to often…

Okey, it might have to do something with hass.io then? I will remove the scan_interval from my config and wait until you have a fix =). I guess you didn’t test it with hass.io?

I found a solution. Just comment line 11 in init.py
Works perfect now…
#import utils as utils

1 Like

hey! no, shit! My fault, will fix this today or tomorrow, sorry :smiley:

1 Like

Thanks :), meanwhile im using the old component that has been discussed in this thread.

works for me again…

Just comment line 11 in init .py
Works perfect now…
#import utils as utils

Okay :smiley: fyai… probably I will just post about this in the PR on github and not here also :slight_smile:

2 Likes

Thanks guys the

#import utils as utils

solved it for me

1 Like

I talked to their tech support, to add more requests for a supported API, and they mentioned that the communication between the door and the hub is via bluetooth. I don’t have my door yet (the cat door connect + hub bundle is backordered on amazon) and I’m also pretty lousy with reverse engineering bluetooth protocols (tried for a few hours with a bluetooth radon detector). But maybe knowing that it’s bluetooth will inspire someone else to investigate? Would be sweet to have a way to interact with the door that doesn’t require a trip out to the internet.

It’s not BT/BLE, it’s https://en.m.wikipedia.org/wiki/IEEE_802.15.4
so probably zigbee