OpenIPC / device-mjsxj02hl

OpenIPC for Xiaomi MJSXJ02HL
https://openipc.org
MIT License
62 stars 11 forks source link

autonight doesn't work when changing settings #2

Open danielk117 opened 1 year ago

danielk117 commented 1 year ago

the autonight script doesn't seems to work right, when changing a setting and majestic restarts. it stays in day mode, but the cam was in a dark room.

kasitoru commented 1 year ago

Try it now

danielk117 commented 1 year ago

No, it stays in day mode.

kasitoru commented 1 year ago

Execute in:

/etc/init.d/S96autonight stop
/usr/sbin/autonight.sh

And without closing the console, perform the actions that lead to the problem. Post the output here.

kasitoru commented 1 year ago

Also test this https://t.me/mjsxj02hl_firmware/5706

danielk117 commented 1 year ago

Execute in:

/etc/init.d/S96autonight stop
/usr/sbin/autonight.sh

And without closing the console, perform the actions that lead to the problem. Post the output here.

Stopped service. Running script directly. Change a setting in majestic using web UI. Nothings happens, no output on console.

~# /usr/sbin/autonight.sh
....................
Watching at isp_again > 14000 to enable night mode
Watching at isp_again < 2000 to disable night mode
Polling interval: 5 sec
....................

Also test this https://t.me/mjsxj02hl_firmware/5706

Following your instruction, IR light and filter stays on, when majestic was killed. When restarting majestic, both is reseted.

kasitoru commented 1 year ago

Following your instruction, IR light and filter stays on, when majestic was killed. When restarting majestic, both is reseted.

Picture is grayscale after restarting majestic? What is the value night_enabled in output http://<cam_ip>/metrics

danielk117 commented 1 year ago

No, pictures is colored after restarting majestic. Value of night_enabled is 0.

kasitoru commented 1 year ago

Very strange. My camera has a completely different behavior. Let's compare actions:

  1. /etc/init.d/S96autonight stop
  2. Manually turn on night mode (Web interface -> Preview -> Push "Toggle night mode" button)
  3. killall -1 majestic (argument -1 is important)
  4. View picture color and night_enabled value (http:///metrics)
danielk117 commented 1 year ago

3. killall -1 majestic (argument -1 is important)

you're right. i was using killall majestic and restarted it manually. discribed your way, I'am getting a colored picture but night_enabled value is 1.

kasitoru commented 1 year ago

This is probably a bug in majestic https://github.com/OpenIPC/majestic/issues/84