AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.15k stars 180 forks source link

Camera settings not updating #43

Closed rankinstudio closed 5 years ago

rankinstudio commented 5 years ago

Hey man, love the new features.

I installed the GUI option. Everything seems to be working, but the camera won't actually change exposure settings.

No matter what settings I choose, the gain is always 0 and the exposure is always .064ms.

Any ideas on this?

RP3 with ASI120MM

Thanks!

thomasjacquin commented 5 years ago

Hey David, What do you have in config.json for the variable CAMERA_SETTINGS? I should be pointing at /var/www/html/settings.json Can you also show me the content of /var/www/html/settings.json or just a screenshot of the settings page on the GUI. Thanks

rankinstudio commented 5 years ago

Hey Thomas,

The CAMERA_SETTINGS is pointing at that file

I went through and verified that when I make changes in the GUI the /var/www/html/settings.json is updating correctly. For some reason these changes just don't seem to be actually affecting the camera in any way.

/var/www/html/settings.json contents:

{"width":"0","height":"0","exposure":"10000","maxexposure":"20000","autoexposure":"1","gain":"50","maxgain":"200","autogain":"1","gamma":"50","brightness":"50","wbr":"53","wbb":"90","bin":"1","delay":"3000","daytimeDelay":"1000","type":"1","quality":"95","usb":"40","filename":"rankin.jpg","flip":"0","text":"","textx":"15","texty":"35","fontname":"0","fontcolor":"255 255 255","fonttype":"0","fontsize":"1","fontline":"1","latitude":"37.0N","longitude":"111.66W","angle":"-6","time":"1","darkframe":"0","showDetails":"1"}

thomasjacquin commented 5 years ago

Can you try to reboot the Pi? Alternatively, can you try sudo service allsky restart ? Also, just to be sure, make sure that the allsky entry got deleted in /home/pi/.config/lxsession/LXDE-pi/autostart

thomasjacquin commented 5 years ago

I see you have autoexposure and autogain set both to 1. For some reason, the ZWO library doesn't seem to handle it very well and throws random results (black image sometimes but not always).

rankinstudio commented 5 years ago

The issues seem to only happen in daytime mode. I'll have to wait until tomorrow to troubleshoot more. Thanks Thomas!

thomasjacquin commented 5 years ago

Ha! Let me save you some debugging trouble here: Daytime is set to always use autoexposure (deals with clouds, sun, shade, sunrise, sunset better than fixed exposure) and gain=0. When night time begins, it uses the settings you specified in the Camera settings tab of the GUI. Night times is controlled by the angle of the sun below the horizon (default -6 degrees). You can change it to start capturing earlier or later.

rankinstudio commented 5 years ago

Hey Thomas, The issue is that my daytime images are under-exposing, especially with cloud cover. Is there a way to get the daytime gain higher?

rankinstudio commented 5 years ago

Also looks like this ASi120MM is still producing scrambled images on short exposures. No work around found for this yet either? Been an issue for years.

http://www.rankinstudio.com/dnloads/Scramble.JPG

thomasjacquin commented 5 years ago

For the gain, you could edit line 651 in capture.cpp and replace 0 by something else... 50 for example. Save the file and run make capture to recompile the binary and sudo service allsky restart to restart the service.

The problem with scrambled images is on ZWO's side. They seem to have issues with USB 2 cameras. I think that's why they don't support them with ASI Air. Did you upgrade the camera firmware?

rankinstudio commented 5 years ago

Okay, thanks on the gain tip. I'll give that a shot.

I did update to the latest compatible firmware, no changes. I guess I'll just get a 224 Color.

Cheers!

rankinstudio commented 5 years ago

Fireballs I've caught since launching this thing: http://www.rankinstudio.com/Fireball_Detections

thomasjacquin commented 5 years ago

Wow, that one from November 11th of last year was a pretty big one.

rankinstudio commented 5 years ago

Yeah, that's the largest one I've caught to date.

scubabri commented 5 years ago

what exposure times are you using?

On Sun, Oct 7, 2018 at 12:24 PM -0600, "rankinstudio" notifications@github.com<mailto:notifications@github.com> wrote:

Yeah, that's the largest one I've caught to date.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/thomasjacquin/allsky/issues/43#issuecomment-427675205, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJs8j9UbI0-ranr5m2_twWCUEh8RImWmks5uikbrgaJpZM4XLmku.

rankinstudio commented 5 years ago

8 sec with the stock lens.

Just hosed my ASI120MM usb2 after attempting another FW update. Ordered the ASI120MC-S.

rankinstudio commented 5 years ago

Yeah, I don't get it. Just got a brand new ASI120MC-S. Fresh install of allsky. Daytime images are still coming in way under exposed.

rankinstudio commented 5 years ago

It starts out over exposed, then I can see it bracket down until it thinks it's okay? The exposure is way too dark though.

rankinstudio commented 5 years ago

Its definitely the auto exposure failing, when I set a manual exposure and gain and set the altitude to override daytime. It works fine.

rankinstudio commented 5 years ago

This is also strange. I had auto exposure enabled when it switched to nighttime mode, and it started to auto expose correctly before the sun was all the way down. Must be a bug with the daytime mode auto exposure code?

scubabri commented 5 years ago

Most of the time I have to reboot after nightfall to get auto exposure to correct for night time otherwise all the images are black. Once I reboot, it takes a few subs to get a correct exposure and then its good until the next night.

[cid:image001.png@01D4619A.2C0A08E0]

Somewhat annoying if I forget.

From: rankinstudio notifications@github.com Reply-To: thomasjacquin/allsky reply@reply.github.com Date: Thursday, October 11, 2018 at 7:30 PM To: thomasjacquin/allsky allsky@noreply.github.com Cc: BRIAN SHEETS scubabri@gmail.com, Comment comment@noreply.github.com Subject: Re: [thomasjacquin/allsky] Camera settings not updating (#43)

This is also strange. I had auto exposure enabled when it switched to nighttime mode, and it start to auto expose correctly. Must be a bug with the daytime mode auto exposure code?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/thomasjacquin/allsky/issues/43#issuecomment-429174024, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJs8j_e1_Ws-LtzPg0nAN143xy89vyTYks5uj_CagaJpZM4XLmku.

thomasjacquin commented 5 years ago

Hey David, can you post a picture of daytime for reference? Also, are you using autoexposure as well as autogain? Theses 2 options don't seem to play together very well. I assume this is an issue on the ZWO libraries regarding which option gets precedence. I will review the daytime loop code to see if there could be a bug in it. FYI, on my allsky, daytime exposure seems correct; a bit dark when it's cloudy but properly exposed on blue sky. Thomas

thomasjacquin commented 5 years ago

Brian, I experienced the same thing when I used auto-exposure and auto-gain at the same time. Do you have both enabled by any chance? On mine, I don't use auto gain, I just set the gain somewhere around 250 and enable auto-exposure. It gives good results from dawn to dusk. Thomas

scubabri commented 5 years ago

I ended up figuring that out. Now I just need to combat dew. ☺

From: Thomas Jacquin notifications@github.com Reply-To: thomasjacquin/allsky reply@reply.github.com Date: Friday, October 12, 2018 at 12:15 AM To: thomasjacquin/allsky allsky@noreply.github.com Cc: BRIAN SHEETS scubabri@gmail.com, Comment comment@noreply.github.com Subject: Re: [thomasjacquin/allsky] Camera settings not updating (#43)

Brian, I experienced the same thing when I used auto-exposure and auto-gain at the same time. Do you have both enabled by any chance? On mine, I don't use auto gain, I just set the gain somewhere around 250 and enable auto-exposure. It gives good results from dawn to dusk. Thomas

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/thomasjacquin/allsky/issues/43#issuecomment-429215981, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJs8j1oRKStBo7WpV1NZaFURQheo_QeQks5ukDNrgaJpZM4XLmku.

rankinstudio commented 5 years ago

Thomas, when I say under exposed, I mean almost black. It is completely under exposed. It was that way just a few minutes ago. I changed the settings to 50 deg above horizon for recording to force capture during daytime (put it into nighttime mode) and it works perfectly with auto exposure on, and auto gain off. http://rankinstudio.com/dnloads/morning.JPG. There has to be a bug. When night mode is off, the camera only takes .0064ms exposures at gain 0. It doesn't change the exposure time at all.

thomasjacquin commented 5 years ago

Hmm, well that's really strange. Can you post your /var/www/html/settings.json? I'll use your settings and see what happens on my side.

rankinstudio commented 5 years ago

Okay, I think this is resolved. I had auto exposure off, assuming it would kick on during the day? It seems if I just leave auto exposure on, things are okay. Cheers!

thomasjacquin commented 5 years ago

Glad to hear that. It SHOULD kick off during the day regardless of the auto-exposure setting. If it doesn't then it's a bug. I'll take a look at it. Thanks for reporting it.