openfang icon indicating copy to clipboard operation
openfang copied to clipboard

[T20L Xiaomi Mijia 2018] Auto Night detection

Open lenisko opened this issue 6 years ago • 9 comments
trafficstars

Looks like it's not working

$ autonight -D /dev/jz_adc_aux_0 -v -d 1
Current value: 710.48
Current value: 710.12
Current value: 710.24
Current value: 710.72
Current value: 714.32
Window (5) Avg: 711.18
Current value: 711.20
Window (5) Avg: 711.32
Current value: 711.68
Window (5) Avg: 711.63
Current value: 710.00
Window (5) Avg: 711.58
Current value: 714.80
Window (5) Avg: 712.40

I have cowered cam with my hand in half of those readings. Values are very odd...

Any clues?

lenisko avatar Jul 02 '19 22:07 lenisko

Same values for me with covered and uncovered camera (between 719 and 717). Currently I'm using my own compiled version and night mode doesn't activate.

eteixido1 avatar Aug 14 '19 08:08 eteixido1

Hello Lenisko, today afer starting IR LED and IR CUT, autonight start returning values between 1800 & 50000. Maybe autonight needs one of them.

eteixido1 avatar Aug 14 '19 19:08 eteixido1

I don't know if there are more options in autonight mode. Some times doesn't start and some times IR-CUT remains active. In general IR-CUT + IR-LED looks better than night mode.

eteixido1 avatar Sep 10 '19 13:09 eteixido1

My auto night mode doesn't work too. I'm using the Mijia v3 2018 with the build 6117b8d

I tried to see the value on the terminal and this is result:

$ autonight -D /dev/jz_adc_aux_0 -v -d 1 Current value: 0.00 Current value: 0.00 Current value: 0.00 Current value: 0.00 Current value: 0.00 Window (5) Avg: 0.00 Night Mode Enabled failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio1/value: nonexistent directory failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio1/value: nonexistent directory failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio0/value: nonexistent directory failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio0/value: nonexistent directory /opt/scripts/nightmode.sh: line 5: can't create /var/run/ircut: Permission denied Bus error WARNING: /opt/scripts/nightmode.sh on returned 35328

Please help me on how to grant permission? Thank you.

andrewwdao avatar Jan 12 '20 15:01 andrewwdao

Also not working on 695670d5977bcb7b77c4fcbadeb9885c08546743 (latest master).

goncalossilva avatar Aug 16 '20 00:08 goncalossilva

Any news about this issue? Is the project alive?

axlerose avatar Sep 25 '20 07:09 axlerose

My auto night mode doesn't work too. I'm using the Mijia v3 2018 with the build 6117b8d

I tried to see the value on the terminal and this is result:

$ autonight -D /dev/jz_adc_aux_0 -v -d 1 Current value: 0.00 Current value: 0.00 Current value: 0.00 Current value: 0.00 Current value: 0.00 Window (5) Avg: 0.00 Night Mode Enabled failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio1/value: nonexistent directory failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio1/value: nonexistent directory failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio0/value: nonexistent directory failed to load /tmp/.nvramcache, Permission denied, nvram_parse /opt/scripts/nightmode.sh: line 5: can't create /sys/class/gpio/gpio0/value: nonexistent directory /opt/scripts/nightmode.sh: line 5: can't create /var/run/ircut: Permission denied Bus error WARNING: /opt/scripts/nightmode.sh on returned 35328

Please help me on how to grant permission? Thank you.

Hi @minhan74!

Did you fixed this? I have the same problem.

Thanks, Américo

americodias avatar Oct 26 '20 00:10 americodias

Hi, I've the same problem.have anyone fix it?

axlerose avatar Oct 26 '20 08:10 axlerose

There is no fix. Xiaomi Mijia 2018 v3 doesn't have a light sensor. I opened it and checked. The only solution here is to use "autonight -S" in "/opt/controlscripts/auto-night-detection" script.

fastiuk avatar Jun 09 '22 02:06 fastiuk