openmiko / openmiko

Open source firmware for Ingenic T20 based devices such as WyzeCam V2, Xiaomi Xiaofang 1S, iSmartAlarm's Spot+ and others.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is There a Setting to Disable IR Lights in Night Mode?

rbassett3 opened this issue · comments

Thank you for this excellent project!

I'm using a WyzeV2 cam against a window, and when the camera switches to night mode it activates the camera's infrared light. I have the camera up against a window, so the red light creates a reflection so I'd like to disable it. I checked through the documentation and settings.json file but didn't see anything relevant.

Is there a way to disable the camera's infrared lights in night mode?

Hey, the IR lights are required for night mode to work, so you would need to disable the night mode. ENABLE_AUTONIGHT=0.

You could also enable the API, and curl -d value=0 http://CAMERA_IP:8081/api/ir_led to do what you asked, but I suppose you will end up with a black image when in night mode.

Is there a way to disable the camera's infrared lights in night mode?

If you're still interested..
The nightmode is just a script (/usr/bin/nightmode.sh), if you copy it to the same location in the overlay (/config/overlay/usr/bin/), or on the sdcard, you can then edit it to remove the portions that turn the lights on/off (they are separate from the ir-cut), and it will stay persistent as long as it stays in the overlay directories.

If you have SSH access, you can use cp to copy, and nano to edit.
otherwise, you can pull the file from Here.

Edit as follows:

case $1 in
        on)
                echo "$(date) - nightmode on"
                if [ "$DISABLE_LEDS" == "0" ]; then
                        ir_led on <--- REMOVE THIS LINE
                        ir_cut off
                fi
                echo "1" > $NIGHTVISION_FILE
                ;;
        off)
                echo "$(date) - nightmode off"
                ir_led off <--- REMOVE THIS LINE
                ir_cut on
                echo "0" > $NIGHTVISION_FILE
                ;;