As a starting point, the OnlyCat team have just asked me an interesting question: why don´t we start working on the integration using the cloud API (already available), and once the local API becomes available we add that to the mix?
And I think that´s a great idea! Where do we start from?
EDIT: the OnlyCat team already have an answer for my question, this has been their reply:
Since we have yet to prepare proper API documentation, I am sending the relevant files in the client code which you can use as reference for the protocol and available requests (link updated after the original one expired): http://media.onlycat.com.s3.amazonaws.com/code/onlycat-client-code-reference.zip You’ll need to connect to gateway.onlycat.com over SocketIO, and provide a token to authenticate the user. The token can currently be grabbed from the app (shown in the account tab). In the future we’ll allow users to generate unique tokens for each API/integration. Hopefully that’ll be enough to make a start, and if you have any questions about how any of the code works, we’ll be happy to help.
Hi Tom, we’re happy to say that we’ve been in discussions with Heisenberg and are fully supportive of this development.
The repository linked above is the official repository where we welcome contributions from the community in order to create the HA integration for OnlyCat. We’ve provided the above code bundle as an initial reference for our Cloud API - and will be working on launching a Local API. We envisage the community HA plugin can get started with the former, and switch over to the latter in a piecewise manner as local MQTT support and APIs are available/documented.
We’re very excited to see what the community can build on top of OnlyCat and are here to fully support the effort.
It’s really great that Onlycat offers such support und APIs. I’ll be getting my cat flap in the next few days and will be doing some tests. I’m excited to see how the HA integration develops. A great project!
Thank you for starting this project. I’m not good enough at coding to be able to contribute to that part of the development, but I have an OnlyCat installed and have HA setup to run most of my home.
Assuming the addon becomes available to install via HACS or through a custom repository, I am very happy to help you test it!
The OnlyCat replaced the SureFlap Connect which I used in HA to show activity / presence of my cat!
As this integration will be created completely from zero, what would be the best way to start? Should we use other integration (e.g. SurePet integration?) as a baseline and build from that, or should we start completly from scratch? What are your thoughts?
Uh, I thought you were starting the development? Is there already a draft code? Probably best to build fro scratch , it’s local right?
What other projects did you create for HA?
This project to create this integration will be splitted into two phases (we might create two integrations, one cloud and one local, if that makes more sense than creating one integration to cover both, but I don´t think we need to decide that now).
The first phase is to integrate the catflap using the cloud API (already available today), and that removes the dependency from anyone willing to help with this development to have/need physical access to a catflap (I´m happy to share my OnlyCat credentials with anyone in this forum for as long as needed until this integration is up and running).
The second phase will be the integration of the catflap using local APIs or MQTT, once they are available. OnlyCat is working on these, and they will be sharing the progress and any useful information with us.
I hope this all make sense (please shout if it doesn´t).