roleoroleo / yi-hack-Allwinner-v2

Custom firmware for Yi 1080p camera based on Allwinner platform
MIT License
767 stars 90 forks source link

Request: Yi Dome U Pro Support #179

Closed seventhplug closed 1 year ago

seventhplug commented 3 years ago

Hi I bought a Yi Dome U Pro 2K (BLACK) Camera i thought it would be supported. I hope you can please add this camera to your supported device.. Thank you. It has a Device ID: LFUS

SmartM-ui commented 3 years ago

Yes. As you can read here

75

there is a conflict between human detection and motion detection. If motion detection doesn't toggle, the cam doesn't capture the snapshot.

Hi @roleoroleo , I deactivated the AI ​​Human and Face sensors from the YI app, I deactivated the AI ​​Human Detection sensor from YIHack and passing in front of the camera I received two notifications from Home Assistant, one for camera movement and one for Yi Camera Human Detection (although I had disabled it from YIHACK).

No photo is shown on Home Assistant and when I try to view the photo via YIHACK browser it shows a box with the photo not visible (kind of corrupted).

The MP4 video visible from the YIHACK browser has been saved The YIhome app, on the other hand, did not send me any notification and did not record any video

The AI ​​Human detection and Camera Detection sensors remained on "detected" in HA, even when restarting the cam.

Enabling through YIapp Motion Detection, Human Detection and Face in "away from home" mode, the YI app sent the notification about the movement, the sensors in HA immediately returned to "absent" and I can see the photograph on the YIHACK browser, but not in Home Assistant.

I confirm that by enabling the aforementioned detections from the YI app, I do not receive the notification on Home Assistant for camera detection, but only for Human Detect (which is disabled by YIHACKS) and the sensors are always on the "detected" state. The image is in no case reflected in the Home Assistant.

Screenshot_20210706-102312_YI Home

Schermata 2021-07-06 alle 10 25 27 Schermata 2021-07-06 alle 10 25 37 Schermata 2021-07-06 alle 10 26 10 Schermata 2021-07-06 alle 10 26 30 Schermata 2021-07-06 alle 10 26 47 Schermata 2021-07-06 alle 10 33 21
roleoroleo commented 3 years ago

No photo is shown on Home Assistant and when I try to view the photo via YIHACK browser it shows a box with the photo not visible (kind of corrupted).

What do you mean "view the photo via YIHACK browser"? Which web page? If you mean the snapshot page, this is not related to a detection sensor. It simply takes a snapshots from the cam.

The AI ​​Human detection and Camera Detection sensors remained on "detected" in HA, even when restarting the cam.

This is correct, Only the start event is sent to the system (apart from the motion event). You need to configure an "off_delay" to switch off the sensor after a time interval.

Enabling through YIapp Motion Detection, Human Detection and Face in "away from home" mode, the YI app sent the notification about the movement, the sensors in HA immediately returned to "absent" and I can see the photograph on the YIHACK browser, but not in Home Assistant.

I confirm that by enabling the aforementioned detections from the YI app, I do not receive the notification on Home Assistant for camera detection, but only for Human Detect (which is disabled by YIHACKS) and the sensors are always on the "detected" state. The image is in no case reflected in the Home Assistant.

Only the motion detection sensor, updates the camera.yi_hack_allwinner_v2_xxxxxxx_motion_detection_cam

SmartM-ui commented 3 years ago

What do you mean "view the photo via YIHACK browser"? Which web page? If you mean the snapshot page, this is not related to a detection sensor. It simply takes a snapshots from the cam.

yes, snapshot page: http://192.168.1.182:8080/?page=snapshot

This is correct, Only the start event is sent to the system (apart from the motion event). You need to configure an "off_delay" to switch off the sensor after a time interval.

It is not entirely correct. If you activate human and face detection from the YI app, the detection is correctly deactivated in HA after being detected. Do you have an example for delay_off so I also try this possibility?

Only the motion detection sensor, updates the camera.yi_hack_allwinner_v2_xxxxxxx_motion_detection_cam

but I can't get it to activate

Schermata 2021-07-06 alle 12 43 01
roleoroleo commented 3 years ago

It is not entirely correct. If you activate human and face detection from the YI app, the detection is correctly deactivated in HA after being detected. Do you have an example for delay_off so I also try this possibility?

https://github.com/roleoroleo/yi-hack-Allwinner-v2/wiki/Home-Assistant-integration

but I can't get it to activate

The history is not reliable for this object. Add the cam as a picture entity (using the correct entity) as discussed above:

type: picture-entity
entity: camera.yi_hack_allwinner_xxxxxxxxxxx_motion_detection_cam

It must shows the image when a motion is detected. You could also try with a client like mqtt-explorer: run the client and wait for a detection. You should see a JPEG binary in the motion_detection_image subtopic.

SmartM-ui commented 3 years ago

@roleoroleo Test at 5.33 pm:

APP YI NOT_HOME ACTIVE and detection settings: motion detection = ON human detection = ON face detection = ON

YIHACK AI Human Detection = OFF

MQTT explorer detects this:

Schermata 2021-07-06 alle 17 33 28 Schermata 2021-07-06 alle 17 34 46

APP YI detection settings: motion detection = ON human detection = OFF face detection = OFF

MQTT explorer detects this:

Schermata 2021-07-06 alle 17 36 09 Schermata 2021-07-06 alle 17 41 47 Schermata 2021-07-06 alle 17 42 07 Schermata 2021-07-06 alle 17 42 16

and I can see the picture in HA!

Through HA I set the detection of the binary sensor binary_sensor.yi_camera_movement to off and I published via MQTT motion_stop, but when review in front of the camera the notification arrives, but I do not see the image

However, there is a relationship between the YI app setting and the YIHACK setting

roleoroleo commented 3 years ago

Don't configure app and web with different settings. This causes an unpredictable behavior. About app and yihack settings there is probably a misunderstanding. It's the same setting. When you switch on AI human detection or Sound detection in the web page or in the yi app, the cam receives the same message. I created "Camera settings" page for those who don't use the app and want to change the configuration.

About motion detection when you enable AI human detection, it's a know bug and you can find an explanation here: https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/75 When AI human detection is enabled, the yi software doesn't send the motion start message.

SmartM-ui commented 3 years ago

Don't configure app and web with different settings. This causes an unpredictable behavior. About app and yihack settings there is probably a misunderstanding. It's the same setting. When you switch on AI human detection or Sound detection in the web page or in the yi app, the cam receive the same message. I created "Camera settings" page for those who don't use the app and want to change the configuration.

About motion detection when you enable AI human detection, it's a know bug and you can find an explanation here:

75

When AI human detection is enabled, the yi software doesn't send the motion start message.

Hi @roleoroleo Thanks for the reply, I'm sorry, but the double setting between the app and the hack confuses me :-)

Therefore, at the moment, it is not possible to use AI Human Detection. The best solution, to have both monitoring via the YI (Not_Home) app and monitoring on Home Assistant is to set AI Human Detection on YIHACK to OFF and set only motion detection on the YI Home app to ON (disabling human and facial detection).

Here is the photo of the settings:

Schermata 2021-07-07 alle 00 59 44

Screenshot_20210707-015450_YI Home

it's right?

roleoroleo commented 3 years ago

Yes, this is the best configuration.

SmartM-ui commented 3 years ago

Yes, this is the best configuration.

Hi @roleoroleo By deactivating AI Human Detection on YIhack and leaving the settings the same on the two apps (thus leaving only the motion detection active), the cam restarts at each motion detection, both by setting the YIhome app in home mode or in away from home mode .

I also tried the "Reset to yi-hack default", but it still restarts on every detection.

roleoroleo commented 3 years ago

Probably the cam restarts while taking the snapshot. It's a memory problem, check if swap file is enabled.

SmartM-ui commented 3 years ago

Probably the cam restarts while taking the snapshot. It's a memory problem, check if swap file is enabled.

Swap File is disabled. Do I have to enable it?

SmartM-ui commented 3 years ago

hi @roleoroleo

I have tried to activate swap file and the flow seems to have improved. After taking the picture, the cam freezes for a few seconds, but does not restart. After a while it resumes displaying the image in real time.

I continue to test.

tomredhot commented 2 years ago

Hi here. Exact same cam, exact same config, exact same symptoms for me. Have you find a correct config @SmartM-ui ? Thanks you both.

Bollean81 commented 2 years ago

Hi there! Can anybody tell me if the "Yi Dome U" is compatible? Its the white one, 1080p.

Bollean81 commented 2 years ago

Yes. h52ga, 9.0.22.10_202009041111

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.