BaQs / pyEzviz

Python package for ezviz cameras
Apache License 2.0
103 stars 45 forks source link

Wake up a battery Cam (C3a) #107

Closed rezzalex closed 1 year ago

rezzalex commented 1 year ago

Hello,

I have tried this command with no success :

root@xxxxxx:/opt/domoticz# pyezviz -u login -p pass camera --serial xxxxxxxxx switch --switch sleep --enable 1 Could not set the switch: Got 200 : {"meta":{"code":2009,"message":"设备网络异常,请检查设备网络或者重试","moreInfo":null}}) root@xxxxxx:/opt/domoticz# ^C root@xxxxxx:/opt/domoticz# pyezviz -u login -p pass camera --serial xxxxxxxxx switch --switch sleep --enable 0 Could not set the switch: Got 200 : {"meta":{"code":2009,"message":"设备网络异常,请检查设备网络或者重试","moreInfo":null}})

what would be the correct syntax ? The idea would be to be able to stream the video flow from Domoticz, as a "standard" cam

rezzalex commented 1 year ago

I think I have succeed to pass the command. But it seems to completely put the Cam in hibernation, ans then impossible to wake it up... except physically

RenierM26 commented 1 year ago

Hi @rezzalex,

Easiest way to wake the camera is by querying detection sensitivity (The command is forwarded directly to the device)

rezzalex commented 1 year ago

Thank you @RenierM26 , could you detail the command to do that ?

RenierM26 commented 1 year ago

Hi @rezzalex,

Setting the camera detection sensitivity with the --sensibility switch should do the trick. Should still work even if you set it to the same level as what it 's currently. (0 - 100 for PIR cameras like the C3A)

rezzalex commented 1 year ago

This is working, thank you. Sensibility values are from 1 to 6