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

Fail on Yi Home IFUS #11

Open
kosauser opened this issue Jan 25, 2024 · 7 comments
Open

Fail on Yi Home IFUS #11

kosauser opened this issue Jan 25, 2024 · 7 comments
Labels
duplicate This issue or pull request already exists resolved

Comments

@kosauser
Copy link

Hello,

Is there any chance to implement it also on unsupported Yi 1080p Home IFUS with Owner avatar
yi-hack-Allwinner-v2?
I did try it and it look good in logs, directory gets created on OneDrive, but it is empty. Already on this camera GDrive hack is working (do not know if this is a root cause. Any ideas what to check?

From the installation log ./init.sh: line 1: ls: Argument list too long occurs periodically.

Using your authorization code to get an access token ...
Get OneDrive access tokens successfully
Enabled OneDrive Uploader auto-run when camera boots up.
Success: get_drive_status
You have used 6.20GB(0.59%) of your storage space, with 1047.80GB(99.41%) space remaining.
Check './data/drive_status.json' to see your drive quota details.
Your OneDrive access is available.
Success: create_folder yihack_videos
Created folder yihack_videos to store your video files successfully.
Configuration is done.
Start to check camera video and image files for uploading...
./init.sh: line 1: ls: Argument list too long
All files were uploaded, wait for a new recorded video or image file.
./init.sh: line 1: ls: Argument list too long
All files were uploaded, wait for a new recorded video or image file.
@denven
Copy link
Owner

denven commented Jan 26, 2024

I cannot say absolutely yes since I don't have tested with that device, but I think it is very likely to be compatible with Yi cameras when:

  • it is hacked with similar yi-hack firmware
  • the records on sd card have the same file and directory hierarchy naming format

For your current issue, can you type the below command and paste your result here?

cd /tmp/sd/record
find . -type f | awk 'END {print "total files: "NR}'
find . -type f \( -name "*.mp4" -o -name "*.jpg" \) | awk 'END {print "total media files: "NR}'
ls -R | tail -n 122
du -h

cd ../yi-hack/onedrive/logs
cat logs 
# or reboot the camera
tail -f -n 100 logs

and if there are too many files never uploaded, can you download your old directory to backup and keep only a few recent records directories to test in the beginning?

@kosauser
Copy link
Author

kosauser commented Jan 29, 2024

root@(none):~# cd /tmp/sd/record
root@(none):/tmp/sd/record# find . -type f | awk 'END {print "total files: "NR}'
total files: 5368
root@(none):/tmp/sd/record# find . -type f \( -name "*.mp4" -o -name "*.jpg" \) | awk 'END {print "total media files: "NR}'
total media files: 5368
root@(none):/tmp/sd/record# ls -R | tail -n 122
05M00S60.mp4
06M00S60.mp4
07M00S60.mp4
09M09S51.mp4
10M00S60.mp4
11M07S53.mp4
12M00S60.mp4
13M00S60.mp4
14M00S60.mp4
15M00S60.mp4
16M00S60.mp4
17M00S60.mp4
18M00S60.mp4
19M00S60.mp4
20M00S60.mp4
21M00S60.mp4
22M00S60.mp4
23M00S60.mp4
27M47S13.mp4
28M00S60.mp4
29M00S60.mp4
30M36S24.mp4
31M00S60.mp4
32M01S59.mp4
33M00S60.mp4
34M00S60.mp4
36M15S45.mp4
37M00S60.mp4
38M00S60.mp4
39M00S60.mp4
40M00S60.mp4
41M00S60.mp4
42M00S60.mp4
43M00S60.mp4
44M00S60.mp4
45M00S60.mp4
46M00S60.mp4
47M00S60.mp4
48M00S60.mp4
49M00S60.mp4
50M00S60.mp4
51M00S60.mp4
52M00S60.mp4
53M00S60.mp4
54M00S60.mp4
55M00S60.mp4
56M00S60.mp4
57M00S60.mp4
58M00S60.mp4
59M00S60.mp4

./2024Y01M29D18H:
00M00S60.mp4
01M00S60.mp4
02M00S60.mp4
03M00S60.mp4
04M00S60.mp4
05M00S60.mp4
06M00S60.mp4
07M00S60.mp4
08M00S60.mp4
09M00S60.mp4
10M00S60.mp4
11M00S60.mp4
12M00S60.mp4
13M00S60.mp4
14M00S60.mp4
15M00S60.mp4
16M00S60.mp4
17M00S60.mp4
18M06S54.mp4
19M00S60.mp4
20M00S60.mp4
21M00S60.mp4
22M00S60.mp4
23M00S60.mp4
24M00S60.mp4
34M29S31.mp4
35M00S60.mp4
36M00S60.mp4
37M00S60.mp4
38M00S60.mp4
39M00S60.mp4
40M43S17.mp4
41M00S60.mp4
42M00S60.mp4
43M00S60.mp4
47M06S54.mp4
48M00S60.mp4
49M00S60.mp4
50M00S60.mp4
51M00S60.mp4
52M00S60.mp4
53M00S60.mp4
54M00S60.mp4
55M36S24.mp4
56M00S60.mp4
57M00S60.mp4
58M00S60.mp4
59M00S60.mp4

./2024Y01M29D19H:
00M00S60.mp4
00M59S01.mp4
01M00S60.mp4
02M00S60.mp4
03M00S60.mp4
04M00S60.mp4
05M05S55.mp4
06M00S60.mp4
07M00S60.mp4
08M00S60.mp4
09M05S55.mp4
10M00S60.mp4
11M00S60.mp4
12M14S46.mp4
13M00S60.mp4
14M00S60.mp4
15M00S60.mp4
16M00S60.mp4
17M11S49.mp4
18M00S60.mp4
root@(none):/tmp/sd/record# du -h
du: unrecognized option: h
root@(none):/tmp/sd/record# 

I'll clean those recordings
Also in logs I see this entry:

2024-01-25 21:56:50: OneDive Uploader started...
2024-01-29 20:48:56: 
2024-01-29 20:48:57: get_drive_status, Error: IDX14100: JWT is not well formed, there are no dots (.).
The token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EndcodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'., Code: InvalidAuthenticationToken

@kosauser
Copy link
Author

kosauser commented Jan 29, 2024

After delteing files:

root@(none):~/onedrive/log# cd /tmp/sd/record
root@(none):/tmp/sd/record# find . -type f | awk 'END {print "total files: "NR}'
total files: 4
root@(none):/tmp/sd/record# find . -type f \( -name "*.mp4" -o -name "*.jpg" \) | awk 'END {print "total media files: "NR}'
total media files: 3
root@(none):/tmp/sd/record# ls -R | tail -n 122
.:
2024Y01M29D20H
tmp.mp4.tmp

./2024Y01M29D20H:
46M23S37.mp4
47M00S60.mp4
48M56S04.mp4
root@(none):/tmp/sd/record# du -h
du: unrecognized option: h
root@(none):/tmp/sd/record# cd /tmp/sd//yi-hack/onedrive/log/
root@(none):~/onedrive/log# tail logs 
2024-01-29 20:49:03: Update index from files newer than file /tmp/sd/record/2024Y01M08D20H/02M42S18.mp4...
2024-01-29 20:49:03: Updated index successfully.
2024-01-29 20:59:41: OneDive Uploader started...
2024-01-29 20:59:44: Refresh API tokens successfully, your token is still valid.
2024-01-29 20:59:46: Update index from files newer than file /tmp/sd/record/2024Y01M08D20H/02M42S18.mp4...
2024-01-29 20:59:46: Updated index successfully.
2024-01-29 21:11:18: OneDive Uploader started...
2024-01-29 21:11:21: Refresh API tokens successfully, your token is still valid.
2024-01-29 21:11:23: Update index from files newer than file /tmp/sd/record/2024Y01M08D20H/02M42S18.mp4...
2024-01-29 21:11:23: Updated index successfully.
root@(none):~/onedrive/log# 

obraz
All directories inside are empty:
obraz
terminal file

Start to upload /tmp/sd/record/2024Y01M29D20H/46M23S37.mp4
Target OneDrive path: yihack_videos/202401/20240129/2024Y01M29D20H, file size: 4.19MB
Success: create_upload_session /tmp/sd/record/2024Y01M29D20H/46M23S37.mp4
upload_large_file_by_chunks /tmp/sd/record/2024Y01M29D20H/46M23S37.mp4
2024-01-29 22:15:32 upload chunk: 0, length: 3932160, bytes: 0-3932159
./init.sh: line 1: Illegal number:  -3
root@(none):~/onedrive/log# cat terminal 

@denven
Copy link
Owner

denven commented Jan 31, 2024

it seems like you are close to success. it's hard to tell which step has an error.

Here I have some suggestions:

  • use the latest version if you are not using it
  • try to delete data/ and log/ folder in onedrive directory and restart your setup once more
  • better to follow the steps and operations on camera in Readme

@kosauser after you have set it up again, can you replace the api.sh file with this file(link) and check the terminal output info again

Hope you have new progress.

@denven
Copy link
Owner

denven commented Jun 30, 2024

@kosauser please check the fix for issue #12 or the latest release, I think your model could be supported.

@kosauser
Copy link
Author

kosauser commented Jul 3, 2024

@denven It fixed it as for now on 🥇 thanks 👍

@denven
Copy link
Owner

denven commented Jul 4, 2024

@denven It fixed it as for now on 🥇 thanks 👍

@kosauser
btw, can you provide your camera model and firmware information like the example below:

Model: Yi Home Pro 2K
Model Suffix: y623
Base Firmware: 12.0.51.08_202403081746
Allwinner v2 firmware: 0.3.2

or you can check and refer to the supported models in Readme.

I will add your camera model to the supported list.

@denven denven added resolved duplicate This issue or pull request already exists labels Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists resolved
Projects
None yet
Development

No branches or pull requests

2 participants