anmaped / openfang

The openfang is a bootloader, kernel and toolchain for devices using Ingenic T10 and T20 SOC
GNU General Public License v3.0
184 stars 42 forks source link

[T20L Xiaomi Mijia 2018] Auto Night detection #39

Open lenisko opened 5 years ago

lenisko commented 5 years ago

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?

eteixido1 commented 5 years ago

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 commented 5 years ago

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

eteixido1 commented 4 years ago

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.

andrewwdao commented 4 years ago

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.

goncalossilva commented 4 years ago

Also not working on 695670d5977bcb7b77c4fcbadeb9885c08546743 (latest master).

axlerose commented 3 years ago

Any news about this issue? Is the project alive?

americodias commented 3 years ago

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

axlerose commented 3 years ago

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

fastiuk commented 2 years ago

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.