plasticrake / homebridge-tplink-smarthome

TP-Link Smarthome Plugin for Homebridge
MIT License
467 stars 70 forks source link

Add motion sensor support for KS200M #278

Open kjn70 opened 1 year ago

kjn70 commented 1 year ago

Current Situation

HomeBridge only exposes the KS200M as a switch meaning that we are unable to build action backed on motion detection.

Proposed Change

Please add motion detection support for the KS200M across HomeBridge to homeKit.

Action options should be: 1 - When device detects motion. 2 - When device stops detecting motion.

Add to that the Kasa motion sensitizing: 1 - Far range (more sensitive) 2 - Mid range 3 - Close range (less sensitive)

Thank you.

rockthethird commented 1 year ago

@plasticrake would be able to comment on the plausibility of this enhancement.

dadsalleb commented 1 year ago

I really hope this feature can be added to the plugin. It would really help to make additional automation if the motion sensor can act independently.

AntoineDeveloper commented 1 year ago

Just to make sure. Can you change brightness on homekit for the KS200M using homebridge. As it does not say it's supported anywhere. Thanks.

dadsalleb commented 1 year ago

Yeah everything works fine except it doesn't export motion sensor.

AntoineDeveloper commented 1 year ago

Oh ok, so he still did not add support for the motion sensor.. sad.. In the Kasa app can we say when switch detects motion turn on another switch. Not when the switch turns on only when motion is sensed turn on another kasa switch.

Thanks

HungryHoncho commented 4 months ago

I second this request. I would be super helpful! Otherwise the plugin is probably one of the most maintained ones I've come across.

threeonparfive commented 2 months ago

I can understand the desire to have the motion sensor exposed as its own sensor, if even possible, to HomeKit. But you can always just have an automation that turns something else on/off when any light/switch/outlet turns on. What scenario is that not good enough for?

I’m just happy to know that the switch will at least function with the plugin despite not being on the supported list.

dadsalleb commented 2 months ago

There are many possible applications but the basic thing I can come up with at the moment is that the Kasa app only provides 1, 2, and 5 min of light-off delay. If I can know if there is a motion by the motion sensor, I can further customize the timer. such as 3 min or else.

kjn70 commented 2 months ago

The main use case I have is that it can be combined with other sensors that provide more 360 coverage. The sensor triggers a dummy switch that can be set with a time delay for off. The dummy is configured for the time delay to reset upon activation. Then multiple sensors can be configured to "trip" the dummy so as you walk around a space you can constantly reset the dummy from one sensor to another. Then the dummy controls the on/off of lighting or other accessories.

threeonparfive commented 2 months ago

Yeah, that’s pretty elaborate but I understand what you’re trying to pull off. Unfortunately, I don’t think it would work as smoothly as desired even it were possible. I’m betting Tplink doesn’t expose the sensor for the plugin to see independently anyway.

I have Arlo’s that trigger several lights. And Arlo sensors ARE exposed as their own sensors to HomeKit. I have multiple Arlo motion sensors that turn on some of the same lights. And I can tell you first hand that HomeKit doesn’t have the smarts to “reset” the clock on a light that triggered on by multiple sensors. Whichever sensor turned it on first is who “owns” the time for it to turn back off.

kjn70 commented 2 months ago

I use HomeBridge on a Synology hub to integrate non HomeKit gear into HomeKit and that has the dummy plugin. I use it with Hue motion sensors and ring camera motion sensors to trigger a dummy "motion switch" and that switch with delay turn off and motion reset rules controls other accessories.

My original request is a couple years old now and I have since worked around it. Still it might be useful if it could be done.

threeonparfive commented 2 months ago

I use HomeBridge on a Synology hub to integrate non HomeKit gear into HomeKit and that has the dummy plugin. I use it with Hue motion sensors and ring camera motion sensors to trigger a dummy "motion switch" and that switch with delay turn off and motion reset rules controls other accessories.

My original request is a couple years old now and I have since worked around it. Still it might be useful if it could be done.

Thanks for the info! I wasn't aware of a dummy switch plugin. I believe that will solve my issue as well! That plugin takes me up to 8 plugins, also running on a Synology NAS.