openipcamera / openipc-firmware

OpenIPC Firmware for Wyze Cameras
https://openip.cam
894 stars 129 forks source link

Auto Night Mode does not work #96

Open picameratk opened 6 years ago

picameratk commented 6 years ago

In the ldr.sh script the value coming out of:
/dev/jz_adc_aux_0 count=20 | sed -e 's/[^.]//g' | wc -m >> /var/run/ldr
never seems to change and may be the root cause of the problem. i even put a box over the camera and the value did not change.

Now, having said that if I force night_mode on in the script it seems to work properly. Also, setting night_mode off works when forced in the script as well. night_mode can be found in common_functions.sh but the ldr.sh script is the script that should understand the current lighting level and set night_mode.

I am thinking about writing a work around that just sets night_mode based upon time of day.

jasonmhite commented 6 years ago

There is no LDR in the v2 model; the official firmware detects night mode based on image analysis. This is a known problem, it says so right in the readme. There is no fix other than implementing the same sort of image analysis.

nhorvath commented 5 years ago

What about a scheduled night mode based on the clock or even better a sunup/sunset webservice?

philross88 commented 5 years ago

Perhaps schedule a cron job to see the sunset time from https://sunrise-sunset.org/api and turn on the night mode.

patrocle2015 commented 5 years ago

Will be nice if something can be done, as not changing from day to night and night to day.

weilu commented 4 years ago

I made a chrome extension which does the periodic image analysis and turn on/off IR settings accordingly: https://github.com/weilu/isitdark

It's a chrome extension because it's the easiest way to access the Dafang Hacks camera control page. The chrome store version is currently under review (will update the link here once it's published); to use it you can still clone and unpack the extension source code directly for now.

jamincollins commented 4 years ago

It appears that @weilu's extension has made it into the chrome store: https://chrome.google.com/webstore/detail/is-it-dark/bnaobfbfbkbhciabajhebnlnaddnjmeo