seydx / homebridge-tado-platform

Homebridge plugin for controlling Tado devices
MIT License
127 stars 69 forks source link

HomeKit Automation, trigger when home/away changed #115

Open sandeepb1 opened 2 years ago

sandeepb1 commented 2 years ago

Hi

Love the plugin, it's exposed a lot for me in my Home which I can use. I'm trying to figure one thing out which is the Home/Away setup.

I have the subscription for AutoAssist and have my home set to "Auto" to change when the devices have entered or left the geofence. I've used the presence feature in the plugin but it just shows both Home and Away as Off and only change if it is manual.

I can see in the API that the presence is listed but just wondering if it's possible to have it as a triggerable switch so I can control other devices in my home when Tado senses I'm away.

The reason I'm going for the Tado implementation of geofencing is that it allows me to set a wider area.

Thanks

jotzet79 commented 2 years ago

Hi @sandeepb1 Have a look at https://github.com/seydx/homebridge-tado-platform/issues/107#issuecomment-1040812129 - I was saving the money and wrote some Bash Commandline Commands to react on the OpenWindow Events. I also could set ranges up to 1km, but I don’t know if it suffices.

nielsth commented 2 years ago

I use the presence part of the plug-in to display an occupancy sensor. You can set up automations in the Home app based on when the occupancy sensor changes from detecting someone or not.

                    "presence": {
                        "anyone": true,
                        "accTypeAnyone": "OCCUPANCY",
sandeepb1 commented 2 years ago

I use the presence part of the plug-in to display an occupancy sensor. You can set up automations in the Home app based on when the occupancy sensor changes from detecting someone or not.

                    "presence": {
                        "anyone": true,
                        "accTypeAnyone": "OCCUPANCY",

Ok so if all devices with the Tado app leave the Geo zone the Anyone occupancy will be false. When we come back in the geofence the state will change to true?

nielsth commented 2 years ago

Yes. In case there are more people in the tado app, the occupancy for all people will be false is everyone is away, and true if anyone is at home. Exactly like the Home/Away mode in tado.

sandeepb1 commented 2 years ago

Greta thanks for the clarification. I’ve just tested it out and it worked perfectly.