yi-hack-Allwinner-v2
yi-hack-Allwinner-v2 copied to clipboard
ONVIF server doesn't start after reboot in 0.2.7 h60ga
Hi, I noticed after the updated to 0.2.7 that the ONVIF server is not auto-started when the cam boots. I searched in the issues and I found some old code to manually launch the server and with this code it works, but after a reboot is again not auto started.
Please let me know if you need any log or info from my side.
Thanks!
The server should work if the option is selected.
I checked and the option is selected (was already selected) and system.sh contained that line. I reverted to 0.2.6 and ONVIF is working again... maybe it's something related to my config. I guess that this can be closed
~~Try to run the daemon manually from a ssh session.~~ ~~Maybe there is an error.~~
~~Check if the file /tmp/onvif_simple_server.conf exists and is not empty.~~
~~And post it if yuo can.~~
~~Run the command:~~
~~onvif_simple_server --conf_file /tmp/onvif_simple_server.conf
~~
Same here with but y211ga
Here is the debug log:
root@yi-cam-salon:/tmp/sd# cat hack_debug.log
Starting system.sh
Make /etc writable
Activating swap file
Setting username and password
Setting SSH password
Configuring cloudAPI
Starting yi processes
PID USER VSZ STAT COMMAND
1 root 980 S /sbin/init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW< [kworker/0:0H]
6 root 0 SW [kworker/u2:0]
7 root 0 SW [rcu_preempt]
8 root 0 SW [rcu_sched]
9 root 0 SW [rcu_bh]
10 root 0 SW< [lru-add-drain]
11 root 0 SW [kdevtmpfs]
12 root 0 SW [kworker/u2:1]
211 root 0 SW [oom_reaper]
212 root 0 SW< [writeback]
214 root 0 SW [kcompactd0]
215 root 0 SW< [crypto]
216 root 0 SW< [bioset]
218 root 0 SW< [kblockd]
259 root 0 SW [sys_user]
266 root 0 SW [kworker/0:1]
267 root 0 SW< [cfg80211]
273 root 0 SW< [watchdogd]
288 root 0 SW< [spi0]
298 root 0 SW [kswapd0]
382 root 0 SW< [bioset]
387 root 0 SW< [bioset]
392 root 0 SW< [bioset]
397 root 0 SW< [bioset]
402 root 0 SW< [bioset]
407 root 0 SW< [bioset]
412 root 0 SW< [bioset]
417 root 0 SW< [bioset]
422 root 0 SW< [bioset]
450 root 0 SW [irq/302-sunxi-m]
452 root 0 SW [irq/166-sdc0 cd]
453 root 0 SW [irq/303-sunxi-m]
454 root 0 SW [kworker/0:2]
458 root 0 SW [kworker/0:3]
525 root 0 SW< [kworker/0:1H]
526 root 0 SW [kworker/0:4]
528 root 0 SW< [bioset]
529 root 0 SW [mmcqd/0]
545 root 0 SWN [jffs2_gcd_mtd4]
580 root 980 S /usr/sbin/telnetd
594 root 0 SW< [phy0-atbm_wq]
595 root 0 SW [phy0-usb_atbm_b]
641 root 1256 S ./dispatch
644 root 988 S sh /tmp/sd/yi-hack/script/system.sh
645 root 0 SW [kworker/u2:2]
1203 root 0 Z [init]
1256 root 980 R ps
total used free shared buff/cache available
Mem: 60908 9256 46184 72 5468 50540
Swap: 65532 0 65532
Yi processes started successfully
PID USER VSZ STAT COMMAND
1 root 980 S /sbin/init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW< [kworker/0:0H]
6 root 0 SW [kworker/u2:0]
7 root 0 SW [rcu_preempt]
8 root 0 SW [rcu_sched]
9 root 0 SW [rcu_bh]
10 root 0 SW< [lru-add-drain]
11 root 0 SW [kdevtmpfs]
12 root 0 SW [kworker/u2:1]
211 root 0 SW [oom_reaper]
212 root 0 SW< [writeback]
214 root 0 SW [kcompactd0]
215 root 0 SW< [crypto]
216 root 0 SW< [bioset]
218 root 0 SW< [kblockd]
259 root 0 SW [sys_user]
266 root 0 SW [kworker/0:1]
267 root 0 SW< [cfg80211]
273 root 0 SW< [watchdogd]
288 root 0 SW< [spi0]
298 root 0 SW [kswapd0]
382 root 0 SW< [bioset]
387 root 0 SW< [bioset]
392 root 0 SW< [bioset]
397 root 0 SW< [bioset]
402 root 0 SW< [bioset]
407 root 0 SW< [bioset]
412 root 0 SW< [bioset]
417 root 0 SW< [bioset]
422 root 0 SW< [bioset]
450 root 0 SW [irq/302-sunxi-m]
452 root 0 SW [irq/166-sdc0 cd]
453 root 0 SW [irq/303-sunxi-m]
454 root 0 SW [kworker/0:2]
458 root 0 SW [kworker/0:3]
525 root 0 SW< [kworker/0:1H]
526 root 0 SW [kworker/0:4]
528 root 0 SW< [bioset]
529 root 0 SW [mmcqd/0]
545 root 0 SWN [jffs2_gcd_mtd4]
580 root 980 S /usr/sbin/telnetd
594 root 0 SW< [phy0-atbm_wq]
595 root 0 SW [phy0-usb_atbm_b]
641 root 1256 S ./dispatch
644 root 992 S sh /tmp/sd/yi-hack/script/system.sh
645 root 0 SW [kworker/u2:2]
1287 root 51184 S ./rmm
1355 root 1488 S /backup/tools/wpa_supplicant -c/tmp/wpa_supplicant.c
1379 root 1048 S udhcpc -i wlan0 -b -s /backup/tools/default.script -
1573 root 0 Z [init]
1600 root 0 Z [rm]
1641 root 952 S ./cloud
1642 root 980 R ps
1644 root 980 S sh -c /home/app/cloudAPI -c 136 -url https://api.eu.
1645 root 980 S {cloudAPI} /bin/sh /home/app/cloudAPI -c 136 -url ht
total used free shared buff/cache available
Mem: 60908 37476 2280 296 21152 22112
Swap: 65532 0 65532
Starting http
Starting ftp
Starting sshd
Starting ntp
Starting mqtt services
Starting rtsp
Starting onvif
Starting crontab
Starting custom startup.sh
system.sh completed
PID USER VSZ STAT COMMAND
1 root 980 S /sbin/init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW< [kworker/0:0H]
6 root 0 SW [kworker/u2:0]
7 root 0 SW [rcu_preempt]
8 root 0 SW [rcu_sched]
9 root 0 SW [rcu_bh]
10 root 0 SW< [lru-add-drain]
11 root 0 SW [kdevtmpfs]
12 root 0 SW [kworker/u2:1]
211 root 0 SW [oom_reaper]
212 root 0 SW< [writeback]
214 root 0 SW [kcompactd0]
215 root 0 SW< [crypto]
216 root 0 SW< [bioset]
218 root 0 SW< [kblockd]
259 root 0 SW [sys_user]
266 root 0 SW [kworker/0:1]
267 root 0 SW< [cfg80211]
273 root 0 SW< [watchdogd]
288 root 0 SW< [spi0]
298 root 0 SW [kswapd0]
382 root 0 SW< [bioset]
387 root 0 SW< [bioset]
392 root 0 SW< [bioset]
397 root 0 SW< [bioset]
402 root 0 SW< [bioset]
407 root 0 SW< [bioset]
412 root 0 SW< [bioset]
417 root 0 SW< [bioset]
422 root 0 SW< [bioset]
450 root 0 SW [irq/302-sunxi-m]
452 root 0 SW [irq/166-sdc0 cd]
453 root 0 SW [irq/303-sunxi-m]
454 root 0 SW [kworker/0:2]
458 root 0 SW [kworker/0:3]
525 root 0 SW< [kworker/0:1H]
526 root 0 SW [kworker/0:4]
528 root 0 SW< [bioset]
529 root 0 SW [mmcqd/0]
545 root 0 SWN [jffs2_gcd_mtd4]
580 root 980 S /usr/sbin/telnetd
594 root 0 SW< [phy0-atbm_wq]
595 root 0 SW [phy0-usb_atbm_b]
641 root 1256 S ./dispatch
644 root 996 S sh /tmp/sd/yi-hack/script/system.sh
645 root 0 SW [kworker/u2:2]
1287 root 51184 S ./rmm
1355 root 1488 S /backup/tools/wpa_supplicant -c/tmp/wpa_supplicant.c
1379 root 1048 S udhcpc -i wlan0 -b -s /backup/tools/default.script -
1641 root 1216 S ./cloud
1674 root 964 S {httpd} /tmp/sd/yi-hack/bin/busybox /tmp/sd/yi-hack/
1685 root 844 S pure-ftpd (SERVER)
1695 root 892 S /tmp/sd/yi-hack/bin/dropbearmulti /tmp/sd/yi-hack/sb
1701 root 880 S mqttv4
1886 root 964 S {ntpd} /tmp/sd/yi-hack/bin/busybox /tmp/sd/yi-hack/u
1916 root 996 S {wd_rtsp.sh} /bin/sh /tmp/sd/yi-hack/script/wd_rtsp.
1959 root 680 S wsd_simple_server --pid_file /var/run/wsd_simple_ser
2009 root 964 S {crond} /tmp/sd/yi-hack/bin/busybox /tmp/sd/yi-hack/
2284 root 4060 S< rRTSPServer -m y211ga -r high -a no -p 554 -u yi-cam
2298 root 980 S sleep 10
2343 root 0 Z [init]
2353 root 980 R ps
total used free shared buff/cache available
Mem: 60908 38780 1196 1032 20932 20072
Swap: 65532 0 65532
Sorry, my mistake. Onvif server is not a daemon, the new version is a cgi. So it's not started during the boot process.
EDIT
Check if there is the log file: /var/log/onvif_simple_server.log
I think i found the problem: I tried to start "onvif_srvd --conf_file /tmp/onvif_simple_server.conf" manually and it told me "Address in use" Seems like the port in the config is wrong (8080) Changed it to 80 and started onvif_srvd again. Now it seems to work
(btw. log was empty)
With the new version onvif_srvd is deprecated and not used. The new binary is onvif_simple_server and it's not a daemon but a cgi. So it shares the port 80 with httpd.
@roleoroleo Is it known when the new binaries will be released with the fixed ONVIF?
Sorry for the problem. I'm not able to release a new version this week. Please use this archive and overwrite the files in /tmp/sd/yi-hack onvif.tar.gz
Tried the archive today and didn't work for me (tested with Home-Assistant onvif integration)
I'm using it with ha and onvif integration and it works properly for me. Home Assistant 2023.5.4 h52ga with 0.2.7
got a y21ga. Home Assistant 2023.6.3 Will try again later, but neither autodetect nor manual worked
edit: will also try my r30gb
Autodetect doesn't work for me. But it doesn't work with other onvif cams either.
Same problem with me for r35gb on 0.2.7, the onvif home assistant integration cannot connect. Works fine with 0.2.6 firmware version.
https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/647#issuecomment-1609971532
Sorry for the problem. I'm not able to release a new version this week. Please use this archive and overwrite the files in /tmp/sd/yi-hack onvif.tar.gz
Any chance that you can explain how to upload those files ?? I try with ssh or ftp but always get permission error
Some problem here with h60ga and >0.2.6 either. ONVIF discover not found in many apps but manually settings solve most of then. My 3YO DVR tells-me that there are some wrong connection parameter, the ONVIF app for windows too. My last try was using 0.2.9 plus onvif.tar attached at this conversation. Rolling back to 0.2.6 again
Please, check again. 0.2.9 must work. Tested with:
- HA
- Onvif Device Manager
- Onvif Device Test Tool
- Synology Surveillance Station
Both: web service discovery and onvif server.
@roleoroleo it works well for me!
Yesterday I tried both an upgrade from 0.2.6 to 0.2.9 and a clean install, that way I couldn't even connect from HA. After applying the patch I was able to connect through HA, but the hikvision DS-7108HGHI-K1 DVR could not connect to the IPC. I will repeat the tests later and report here the result. I think that hikvision ONVIF implementation is a bit messy, but as I have analog cameras I have to deal with it.
Please, test the cam with ODM. If the cam works and you are able to send me some network capture, I can try to improve the compatibility with Hikvision DVR.
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.
any new about to fix ONVIF with Hikvision NVR ?
I tested version 0.3.0, unfortunately I got the same behavior as before. I can access the stream through ODM and HA, but not on Hikvision DVR. I have another IPC (GK-200MP2B ), running sonoff-hack 0.1.5, as it opens distinct ports for HTTPD and ONVIF, there is no problem working with Hikvision DVR
The port is not a problem. I completed today a new version of the onvif processes. Do you want to try them?
The port is not a problem. I completed today a new version of the onvif processes. Do you want to try them?
If you explain to me how to do this, I will be happy to check it for you...
The port is not a problem. I completed today a new version of the onvif processes. Do you want to try them?
i did it like in your Wiki and still onvif didn't work
I will send a complete image to load into the cam.
I will send a complete image to load into the cam.
My firmware camera is r35gb. Thanks
Here it is: r35gb_0.3.0.tar.gz