device-mjsxj02hl icon indicating copy to clipboard operation
device-mjsxj02hl copied to clipboard

autonight doesn't work when changing settings

Open danielk117 opened this issue 3 years ago • 10 comments

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.

danielk117 avatar Nov 08 '22 05:11 danielk117

Try it now

kasitoru avatar Nov 08 '22 07:11 kasitoru

No, it stays in day mode.

danielk117 avatar Nov 08 '22 09:11 danielk117

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 avatar Nov 08 '22 10:11 kasitoru

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

kasitoru avatar Nov 08 '22 10:11 kasitoru

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.

danielk117 avatar Nov 08 '22 12:11 danielk117

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

kasitoru avatar Nov 08 '22 12:11 kasitoru

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

danielk117 avatar Nov 08 '22 14:11 danielk117

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://<cam_ip>/metrics)

kasitoru avatar Nov 08 '22 14:11 kasitoru

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.

danielk117 avatar Nov 08 '22 14:11 danielk117

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

kasitoru avatar Nov 08 '22 16:11 kasitoru