Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no mqtt motion messages? solved ! no app working after hack? solved! #328

Closed
Maxym77 opened this issue Jan 2, 2022 · 6 comments
Closed
Labels

Comments

@Maxym77
Copy link

Maxym77 commented Jan 2, 2022

Hi, after some hours of test i have found this two solutions for this problems:

  1. only online-offline messages in mqtt (no motions messages)
  2. orignal app on phone won't work

In past, i have created the "Factory" directory (in /tmp/sd) for my personalizated wpa_supplicant.conf, and the problems had started, so just removing the directory and work perfectly.

There is an solution for put forced the “mac” SSID of my repeater without Factory directory?

@roleoroleo
Copy link
Owner

There is an solution for put forced the “mac” SSID of my repeater without Factory directory?

Could you explain me better?

@Maxym77
Copy link
Author

Maxym77 commented Jan 6, 2022

hi roleoroleo!
if you have a network with several repeaters and same SSID, it may happen that the cam connects to the wrong repeater (for example the farthest one, resulting very low signal). I have tryed a solution to force the correct repeater:

i have tryed with the file /tmp/sd/yi-hack/startup.sh
with this simple script:
#!/bin/sh
cp /tmp/sd/yi-hack/wpa_supplicant.conf /tmp/wpa_supplicant.conf

the /tmp/sd/yi-hack/wpa_supplicant.conf is:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
network={
bssid=XX:XX:XX:XX:XX:XX:XX <----- (the real mac of repeater i need to connect)
ssid="MAX"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="mypass"
}

i ned at each reboot the cam will connect to the favorite repeater ...but the cam take decision and sometime is connected with other repeater...

For the rest the cam is perfect with your hack, the only problems I encounter are:

  • too many unnecessary motion (human detection does not work).. too many motion start / end messages arrived in mqtt even though nothing is moving in the room... human detection not work (you already know about it).
  • RTSP signal in tcp is fine but ffmpeg freeze after few seconds, while in UDP ffmpeg never freeze but there are too many artifacts (io use ffplay for mosaic (2X2 cam) stream on monitor ).

If you could solve these points it would be a perfect cam with your hack!

@roleoroleo
Copy link
Owner

Maybe startup.sh arrives too late and wpa_supplicant already started.
You could try to add a command that kills wpa_supplicant and copies the file.
The yi watchdog will restart wpa_supplicant again.

About motion detection you could try to descrease sensitivity.
If I leave my phone in the room where I have the cam, the led is enough to start the motion.
About human detection, I already tried to fix the problem but no success.

RTSP is a know issue but I can't find the problem, the grabber is ok and the server is live555 (so a "big" software).
I don't know how to improve the reliability.
Try to read this: roleoroleo/yi-hack-MStar#36

@Maxym77
Copy link
Author

Maxym77 commented Jan 9, 2022

very tanks, i have added in startup.sh, after the file copy:
killall wpa_supplicant

seems works fine

my sensitivity is at minimum... human detection with inverted mqtt works (no trigger if i move only objects in front of camera) but sometime (1 event every 3 hours) there is one event triggered without human in the rooms... :-( i don't understand this....
Sometime the problem also show up with the original software and no-hack.

About rtsp i see the original app and the desktop app (https://www2.yitechnology.com/yi-home-pc-app) works very flawless.
I think we need to investigate here... you think there is no way for grab original app video flow ?

@roleoroleo
Copy link
Owner

The original stream is encapsulated inside a custom protocol and I'm not able to decode it.

@stale
Copy link

stale bot commented Dec 9, 2022

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.

@stale stale bot added the stale label Dec 9, 2022
@stale stale bot closed this as completed Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants