roleoroleo / yi-hack_ha_integration

Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Yi Dome Camera U BFUS (Full HD)] Sound/baby crying sensor always off; human detection the same

majkers opened this issue · comments

Hi,
First of all thanks for your work!
But...I've noticed that on my Yi Dome Camera U BFUS (Full HD) with 9.0.22.14_202011061019 despite setting high sensitivity, my sound sensor and baby crying sensor are always off. Even though I see notifications from app that it (the sound) was detected. I really don't understand why there are two sesors (one for sound and second for baby crying) in integration and only one setting for sound in application?
The same goes for motion detection. When I disable human detection, motion sensor acts as expected. But when I enable it (it should react only for human detection right?) it always stays off even though I see a notification from app that a person has been detected.

This is what I get from mqtt explorer:

image

commented

I really don't understand why there are two sesors (one for sound and second for baby crying) in integration and only one setting for sound in application?

There are no particular reasonss, simply because they are 2 different messages (at system level).

Are you using the last version?
I fixed many problems about detection.

Yes. I installed it yesterday

commented

And what about the hack version of the cam?

0.2.3 h52ga yi-hack-Allwinner-v2

commented

I need to check it.

ok thanks

any news on that?

commented

About sound, I checked the code and tested with my y21ga.
It seems working correctly.
Please share with me you mqtt configuration.

About human detection, there is a misunderstanding: the integration does not manage it.
So if you enable human detection, you will not receive any message.
I will add the support in the next version.

EDIT

Check this commit: 01e3762

Hmmm, there is also one more thing but maybe for another issue. When I set password via http I can't login with it via ftp. I have to login via SSH and then use passwd command and then login via ftp....

But regards my config:

###############################################################################
#                       Configuration file for mqttv4                         #
###############################################################################

# -----------------------------------------------------------------------------
# Basic MQTT settings
# -----------------------------------------------------------------------------

MQTT_IP=IP_ADDRESS_HERE
MQTT_PORT=1883

MQTT_CLIENT_ID=kameraDomeU1

MQTT_USER=mqtt_user
MQTT_PASSWORD=PASSWORD_HERE

MQTT_PREFIX=kameraDomeU1
MQTT_PREFIX_CONFIG=

# -----------------------------------------------------------------------------
# Set the topics where the messages will be published
# The final topic will be MQTT_PREFIX/TOPIC_MOTION
# -----------------------------------------------------------------------------

TOPIC_BIRTH_WILL=status
TOPIC_MOTION=motion_detection
TOPIC_MOTION_IMAGE=motion_detection_image
MOTION_IMAGE_DELAY=0.5
TOPIC_MOTION_FILES=motion_files
TOPIC_SOUND_DETECTION=sound_detection

# -----------------------------------------------------------------------------
# Set the topics messages
# -----------------------------------------------------------------------------

BIRTH_MSG=online
WILL_MSG=offline
MOTION_START_MSG=motion_start
MOTION_STOP_MSG=motion_stop
AI_HUMAN_DETECTION_MSG=human
BABY_CRYING_MSG=crying
SOUND_DETECTION_MSG=sound

# -----------------------------------------------------------------------------
# Other settings
# -----------------------------------------------------------------------------

MQTT_KEEPALIVE=120
MQTT_QOS=1
MQTT_RETAIN_BIRTH_WILL=1
MQTT_RETAIN_MOTION=0
MQTT_RETAIN_MOTION_IMAGE=0
MQTT_RETAIN_MOTION_FILES=0
MQTT_RETAIN_SOUND_DETECTION=0
commented

Hmmm, there is also one more thing but maybe for another issue. When I set password via http I can't login with it via ftp. I have to login via SSH and then use passwd command and then login via ftp....

Yes, I already fixed this issue: roleoroleo/yi-hack-Allwinner-v2@271152a

Configuratin is ok, the last try is sniff the IPC queue.
Decompress this binary to the cam
ipc_sniff.gz
run it
./ipc_sniff ipc_dispatch_2
and post the output when there is a sound event.

To exactly what directory? Any chmod required? And one more question. Is it OK to have motion (but no human detection and no face detection) and sound enabled at the same time?

commented

To exactly what directory? Any chmod required?

/tmp/sd/
No chmod required.

And one more question. Is it OK to have motion (but no human detection and no face detection) and sound enabled at the same time?

Yes.

out.txt
Here's the file. I see sound event in the app

There is one more with motions (first) and then sound (second) events
out2.txt
I don't know what to look for...

commented

Ok, now I understand the problem.
I'm running a "not released" version where your problem is fixed:
roleoroleo/yi-hack-Allwinner-v2@192f3cd

I will publish a new release asap.

Thanks!!

It is working OK now.