roleoroleo / sonoff-hack

Custom firmware for Sonoff GK-200MP2B camera
GNU General Public License v3.0
200 stars 45 forks source link

PTZ not working #93

Closed WildRat closed 1 month ago

WildRat commented 1 year ago

Could you, please, help me solve missing PTZ problem? Other functions are working. I try swapping ptz bin - camera self calibrates, but PTZ controls did not work.

Reported at webpage info: Firmware Version 0.1.2 Base Version V5520.2053.0402build20220712 Model
Device ID a63001b3fb In eWelink app i see firmware name as GK-200MP2D

I can make fylesystem dumps if needed.

roleoroleo commented 1 year ago

Which control are you using to test PTZ? onvif, web page, ...?

WildRat commented 1 year ago

ONVIF. Web page show message PTZ not supported.

roleoroleo commented 1 year ago

GK-200MP2D is not supported at the moment. If you have a backup of the flash I could check if I can support it.

WildRat commented 1 year ago

Please take a look when you have time. Here (backup.zip) are the files obtained through the script (Dump your backup firmware (SD card)). And this is a new version of the firmware that they sent with corrected time zones: Time zone issue Fix package.zip.

roleoroleo commented 1 year ago

Sorry but, after checking your backup, I found an error in the backup script at this page: https://github.com/roleoroleo/sonoff-hack/wiki/Dump-your-backup-firmware-(SD-card))

Now, I updated it. Please download it again and repeat the procedure.

WildRat commented 1 year ago

I made a dump using the new version of the script: LINK REMOVED

roleoroleo commented 1 year ago

Your cam is the same as in this post: https://github.com/roleoroleo/sonoff-hack/issues/85

Sorry but I cannot support it, at the moment.

WildRat commented 1 year ago

I understand, thanks. Apparently this is a new version of this model. If there is an opportunity to work on this version, I can help check the functionality.

roleoroleo commented 1 year ago

To work on this version, we need to apply a lot of changes. But a cam is needed. And these changes must not break compatibility with the old version. @puuu is working on it.

ConorIA commented 1 year ago

This should be fixed in 0.1.3. https://github.com/roleoroleo/sonoff-hack/issues/85#issuecomment-1227500921

WildRat commented 1 year ago

But which version should I use?

roleoroleo commented 1 year ago

Based on the backup you shared with me, use GK-200MP2-B.

roleoroleo commented 1 year ago

@puuu @ConorIA Please reinstall 0.1.3 from scratch to avoid problem of future updates. If you already installed a beta.

WildRat commented 1 year ago

It's working without errors, but VERY slow. Video frame in 3-5 seconds. PTZ controls reacts once in 30-70 seconds.

roleoroleo commented 1 year ago

Try ptz with the web service, not with the web page. Because the web page calls a snapshot every second and the cam becomes slow.

WildRat commented 1 year ago

I tried with ONVIF Device Manager - PTZ works great! But no live video. And strange video presets: image image

WildRat commented 1 year ago

After couple reboots I managed to get it working with Synology Surveillance Station - video Ok, PTZ Ok. But strange video info: image Something is definitely wrong with ONVIF video profile.

bigsem89 commented 1 year ago

The same thing with GK-200MP2B. PTZ doesn't work. I've tried PTZ on http page and also via onvif manager. it works with ewelink.

Firmware Version | 0.1.3

Base Version | V2524.1.245build20191030 Model | GK-200MP2B Device ID | a63000ffc4

roleoroleo commented 1 year ago

I will check it.

bigsem89 commented 1 year ago

I will check it.

Thanks 🙏

roleoroleo commented 1 year ago

Try to remove the file /mnt/mmc/sonoff-hack/bin/ptz And reboot the cam.

bigsem89 commented 1 year ago

Try to remove the file /mnt/mmc/sonoff-hack/bin/ptz And reboot the cam.

did so. same result. ptz still doesn't work.

roleoroleo commented 1 year ago

Strange behavior. Try to run the ws: http://IP_OF_YOUR_CAM/cgi-bin/ptz.sh?dir=right

bigsem89 commented 1 year ago

Strange behavior. Try to run the ws: http://IP_OF_YOUR_CAM/cgi-bin/ptz.sh?dir=right

{ "error":"false" }

roleoroleo commented 1 year ago

Does the cam moves?

roleoroleo commented 1 year ago

And check the error running ipc_cmd with a ssh console.

bigsem89 commented 1 year ago

Does the cam moves?

no

bigsem89 commented 1 year ago

And check the error running ipc_cmd with a ssh console.

What is ipc_cmd? where can i find it?

roleoroleo commented 1 year ago

Sorry, ipc_cmd is for another model. Try ptz command. Login with ssh and run the following commands:

. /mnt/mmc/sonoff-hack/script/env.sh
ptz -a right
officialjonot commented 1 year ago

Firmware Version 0.1.4 Base Version V2524.1.245build20191030 Model GK-200MP2B

when I login and issue the two commands in the previous comment I get the response: ptz: can't resolve symbol 'hw_ptz_sendptz'

Sorry, ipc_cmd is for another model. Try ptz command. Login with ssh and run the following commands:

. /mnt/mmc/sonoff-hack/script/env.sh
ptz -a right
javotito commented 1 year ago

Firmware Version 0.1.4 Base Version V2524.1.245build20191030 Model GK-200MP2B

when I login and issue the two commands in the previous comment I get the response: ptz: can't resolve symbol 'hw_ptz_sendptz'

Sorry, ipc_cmd is for another model. Try ptz command. Login with ssh and run the following commands:

. /mnt/mmc/sonoff-hack/script/env.sh
ptz -a right

Same error here with same camera, same firmware and same base version.

roleoroleo commented 1 year ago

Please, check if you have a library libhardware.so or libptz.so in the folder /mnt/mtd/ipc/app/lib

officialjonot commented 1 year ago
[root@sonoff-c00d]# cd /mnt/mtd/ipc/app/lib
[root@sonoff-c00d]# ls
libNetLib.so            libdbmanager.so         libserviceinterface.so
libappmanager.so        libhardware.so          libservicemanager.so
libavcodec.so.55        libioport.so            libspeaker.so
libavformat.so.55       libled.so               libspi.so
libavsharemem.so        liblogmanager.so        libssl.so
libavutil.so.52         libmainic.so            libssl.so.1.0.0
libcfg.so               libportmap.so           libusermanager.so
libcommunication.so     libptz.so               libwdt.so
libcrypt-0.9.33.2.so    librtc.so               libwifi.so
libcrypt.so.0           librtmp.so              libz.so.1
libcrypto.so            libsd.so
libcrypto.so.1.0.0      libsensor.so
roleoroleo commented 1 year ago

Try these commands:

ptz_h -a right
ptz_p -a right
officialjonot commented 1 year ago
[root@sonoff-c00d]# ptz_h -a right
ptz_h: can't resolve symbol 'hw_ptz_sendptz'

ptz-p -a right works!

roleoroleo commented 1 year ago

Ok, copy the file: cp /mnt/mmc/sonoff-hack/bin/ptz_p /mnt/mmc/sonoff-hack/bin/ptz

officialjonot commented 1 year ago

ok fantastic - its working on the web PTZ panel now http://<IP-OF-CAMERA>/?page=ptz. I will investigate to see if it works on ONVIF device manager. Thank you Roleo.

edit: it also works now in ONVIF device manager (odm). Whoop! Thank you!

EpicLPer commented 1 year ago

Ok, copy the file: cp /mnt/mmc/sonoff-hack/bin/ptz_p /mnt/mmc/sonoff-hack/bin/ptz

Just wanted to say that this also worked for mine :)

github-actions[bot] commented 2 months 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.