ha-wyzeapi icon indicating copy to clipboard operation
ha-wyzeapi copied to clipboard

[Feature Request] Person Detection

Open terwilliker opened this issue 4 years ago • 17 comments

Any way to get person detection as a binary sensor? Or even better, Wyze roadmap will introduce "package", "vehicle", "pet" and "faces" detection so maybe sometype of category sensor.

terwilliker avatar Jun 06 '21 13:06 terwilliker

I’m working on a separate device that uses the Jetson Nano and DeepStack. You could use DOODS or Facebox as a separate add on but it takes a lot of processing and I/O on your drive.

I’d highly suggest shunting that ability/processes to a separate box of your running on a RPi or something.

On Jun 6, 2021, at 8:28 AM, terwilliker @.***> wrote:



Any way to get person detection as a binary sensor? Or even better, Wyze roadmap will introduce "package", "vehicle", "pet" and "faces" detection so maybe sometype of category sensor.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/JoshuaMulliken/ha-wyzeapi/issues/187, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJAOENK5YW2WVPYWEXDTRNZWVANCNFSM46F6E7LQ.

LordNex avatar Jun 06 '21 13:06 LordNex

Type of motion detected is put in taglist of the motion event, and can be read from wyze. I also hope this would be implemented in the integration.

jorisrymenants avatar Jun 14 '21 10:06 jorisrymenants

Not quite what you're looking for but thought you might be interested - have you seen Kroo's wyzecam project? You can potentially use this together with Frigate NVR to do local person detection, more local control etc. This project allows rtsp feeds straight into Frigate (potentially via rtsp-simple-server).

Alfiegerner avatar Jul 06 '21 20:07 Alfiegerner

@LordNex you might want to check out frigate as well. Might do what you're talking about pretty well already.

https://github.com/blakeblackshear/frigate

JoeSchubert avatar Sep 17 '21 19:09 JoeSchubert

I think that I've potentially implemented this in a PR linked to a different issue, see here https://github.com/JoshuaMulliken/ha-wyzeapi/issues/226#issuecomment-962299890

I'm guessing that the type of detection will be in the tag list or ai tag list, but I don't pay for the extra service from wyze.

JoeSchubert avatar Nov 06 '21 01:11 JoeSchubert

@terwilliker I've added an event in the latest beta that I think would have these in the "tags" from wyze. I don't is the Cam Plus features, so I can't test. It should show up though similar to this thread (see screenshot toward bottom) https://github.com/JoshuaMulliken/ha-wyzeapi/issues/226

JoeSchubert avatar Nov 10 '21 11:11 JoeSchubert

Per conversation in that event issue, it looks like the tags do put the type, just as a numerical code that be will need to decoded before firing the event.

JoeSchubert avatar Nov 11 '21 22:11 JoeSchubert

Was anyone who's been using the events that were added able to decipher which codes indicate which events? It would likely be a breaking change, but we could change the numerical codes to the text equivalents if someone's mapped them.

JoeSchubert avatar Feb 10 '22 21:02 JoeSchubert

From what I have seen: {%- if tag == 101 %} Person {%- elif tag == 102 %} Vehicle {%- elif tag == 103 %} Pet {%- elif tag == 104 %} Package

On Feb 10, 2022, at 2:28 PM, Joe Schubert @.***> wrote:

Was anyone who's been using the events that were added able to decipher which codes indicate which events? It would likely be a breaking change, but we could change the numerical codes to the text equivalents if someone's mapped them.

— Reply to this email directly, view it on GitHub https://github.com/JoshuaMulliken/ha-wyzeapi/issues/187#issuecomment-1035537442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVNVGWZ4TIYO6HMOAKRXTU2QUYVANCNFSM46F6E7LQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.

terrycarlin avatar Feb 11 '22 01:02 terrycarlin

Is this still in beta testing?

terwilliker avatar Apr 06 '22 12:04 terwilliker

I doubt this will ship anytime soon. The API limits make it so we cannot poll for this status as fast as would be useful.

SecKatie avatar Apr 06 '22 12:04 SecKatie

how does the phone app deal with motion/AI notification without presumably exceeding the API limits?

wystewart avatar Sep 15 '22 13:09 wystewart

One way would be to push the stream into something like Frigate that can reencode as rtmp for other services and integrations to consume. Only problem with this and Wyze cams so for is you have to use custom RSTP firmware. Now it's been along time since I've touched my Wyze cams so maybe they added RSTP natively. If they could just allow the cameras stream to be consumed by something other than the Wyze App, there are many options for motion capture, facial recognition, object detection, and of course notifications with active content.

Maybe I didn't understand the question but this is the only way I've been able to use a limited set of Wyze's camera offerings. And I won't even go into their business practices.

LordNex avatar Sep 15 '22 15:09 LordNex

yes frigate is possible with the wyzebridge docker add-on for HA and that works without the RSTP firmware. Also Wyze pulled all the RSTP firmware recently. But both frigate and wyzebridge involve more hardware and processing power than my RP CM4 can do. I have been holding out hope that it might be possible to use Wyze AI detection run in the cloud to trigger things in HA, so I don't need more hardware / processing power.

I understand the current implementation here is to poll the cloud, which I expect is where the concern lies in "abusing" the cloud api comes from. But I am assuming the Wyze android app does not poll the cloud for the motion/AI notifications, that instead it somehow creates a hook or link to the cloud to notify the app. Wondering if that is even possible with this HA integration?

wystewart avatar Sep 15 '22 15:09 wystewart

Well you could use IFTTT. They already have direct API access to Wyze and you can setup a lot of automations that way.

Also, could you send me a link to the Wyze bridge your using? I've just been using Josh's addon. Also, I still have the firmware files for the PanCam and I believe the origional Wyze Cam. Not even sure what to do with this crappy Wyze Outdoor Cam unless I can find another way of getting it into HA or Frigate.

Personally I'm running my Frigate on a RPi4 8gig with a USB Coral TPU doing basic object detection on person, face, and car. That gets sent through MQTT to DoubleTake on my Home Assistant Server which is a beefy Dell PowerEdge R620 with 40 cores. It also runs my NAS software where Frigate and DoubleTake dump their recordings and events. I'm using CompreFace in HA as an add on as I've found it's more accurate than anything else out there. Even my Jetson Nano 4gig with DeepStack running on the CUDA cores. Going to repurpose it to scrap facial imaging sites that have names tagged to them like Facebook, Department of Corrections, and the Sex Offender List. That way I can have models trained for thousands of individuals on the fly so that I'll know more about the person on the other side of the door than they do about me. Which is the whole point of this.

But dam is the layering isn't a bitch

LordNex avatar Sep 15 '22 16:09 LordNex

I understand the current implementation here is to poll the cloud, which I expect is where the concern lies in "abusing" the cloud api comes from. But I am assuming the Wyze android app does not poll the cloud for the motion/AI notifications, that instead it somehow creates a hook or link to the cloud to notify the app. Wondering if that is even possible with this HA integration?

And at one point it did. Josh had it setup beautifully so that the cameras acted as motion detectors and most of everything functioned. Then Wyze threatened to blacklist us from their service saying that our "500-1000 users" were "Overloading their servers and to cease and desists.

There are sooooooo many reasons I have learned to hate Wyze. The only operational device I have in my house is their original lock which luckily can be controlled completely by ZHA without Wyze.

Honestly I prefer Amcrest AD410 Doorbell Cameras and ReoLink RCL520A PoE cameras. They work flawlessly and are super clear and responsive.

LordNex avatar Sep 15 '22 16:09 LordNex

https://github.com/mrlt8/docker-wyze-bridge Becoming wyze hater too. They been around long enough to provide an API for HA and other automation software. They are great cameras for the price, but the lack of integration is becoming a killer. I've been experimenting with a eufy camera with built in person detection, that does integrate into HA.

wystewart avatar Sep 15 '22 17:09 wystewart

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 15 '23 01:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Aug 20 '23 01:08 github-actions[bot]