documentation is currently in a bad state. I am aware of this and working on it!
This project creates the following entities in your Home Assistant instance:
There will be 1 entity per cat flap with the following attributes
Click to expand!
This is a non-exhaustive list
Attribute | Example |
---|---|
ID | 123456 |
Parent device ID | 123456 |
Product ID | 6 |
Household ID | 123456 |
Name | Rivendell |
Serial number | XXXX-XXXXX |
MAC address | 2c549188c9e3 |
Index | 0 |
Version | ODM2 |
Created at | December 19, 2018, 1:43:25 AM |
Updated at | December 19, 2018, 1:43:25 AM |
Pairing at | December 19, 2018, 1:43:25 AM |
Control | curfew: - enabled:true lock_time:"22:00" unlock_time: "07:30" locking: 0 fast_polling:false |
Parent | |
Status | locking: mode: 0 version: battery: 5.07 learn_mode: online:true |
Tags | |
Move |
Click to expand!
Attribute | Example |
---|---|
Voltage | 5.09 |
Voltage per battery | 1.27 |
Alt-battery | 16.82560000000002 |
Click to expand!
Attribute | Example |
---|---|
Device rssi | -35.00 |
Hub rssi | -35.00 |
Click to expand!
Attribute | Example |
---|---|
Since | September 18, 2021, 4:09:42 PM |
Where | 1 |
ID | 123456 |
Name | Thorin |
Gender | 1 |
Comments | Such a good cute boy |
Household ID | 123456 |
Breed ID | 384 |
Photo ID | 123456 |
Species ID | |
Tag ID | 123456 |
Version | Mg== |
Created at | April 1, 2021, 11:00:07 AM |
Updated at | April 1, 2021, 11:00:07 AM |
April 2, 2021, 10:20:49 PM | |
Photo | id: 238217 location https://surehub.s3.amazonaws.com/user-photos/thm/imageURL.jpg |
Position | tag_id: 1233456 user_id: 123456 where: 1 since: date |
Status | activity: tag_id: 123456 user_id: 123456 where: 1 since: date |
This project allows you to use the following services in Home Assistant:
This service call allows you to update the location of a pet.
Data needed:
- pet_id = this is the surepetcare id for your pet.
- where = options are "Inside" or "Outside"
example:
service: sureha.set_pet_location
data:
pet_id: 31337
where: Inside
This service call allows you to update the lock state of a flap.
Data needed:
- flap_id = this is the surepetcare id for the flap you want to change.
- lock_state =
example:
service: sureha.set_lock_state
data:
flap_id: 123456
lock_state: locked
The following script and button card code was create by xbmcnut to set pets location to inside
script:
set_kobe_inside:
alias: 'Set Kobe Inside'
sequence:
- service: sureha.set_pet_location
data:
pet_id: '123456' #Kobe's Code
where: Inside
Button card code:
entity: binary_sensor.pet_kobe
icon: mdi:cat
layout: icon_name_state
show_name: false
show_state: true
styles:
icon:
- color: >
[[[ if (states['binary_sensor.pet_kobe'].state === 'on') return "green";
return "red"; ]]]
tap_action:
action: more-info
hold_action:
action: call-service
service: script.set_kobe_inside
type: custom:button-card
The following script was created by sasgoose to toggle the location of a pet
script:
toggle_thorin_location:
alias: 'Toggle Thorin location'
sequence:
choose:
- conditions:
- condition: state
entity_id: binary_sensor.pet_thorin_2
attribute: where
state: 1
sequence:
- service: sureha.set_pet_location
data:
pet_id: '123456' # Thorin's pet id
where: Outside
- conditions:
- condition: state
entity_id: binary_sensor.pet_thorin_2
attribute: where
state: 2
sequence:
- service: sureha.set_pet_location
data:
pet_id: '123456' # Thorin's pet id
where: Inside
Do a backup of your HA first. Its probably not needed but a backup is never a bad idea ;)
The cleanest way will be to delete the surepetcarebeta integration completely and handle sureha completely independent. It will create the same entity/unique ids as before so your automations and graphs should not be affected.
# logging
logger:
default: info
logs:
surepy: debug
custom_components.sureha: debug
custom_components.sureha.binary_sensor: debug
custom_components.sureha.sensor: debug
Sorry for the bad naming and resulting confusion and chaos 🙄 To "fix" this, I renamed surepetcarebeta to sureha.
Name | Repo | Type | Description | Need Help? |
---|---|---|---|---|
surepy 🐾 | github.com/benleb/surepy | Python Library | Library to interact with the API of Sure Petcare. Also provides Classes for the various Sure Petcare Devicess. Use this if you write an own python tool/app and want to interact with the Sure Petcare API | Issues |
surepetcare | github.com/home-assistant/core | Home Assistant Integration | Official Home Assistant Integration for the Sure Petcare Devices like Doors, Flaps, Feeders, ... | Issues, HA Forum |
sureha |
github.com/benleb/sureha | Home Assistant Integration | Home Assistant Integration developed in my own repo without reviews from the HA Team. This can be installed via HACS and is something like a preview integration for advanced users. Usually this provides more (experimental) features and faster fixes but lacks the code quality (reviews) and such from HA | Issues |
pethublocal | github.com/plambrechtsen/pethublocal | Home Assistant Integration | Home Assistant Integration developed by @plambrechtsen which works completely independent from Sure Petcare. Check outs his repo for more information! | Issues, HA Forum |