roleoroleo / sonoff-hack

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

Only setup PTZ if kernel module is loaded #100

Closed darkxst closed 1 year ago

darkxst commented 1 year ago

I have a new Sonoff Slim Cam model S-CAM that is running firmware V5520.2053.0402build20220712 this seems to be the same or similar build as the one for the GK-200MP2-B. I have been testing this with the existing 0.1.3 release for GK-200MP2-B and everything seems to be working as expected. The model is correctly detected as S-CAM, /etc is readonly and the audio files are in the same locations as the GK-200MP2-B build.

This camera does not support PTZ and as a result the ptz_drv kernel module is not loaded on boot by default. However it does exist in the firmware image and ends up being loaded by the sonoff-hack scripts.

This pull request avoids loading the ptz_drv module (saving a little bit of precious RAM) and ensures that PTZ is not enabled/setup in ONVIF and the webui.

I have not tested with a PTZ camera as I dont have any hardware, however so long as the ptz_drv is always actually loaded on boot then it wont cause any change in behaviour on these cameras.

roleoroleo commented 1 year ago

Than you for your code.