I was interested in this catflap - apart from the need to use a third party service (partly due to privacy - I don’t really want my cat’s movements being shared to a third party; but also for concerns about longevity - the pet door has a control panel which allows access to most features, but the smaller cat door requires the android app to access pretty much any setting).
So would be interested in a way of using this without needed the amazon\xively services.
One route would be to intercept the hub to server communications - which might be possible with some DNS spoofing in the local router as long as the hub isn’t doing detailed validation on the ssl certificates.
A cleaner route might be to intercept the communication between the flap and the hub - i.e. to create a “virtual hub” replacing the official hub. I suspect the communication is via standard 802.11 wifi with some mechanism to negotiate the SSID and\or key between the flap and the hub, but I don’t know how easy that would be (or how keen sureflap would be on that idea).
in "/root/.homeassistant/binary_sensors.yaml", line 3, column 7
expected <block end>, but found '<block mapping start>'
in "/root/.homeassistant/binary_sensors.yaml", line 13, column 8
Found out it was because indentation in sample config was wrong. Changed the binary_sensors.yaml etc to two spaces indent.
Got more errors:
File "/root/.homeassistant/custom_components/sensor/sure_petflap.py", line 59, in setup_platform
username = config.get(CONF_USERNAME)
NameError: name 'CONF_USERNAME' is not defined
Fixed it by making a quick hacky change to /custom_components/sensor/sure_petflap.py . I commented out import homeasssistant so is_hass_component wouldnt throw an exception. As said i dont use HASS.
Afterwards, it is working fine
(This was last night, described steps afterwards so there might be one missing…)
Hello
is it possible to run the rcastberg code without Home Assistant? only on a raspbian operating system?
If yes can you please say me how?
Thank you
I have copied over the folders to the relevant places and after restating I’ve got a Sure Cat Flap Status panel come up with:
Hub online Status - Disconnected
Flap online Status - Disconnected
Sure Flap - Locked
I now believe I need to run the ‘pip install . -t /config/deps/’ but not sure how to do this in hassio, any pointers please as I don’t want to crash things again and have to do a new hassio install on my RPi.
When I look in the ‘config/deps/’ folder, I only have ‘lib’ in there.
Update: did “pip install requests” and got the module error out of the way. Can connect to sp_cli.py. It just returns an error about no credentials provided.
What Widda said. I got everything installed. Things just go wrong when I try to access sp_cli.py, either with our without the ls_pets added. This is the outcome of the “./sure_petcare/sp_cli.py” command:
Traceback (most recent call last):
File “./sure_petcare/sp_cli.py”, line 7, in
import sure_petcare
File “/config/sure_petcare/sure_petcare/init.py”, line 9, in
import requests
ModuleNotFoundError: No module named ‘requests’
I Should note that the git pull command put everything in /config/sure_petflap instead of /config/custom_components/sure_petflap. (I run hassio on a RPI3B). Will that make a difference?
I almost got it al working. The last snag refused to go away and eventually seemed to crash my system: the sensor was not found by Home Assistant. I was able to get the pet’s names and all. But the error kept turning up on reboot.
I then gave the sensor file all kinds of permissions, restarted my Pi and… half an hour later I was reinstalling en restoring a snapshot.