AllskyTeam / allsky

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

ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) #417

Closed bbillp closed 3 years ago

bbillp commented 3 years ago

Latest ALLSKY 8/10/2021 about 7PM PDT Los Angeles.

Pi 3b+ ZWO ASI178MC

Previous ALLSKY versions worked fine but except a recent version makes the ASI178 run hot

Attached as TEXT Files for the upload here,: config.sh and settings_ZWO.json config.sh.txt settings_ZWO.json.txt

Problem One successful DARK image then ASI_ERROR_TIMEOUT repeats for any image.

In subsequent attempts I tried increasing USB from 40 to 100; autoUSB, reduced photo quality, No luck What next ?

● allsky.service - All Sky Camera Loaded: loaded (/lib/systemd/system/allsky.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2021-08-10 20:01:36 PDT; 11s ago Main PID: 10191 (allsky.sh) CGroup: /system.slice/allsky.service ├─10191 /bin/bash /home/pi/allsky/allsky.sh └─10282 /home/pi/allsky/capture -alwaysshowadvanced 1 -angle -6 -autousb 0 -autowhitebalance 0 -coolerEnabled 0 -darkframe 1 -dayautoexposure 1 -daybin 1 -daybrightness 50 -daydelay 5000 -dayexposure .5 -debuglevel 1 -extratext -extratextage 600 -filename image.jpg -flip 0 -fontcolor 255 255 255 -fontline 1 -fontname 0 -fontsize 7 -fonttype 0 -gaintransitiontime 15 -gamma 50 -height 0 -histogrambox 500 500 50 50 -latitude 33.5N -locale en_US.UTF-8 -longitude 118.1W -nightautoexposure 1 -nightautogain 0 -nightbin 1 -nightbrightness 50 -nightdelay 10 -nightexposure 10000 -nightgain 195 -nightmaxexposure 20000 -nightmaxgain 200 -notificationimages 1 -outlinefont 0 -quality 95 -showBrightness 0 -showExposure 1 -showGain 1 -showHistogram 0 -showTemp 1 -showTime 1 -showhistogrambox 0 -smallfontcolor 0 0 255 -targetTemp 0 -temptype C -text -textlineheight 60 -textx 15 -texty 30 -timeformat %Y%m%d %H:%M:%S -type 99 -usb 90 -wbb 90 -wbr 53 -width 0 -daytime 0 -tty 0

Aug 10 20:01:40 Allsky3B allsky.sh[10191]: Debug Level: 1 Aug 10 20:01:40 Allsky3B allsky.sh[10191]: TTY: 0 (no) Aug 10 20:01:40 Allsky3B allsky.sh[10191]: Aug 10 20:01:40 Allsky3B allsky.sh[10191]: Will NOT adjust gain at transitions Aug 10 20:01:40 Allsky3B allsky.sh[10191]: Stop the allsky service to end this process. Aug 10 20:01:40 Allsky3B allsky.sh[10191]: WARNING: Value of -1 less than min value allowed (32) for control 'Exposure' (#1). Aug 10 20:01:40 Allsky3B allsky.sh[10191]: Taking dark frames... Aug 10 20:01:41 Allsky3B allsky.sh[10191]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Aug 10 20:01:43 Allsky3B allsky.sh[10191]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Aug 10 20:01:46 Allsky3B allsky.sh[10191]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)

maphilli14 commented 3 years ago

Thanks so much @EricClaeys upgrading the GUI did the trick. I would not have thought of any such dependencies!

maphilli14 commented 3 years ago

It works with a 1sec exp but at 2sec (1000ms vs 2000ms) it seems unstable.

n Elevation: -6
Sep  8 23:09:12 allsky allsky.sh[8007]:  Locale: en_US.UTF-8
Sep  8 23:09:12 allsky allsky.sh[8007]:  Notification Images: 1 (yes)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Histogram Box: 500 500 50 50
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Histogram Box: 0 (no)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Histogram Mean: 0 (no)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Time: 1 (yes) (format: %Y%m%d %H:%M:%S)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Details: 0 (no)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Temperature: 1 (yes)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Temperature Type: C
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Exposure: 1 (yes)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Gain: 1 (yes)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Show Brightness: 1 (yes)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Preview: 0 (no)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Darkframe: 0 (no)
Sep  8 23:09:12 allsky allsky.sh[8007]:  Debug Level: 0
Sep  8 23:09:12 allsky allsky.sh[8007]:  TTY: 0 (no)
Sep  8 23:09:12 allsky allsky.sh[8007]: #033[0m
Sep  8 23:09:12 allsky allsky.sh[8007]: Will NOT adjust gain at transitions
Sep  8 23:09:12 allsky allsky.sh[8007]: Stop the allsky service to end this process.
Sep  8 23:09:12 allsky allsky.sh[8007]: ==========
Sep  8 23:09:12 allsky allsky.sh[8007]: === Starting nighttime capture ===
Sep  8 23:09:12 allsky allsky.sh[8007]: ==========
Sep  8 23:09:12 allsky allsky.sh[8007]: Saving auto exposed night images with delay of 10 ms (0 sec)
Sep  8 23:09:14 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:14
Sep  8 23:09:16 allsky allsky.sh[8007]:   > Saving image 'image.jpg' that started at 2021-09-08 23:09:14  (17 µs)
Sep  8 23:09:16 allsky allsky.sh[8007]:   > Sleeping: 1,010 ms
Sep  8 23:09:17 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:17
Sep  8 23:09:20 allsky allsky.sh[8007]:   > Saving image 'image.jpg' that started at 2021-09-08 23:09:17  (21 µs)
Sep  8 23:09:20 allsky allsky.sh[8007]:   > Sleeping: 1,010 ms
Sep  8 23:09:21 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:21
Sep  8 23:09:23 allsky allsky.sh[8007]:   > Saving image 'image.jpg' that started at 2021-09-08 23:09:21  (15 µs)
Sep  8 23:09:23 allsky allsky.sh[8007]:   > Sleeping: 1,010 ms
Sep  8 23:09:24 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:24
Sep  8 23:09:27 allsky allsky.sh[8007]:   > Saving image 'image.jpg' that started at 2021-09-08 23:09:24  (17 µs)
Sep  8 23:09:27 allsky allsky.sh[8007]:   > Sleeping: 1,010 ms
Sep  8 23:09:28 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:28
Sep  8 23:09:31 allsky allsky.sh[8007]:   > Saving image 'image.jpg' that started at 2021-09-08 23:09:28  (15 µs)
Sep  8 23:09:31 allsky allsky.sh[8007]:   > Sleeping: 1,010 ms
Sep  8 23:09:32 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:32
Sep  8 23:09:34 allsky allsky.sh[8007]:   > Saving image 'image.jpg' that started at 2021-09-08 23:09:32  (17 µs)
Sep  8 23:09:34 allsky allsky.sh[8007]:   > Sleeping: 1,010 ms
Sep  8 23:09:35 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:35
Sep  8 23:09:38 allsky allsky.sh[8007]:   > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)
Sep  8 23:09:41 allsky allsky.sh[8007]: STARTING EXPOSURE at: 2021-09-08 23:09:41
Sep  8 23:09:43 allsky allsky.sh[8007]:   > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)
Sep  8 23:09:49 allsky allsky.sh[8007]:      ***** Stopping AllSky *****
Sep  8 23:09:49 allsky allsky.sh[8007]: capture exited with retcode=2
EricClaeys commented 3 years ago

@maphilli14, @mpv1953, try using the attached capture.cpp. Unzip it, copy to ~/allsky, then "cd allsky; make capture" and set the "Version 0.8 exposure to "No" in the GUI, then click "Save changes". @mpv1953, you'll want to set the "newexposure" variable to "0" in settings_ZWO.json then restart the service.

If this doesn't work, do you have a powered USB hub you can try?

capture.zip

mpv1953 commented 3 years ago

Hi Eric: I downloaded, compiled, and ran the provided version of capture.cpp. The "newexposure" variable was already value "0". I'm not running the gui so I don't know how to set the "Version 0.8 exposure" value. (Update: I see from the README that the "newexposure" variable is that setting.) as_210909.zip

I ran the "allsky.sh" script, and the resulting image.jpg just says "Allsky software is not running". I have not yet set up the allsky service, I am running this through ssh before I set up the service. Thanks & Regards, Mike

mpv1953 commented 3 years ago

Hi Eric: This attempt was with the ZWO plugged in through a powered USB hub. End result was no change.

bobhillier99 commented 3 years ago

I have downloaded the latest capture.zip file and am once again getting some success. I can get past the 3 image buffer clearing and start taking images. However, the number of images I can take is variable as shown in the attached log file of 2 successive runs. If it matters, this is with an ASI183 colour camera. I did try using a powered USB 3 hub with no success. FYI - I am able to take images with a small python script I wrote for my focusser so I know the camera and ZWO libraries seem to be working. log.zip log.zip reload the zip file with the json file

EricClaeys commented 3 years ago

@mpv1953, there are no ASI_ERROR_TIMEOUTs in the as_210909b.zip file's log so I'd say the powered hub worked. However, the exposures are jumping all over the place and the mean brightness isn't always correlated with the exposure time, i.e., sometimes decreasing the exposure brightens the image. This is exactly what happened in version 0.7 with autoexposure on during the day, and that we basically fixed in version 0.8, although we didn't test it with small sensors like yours. Try decreasing the size of the histogram box and/or moving it so it's not in the Sun's path. The box is 500x500 centered on the middle of the sensor (50% on each axis) and your sensor is only 1280x960, so the box is taking about half the sensor. Decrease to 200x200. In the GUI's Advanced Options, look at the "histogram" ones. If you check the one to show the histogram box it'll be easier to see what you are doing.

calberts commented 3 years ago

Gents

i Cloned the last git today on my pi but still have the following issue, WARNING: Value of 200 greater than max value allowed (100) for control 'AutoExpMaxGain' (#10). Sep 10 20:34:05 allsky allsky.sh[1146]: WARNING: Value of 50 greater than max value allowed (20) for control 'Offset' (#5). Sep 10 20:34:05 allsky allsky.sh[1146]: ===Taking 3 images to clear buffer... Sep 10 20:34:05 allsky allsky.sh[1146]: > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms Sep 10 20:34:06 allsky allsky.sh[1146]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Sep 10 20:34:08 allsky allsky.sh[1146]: > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms Sep 10 20:34:09 allsky allsky.sh[1146]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Sep 10 20:34:11 allsky allsky.sh[1146]: > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms Sep 10 20:34:11 allsky allsky.sh[1146]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Sep 10 20:34:16 allsky allsky.sh[1146]: Stopping AllSky Sep 10 20:34:16 allsky allsky.sh[1146]: capture exited with retcode=2

my initial setup version 0.6 worked. The version from the git doesn't work. even not with the above-posted catupure.cpp Due to this kind of case, it would be handy to have a history version on this GIT to be able to revert back to older version. I have now no possibility to view the sky from my remote location. Hoop this can be fixed because, it so great program ;-)

Chris

maphilli14 commented 3 years ago

@maphilli14, @mpv1953, try using the attached capture.cpp. Unzip it, copy to ~/allsky, then "cd allsky; make capture" and set the "Version 0.8 exposure to "No" in the GUI, then click "Save changes".

This seems to work well, however I am still stuck at a 1sec exposure, only changing the exp to 2,000ms (2sec) crashes again with ASI timeout.

EricClaeys commented 3 years ago

@calberts, @maphilli14, Please try the attached file. It's the version 0.7 capture.cpp that knows about the new option names (e.g., "daybrightness" instead of "brightness") that were added in version 0.8. It does not use the "Version 0.8 exposure" mode.

Unpack the file, rename the .cpp file to "capture.cpp", put in ~/allsky, then "cd allsky ; make capture" and restart AllSky. It won't give any errors in the log file but you'll know it's working if you get images.

Let me know how it goes.

@maphilli14, are you saying that the version I previously posted works with 1 second exposures but fails with 2 second exposures? Is this during the day, or night, or both?

Eric capture0.7with0.8arguments.zip

EricClaeys commented 3 years ago

@calberts, The messages you're getting about "Value of 200 greater than max value..." are telling you that the associated setting is higher than what the camera supports. For example, your camera supports a "Max Gain" of 100 but you have 200 specified, and your camera supports a max offset 20 but you have 50 specified. These are not fatal errors since the program will use the maximum allowed value instead of what you asked for, but it's a good idea to change the values so you don't get the warning messages. Eric

azapf1972 commented 3 years ago

Gentlemen, sorry for having been silent - I was away from my system for a few days. I just downloaded the v0.7 capture that Eric has provided and compiled it. It seems to work with my ZWO ASI 120 during daytime capture (need to wait for the night to see how that works). So far, so good - I will report on the results tomorrow. Andreas

calberts commented 3 years ago

Eric, Thanks for your support here the same ASI120MM running daytime good with capture0.7with0.8arguments.zip. Let see what brings tonight. I didn't know that I am so dependent on my all-sky in relation to my remote observatory.

EricClaeys commented 3 years ago

@azapf1972, @calberts, just to be clear, so far the capture0.7with0.8arguments.zip works, right, while previous version 0.8 capture.cpp files didn't work? FYI, version 0.7 did almost no error checking, so you won't get any ASI_ERROR_TIMEOUTs or anything else to help debug logs in the log file. Eric

calberts commented 3 years ago

Eric,

So doing the git clone as described in the Readme. I had this time out errors, while with your version no issue at all, It worked the whole night. Compliments. I am happy man, what I told I didn't know that I am so dependent on my all-sky in relation to my remote observatory.

Chris

EricClaeys commented 3 years ago

@azapf1972, did the capture0.7with0.8arguments.zip work for you as well?

@calberts, I'm glad you're up and working again, but am still totally dismayed by what the problem is. The capture.cpp that's currently in GitHub uses the version 0.7 exposure method (same as what you have), but doesn't work for everyone.

calberts commented 3 years ago

Eric, I can't judge what the differences are. I discover today when to enable 0.8 exposers. i had again Time outs hoop this give a little hint. Is it an idea to make a list of camera's with issue and which not. to minimize or see if its related to camera type I use the zwo120mm. This is what the allsky tell me in the log

Listing Attached Cameras: Sep 13 22:12:57 allsky allsky.sh[25347]: - 0 ZWO ASI120MM Sep 13 22:12:57 allsky allsky.sh[25347]: ZWO ASI120MM Information: Sep 13 22:12:57 allsky allsky.sh[25347]: - Resolution:1280x960 Sep 13 22:12:57 allsky allsky.sh[25347]: - Pixel Size: 3.8μm Sep 13 22:12:57 allsky allsky.sh[25347]: - Supported Bin: 1 2 Sep 13 22:12:57 allsky allsky.sh[25347]: - Mono camera Sep 13 22:12:57 allsky allsky.sh[25347]: - SDK version 1, 19, 0, 0 Sep 13 22:12:58 allsky allsky.sh[25347]: - Sensor temperature:40.20

Oja

I burned Friday the last PI image via the raspberry PI imager + my setup is running on PI3B

Chris

EricClaeys commented 3 years ago

@calberts, it doesn't appear to be camera model related. Some people with the 178 have the problem and some don't. Ditto for other cameras. It seems like some have the problem if they stand on their left foot on an even-numbered day, and others if they stand on their right foot when the moon is out :-) What's making this hard for me to test is that my Pi and camera don't have the problem.

EricClaeys commented 3 years ago

@calberts, not sure I understand your last post about discovering when to enable 0.8 exposures. The capture.cpp file you are running is the version 0.7 modified to know about 0.8 argument names; it doesn't know anything about the newer 0.8 exposure mode, so changing the "Version 0.8 Exposure" checkbox in the GUI will have no effect.

What do you mean by "I had again Time outs"? Is that when using the version 0.7 capture.cpp?

ckuethe commented 3 years ago

I'm starting a rumor that allsky performance is improved by imaging through stacked K, Ha, OIII, and SII filters. :trollface:

Anyway, I can repro the problem with my 120 mini and my laptop which is much nicer to develop on than a pi on the roof.

EricClaeys commented 3 years ago

Chris, if you can reproduce the ASI_ERROR_TIMEOUT issue, that's great. I can't so it's hard to debug. If you use the capture.cpp that's currently in GitHub (the 0.8 version with the timeout "fix"), do you get timeouts even with 0.8 exposure mode off? Some people are. If so, can you try the attached version and see if you get timeouts?

Thanks - Eric capture 9-8-2021.zip

ckuethe commented 3 years ago

Right then... using HEAD (currently ``) I can repro the timeouts with 0.8 exposure mode off. And I figured out why. Short version: there's a missing call to ASIStartVideoCapture when new exposure mode is not used.

Now, with your zip file there, I no longer get timeouts (edit) ... while probing. That has nothing to do with the timeouts experienced with heavy bus load which I'm not about to test tonight.

calberts commented 3 years ago

@EricClaeys , I can help let see first if @ckuethe suggestion can be causing the issue. I can set up the test to verify.

Chris

azapf1972 commented 3 years ago

@azapf1972, did the capture0.7with0.8arguments.zip work for you as well?

@calberts, I'm glad you're up and working again, but am still totally dismayed by what the problem is. The capture.cpp that's currently in GitHub uses the version 0.7 exposure method (same as what you have), but doesn't work for everyone.

I can report that the 120 MM was running all night, taking images - that is using the capture0.7with0.8arguments version. So far, so good... Andreas

EricClaeys commented 3 years ago

When the fix to add version 0.7 exposure mode was added, I had a version of capture.cpp with the correct fix and a bunch of other changes. Rather than merge my capture.cpp, a PR with just a few lines was merged to implement the "newexposure" feature. Unfortunately that fix had a couple bugs - one I caught after the fix was merged, and the other @ckuethe found today.

The version of my capture.cpp when the fix was merged is what's in "capture 9-8-2021.zip" and what I gave to several people who were having timeout errors; I believe that version worked for everyone.

mpv1953 commented 3 years ago

Eric: After losing an SD card and playing the rebuild-my-system game, I downloaded the latest git files, and added the updated capture.cpp file in "capture.9-8-2021.zip". It is working. No timeouts or other issues. I'm still trying to get the settings correct for my location and desires, but so far, so good! Thanks, Mike

ckuethe commented 3 years ago

If possible, please stick with what's in git, so that you won't end up with an unsupported configuration in a couple of weeks. We think all the capture timeouts are probably resolved in HEAD

EricClaeys commented 3 years ago

@mpv1953, since my last post we uploaded what we hope is a fix to the timeout issue if you turn the version 0.8 exposure mode off. I'd appreciate it if you'd try that capture.cpp - my camera doesn't get timeouts so it's been hard for me to test. To use the newest GIT capture.cpp, rename your current capture.cpp to capture.9-8-2021.cpp, then copy the GIT capture.cpp to ~/allsky and do a "make capture". Please let me know if that works.

@ckuethe, what is "HEAD"?

ckuethe commented 3 years ago

HEAD is https://docs.github.com/en/get-started/quickstart/github-glossary#head

You don't even need to rename the downloaded cpp, just do git checkout -f capture.cpp && git pull && make capture. That'll restore capture.cpp to an unmodified state according to git, then it'll pull down the most recent code, and finally rebuild the capture program.

bobhillier99 commented 3 years ago

ASI183MC with RPI4 using 500gb SSD I am still getting timeouts with version 8. :( They seem to be less frequent then initially but every minute or so the capture receives timeout and restarts. I have tried every capture.cpp mentioned in this thread. Per the most recent responses, I completely reinstalled allsky from github. I have attached the last two runs of my logfile as well as my jason file. I am using an ASI183 camera. Is anyone else using an ASI183? It's images are large 5496x3672. I am binning 2x2 to reduce image size. (I tried 4x4 but the image is way over exposed and capture histogram doesn't adjust properly.) The last stable version I used was v7. I needed the set autowhitebalance feature of version 8. How can I revert back to version 7? I will then edit and insert the set autowhitebalance line and recompile capture.cpp log.zip

EricClaeys commented 3 years ago

@bobhillier99, just to be clear, you tried the capture.cpp that's currently in Git? The one we updated a few days ago? And you tried capture0.7with0.8arguments.zip ? That's the version 0.7 one that includes checks for the newer version 0.8 argument names. If so, in capture.cpp, look for a line like this: int maxErrors = 2; and change the 2 to 4, then run make capture and restart the service. That will quit after 4 consecutive errors rather than 2. Let me know if that helps.

mpv1953 commented 3 years ago

Hi Eric: Since I had done a recent rebuild of the O/S, I went ahead and deleted the entire "allsky" directory and downloaded it again with "git clone...". I ran the install scripts (allsky and gui) and it's working like a champ. In order to lessen the number of writes on the SD card, I have defined /allsky/images as a softlink to a USB stick. In my case, the problem is resolved. Now... on to the enclosure! Regards, Mike

EricClaeys commented 3 years ago

@mpv1953, that's good to hear; thanks for letting me know. Are you running with 0.8 exposure mode ON or OFF?

bobhillier99 commented 3 years ago

Eric I erased allsky directory and etc/raspap files and started from scratch. Touché! It works! I had only been changing the capture.cpp file and must have gotten some other files out of sync. After the fresh install, there are no more timeouts,auto white balance works but the see-through-cloud feature still doesn't work. 😉 Thanks for your excellent work.

mpv1953 commented 3 years ago

Hi Eric: It's still "Off".

On Sat, Sep 18, 2021 at 9:20 AM EricClaeys @.***> wrote:

@mpv1953 https://github.com/mpv1953, that's good to hear; thanks for letting me know. Are you running with 0.8 exposure mode ON or OFF?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thomasjacquin/allsky/issues/417#issuecomment-922335033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUOE2NDP3QC6WLBHRI5YJLUCS33PANCNFSM5B5NAWRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

EricClaeys commented 3 years ago

@bobhillier99, I am glad it's working for you. Do you have the 0.8 exposure mode on or off? Not sure what could have caused your issues other than capture.cpp.

EricClaeys commented 3 years ago

@bbillp, since you initially created this issue, would you please close it if version 0.8 is working with the 0.8 exposure mode off? It appears that the upload on the 16th fixed the issue. Thanks

bobhillier99 commented 3 years ago

Eric 0.8 exposure mode is off

maphilli14 commented 3 years ago

I tried a fresh download after moving /etc/raspap and ~/allsky with both 0.8 on and off.  Anything other than exp =< 1000 did not work.  I even tried 1100 instead of the usual 2000 or 4000 and only timeouts. Thanks, Mike

EricClaeys commented 3 years ago

@maphilli14, That's really strange. I don't know what exposure length would have to do with anything. Sorry for all the hassle. This same camera with the exact same configuration of the Pi was working on version 0.7?

Please do the following. It should only take a couple minutes:

  1. Stop the service.
  2. Remove the log file (sudo rm -f /var/log/allsky.log).
  3. Increase the "Log Level" in the GUI (or "loglevel" is not using the GUI) to 4.
  4. Restart the service and let it go until it restarts due to timeouts.
  5. Stop the service
  6. Attach (don't copy/paste) the /var/log/allsky.log file.

Thanks.

maphilli14 commented 3 years ago

Sadly it erorrs and doesn’t log, I changed from to 4 then 3:

@.**:~ $ ls -la /var/log/allsky.log

ls: cannot access '/var/log/allsky.log*': No such file or directory

@.***:~ $ df -h /

Filesystem Size Used Avail Use% Mounted on

/dev/root 29G 17G 12G 60% /

@.***:~ $ sudo service allsky status

● allsky.service - All Sky Camera

Loaded: loaded (/lib/systemd/system/allsky.service; enabled; vendor preset: enabled)

Active: inactive (dead) since Mon 2021-09-20 22:14:55 EDT; 44s ago

Process: 2507 ExecStart=/home/pi/allsky/allsky.sh (code=killed, signal=TERM)

Main PID: 2507 (code=killed, signal=TERM)

Sep 20 22:14:31 allsky allsky.sh[2507]: > Exposure set to 1,110,000 us (1,110.00 ms), timeout: 7,220 ms

Sep 20 22:14:38 allsky allsky.sh[2507]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)

Sep 20 22:14:40 allsky allsky.sh[2507]: STARTING EXPOSURE at: 2021-09-20 22:14:40

Sep 20 22:14:40 allsky allsky.sh[2507]: > Exposure set to 1,110,000 us (1,110.00 ms), timeout: 7,220 ms

Sep 20 22:14:47 allsky allsky.sh[2507]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)

Sep 20 22:14:49 allsky systemd[1]: Stopping All Sky Camera...

Sep 20 22:14:49 allsky systemd[1]: allsky.service: Main process exited, code=killed, status=15/TERM

Sep 20 22:14:55 allsky allsky.sh[2507]: Stopping AllSky

Sep 20 22:14:55 allsky systemd[1]: allsky.service: Succeeded.

Sep 20 22:14:55 allsky systemd[1]: Stopped All Sky Camera.

Other things prior to the above testing…

@.***:~ $ ls -la /var/log/allsky.log.

allsky.log.1 allsky.log.2.gz allsky.log.3.gz allsky.log.4.gz

@.***:~ $ ls -la /var/log/allsky.log

ls: cannot access '/var/log/allsky.log': No such file or directory

@.**:~ $ watch ls -la /var/log/allsky.log

@.***:~ $ sudo service allsky stop

@.**:~ $ sudo rm -f /var/log/allsky.log

@.**:~ $ watch ls -la /var/log/allsky.log

@.***:~ $ sudo service allsky restart

@.***:~ $ sudo service allsky start

@.***:~ $ sudo service allsky status

● allsky.service - All Sky Camera

Loaded: loaded (/lib/systemd/system/allsky.service; enabled; vendor preset: enabled)

Active: active (running) since Mon 2021-09-20 22:09:13 EDT; 13s ago

Main PID: 30749 (allsky.sh)

Tasks: 12 (limit: 2059)

CGroup: /system.slice/allsky.service

       ├─30749 /bin/bash /home/pi/allsky/allsky.sh

       ├─30842 /home/pi/allsky/capture -alwaysshowadvanced 1 -angle -6 -autousb 1 -autowhitebalance 0 -coolerEnabled 0 -darkframe

       ├─30983 /bin/bash scripts/saveImageNight.sh

       └─30996 convert image.jpg -resize 100x75 images/20210920/thumbnails/image-20210920220926.jpg

Sep 20 22:09:25 allsky allsky.sh[30749]: > Auto Gain value: 84

Sep 20 22:09:25 allsky allsky.sh[30749]: > Sleeping from auto exposure: 10 ms (0 sec)

Sep 20 22:09:25 allsky allsky.sh[30749]: STARTING EXPOSURE at: 2021-09-20 22:09:25

Sep 20 22:09:25 allsky allsky.sh[30749]: > Exposure set to 1,000,000 us (1,000.00 ms), timeout: 7,000 ms

Sep 20 22:09:26 allsky allsky.sh[30749]: > Got image @ exposure: 1,000,000 us (1,000.00 ms)

Sep 20 22:09:26 allsky allsky.sh[30749]: > Saving image 'image.jpg' that started at 2021-09-20 22:09:25 (6 us)

Sep 20 22:09:26 allsky allsky.sh[30749]: > Auto Gain value: 96

Sep 20 22:09:26 allsky allsky.sh[30749]: > Sleeping from auto exposure: 10 ms (0 sec)

Sep 20 22:09:26 allsky allsky.sh[30749]: STARTING EXPOSURE at: 2021-09-20 22:09:26

Sep 20 22:09:26 allsky allsky.sh[30749]: > Exposure set to 1,000,000 us (1,000.00 ms), timeout: 7,000 ms

@.**:~ $ watch ls -la /var/log/allsky.log

All good, thanks for the efforts!!!

Mike

From: EricClaeys @.> Sent: Monday, September 20, 2021 11:18 AM To: thomasjacquin/allsky @.> Cc: maphilli14 @.>; Mention @.> Subject: Re: [thomasjacquin/allsky] ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) (#417)

@maphilli14 https://github.com/maphilli14 , That's really strange. I don't know what exposure length would have to do with anything. Sorry for all the hassle. This same camera with the exact same configuration of the Pi was working on version 0.7?

Please do the following. It should only take a couple minutes:

  1. Stop the service.
  2. Remove the log file (sudo rm -f /var/log/allsky.log).
  3. Increase the "Log Level" in the GUI (or "loglevel" is not using the GUI) to 4.
  4. Restart the service and let it go until it restarts due to timeouts.
  5. Stop the service
  6. Attach (don't copy/paste) the /var/log/allsky.log file.

Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thomasjacquin/allsky/issues/417#issuecomment-923024171 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOBFOKWTI6ONS4UEPIHHGTUC5GBTANCNFSM5B5NAWRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/ABOBFOKAH6DXPZD7FBZF4LDUC5GBTA5CNFSM5B5NAWR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4CDWKY.gif

bobhillier99 commented 3 years ago

Eric Bad news and great news With 0.8 exposure mode OFF I continue to get ASI_ERROR_TIMEOUT (even after setting maxErrors = 5). With 0.8 exposure mode ON, no more ASI_ERROR_TIMEOUT. Woo Hoo!

I have 2 suggestions (not sure where to post this) 1: line 2045 int minExposure = 100 change to int minExposure = ControlCaps.MinValue reason: my ASI183 is very sensitive. The default 100 is too long and I get overexposure. The minValue of 30 is much better 2: Line 92 should be placed ahead of line 91. If you comment out USE_HISTOGRAM then this line 92 is still needed

ckuethe commented 3 years ago

@bobhillier99 I agree that the defaults are not optimal in all cases, see #468 . We're investigating ways to better determine these by querying the camera instead of hard-coding parameters. Thanks for volunteering to help us test. ;)

And you can file bugs on specific code lines, see https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue

EricClaeys commented 3 years ago

@bobhillier99, I believe you, but it make NO sense that using 0.8 exposure mode would work when not using it didn't, given that it worked fine for you when you had 0.7. I won't look a gift horse in the mouth though...

The ASI183 has a MinValue of 32 for exposure, not 30. You should see this in /var/log/allsky.log if you set debuglevel to 3 or 4:

- Exposure:
   - MinValue = 32
   - MaxValue = 2,000,000,000
   - DefaultValue = 10,000
   - IsAutoSupported = 1
   - IsWritable = 1
   - ControlType = 1

Either way, your suggestion to change 100 to the camera's min value is good.

bobhillier99 commented 3 years ago

@EricClaeys oops, you are correct, the minvalue was 32. I misread the image text that said .03 ms. I actually assigned using the camera's reported min value. Back to ASI_ERROR_TIMEOUT.... (and my early career as a software QA tester in the 1980s). I instrumented the code a tiny bit to use an ASI_ERROR_TIMEOUT counter (and report if Exposure version 0.8 was ON or OFF). I appended this with the ASI_ERROR_TIMEOUT text that was printed in the log. I do not believe this materially affected the performance of capture.cpp. I ran the camera for two 1 hour trials. One with exposure v0.8 OFF and one with it ON. The respective log files are attached. With exposure v0.8 OFF, I recorded 125 ASI_ERROR_TIMEOUTs and 5 camera resets. I stopped the 6th cycle at the 1hr mark, With exposure v0.8 ON, I recorded 1 ASI_ERROR_TIMEOUT and no camera resets. I know you've provided direction to turn v0.8 off if ASI_ERROR_TIMEOUTs are occurring however, it would seem the use of v.08 may reduce ASI_ERROR_TIMEOUTs, at least on my RPi 4 and ASI183 it does. Very odd. Let me know if you have other suggestions how I can investigate further. For now, I will run with v0.8 ON.

log_v_0_8_NO_1hr.log

log_v_0_8_YES_1hr.log

linuxkidd commented 3 years ago

Just another data point in this troubleshooting effort.

Tests performed:

  1. Installed fresh Raspberry Pi OS lite
  2. Only installed GIT, then cloned the repo and ran the install.sh script ( 2021-09-21 )
    • Capture runs perfectly with no TIMEOUT in either 0.7 or 0.8 exposure mode.
  3. Ran apt update && apt -y full-upgrade, then rebooted
    • Capture runs perfectly with no TIMEOUT in either 0.7 or 0.8 exposure mode.
  4. Deleted / re-compiled capture
    • Capture runs perfectly with no TIMEOUT in either 0.7 or 0.8 exposure mode.
  5. Upgraded to Bullseye by:
    • changing all buster references to bullseye in /etc/apt/sources.list and /etc/apt/sources.list.d/* files
    • ran apt update && apt -y install gcc-8-base && apt -y dist-upgrade (the gcc-8-base install was needed to overcome a dependency error).
    • Cleaned up unneeded packages: apt -y autoremove
    • Re-installed too-aggressively removed packages: apt -y install libopencv-dev libusb-dev libusb-1.0-0-dev ffmpeg gawk lftp jq imagemagick
    • Failed due to missing older OpenCV lib
      Sep 23 11:40:15 allsky allsky.sh[9836]: /home/pi/allsky/capture: error while loading shared libraries: libopencv_aruco.so.3.2: cannot open shared object file: No such file or directory
      Sep 23 11:40:15 allsky systemd[1]: allsky.service: Main process exited, code=exited, status=127/n/a
      Sep 23 11:40:15 allsky allsky.sh[9736]: capture exited with retcode=127
  6. Recompiled on Bullseye
    • Recompile failed due to missing older OpenCV dependencies
      
      root@allsky:/home/pi/allsky# make capture
      Package opencv was not found in the pkg-config search path.
      Perhaps you should add the directory containing `opencv.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'opencv' found
      Package opencv was not found in the pkg-config search path.
      Perhaps you should add the directory containing `opencv.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'opencv' found
      arm-linux-gnueabihf-g++  capture.cpp -o capture -Wall -Wno-psabi -g -O2 -lpthread -march=armv7 -mthumb -D_LIN -D_DEBUG -DGLIBC_20 -Llib/armv7 -I./include   -lASICamera2 -I/usr/include/libusb-1.0 -lusb-1.0
      capture.cpp:8:10: fatal error: opencv2/core/core.hpp: No such file or directory
      8 | #include <opencv2/core/core.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      make: *** [Makefile:58: capture] Error 1

root@allsky:/home/pi/allsky# dpkg -l | grep -i opencv ii libopencv-calib3d-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-calib3d4.5 ii libopencv-calib3d4.5:armhf 4.5.1+dfsg-5 armhf computer vision Camera Calibration library ii libopencv-contrib-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-contrib4.5 ii libopencv-contrib4.5:armhf 4.5.1+dfsg-5 armhf computer vision contrlib library ii libopencv-core-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-core4.5 ii libopencv-core4.5:armhf 4.5.1+dfsg-5 armhf computer vision core library ii libopencv-dev 4.5.1+dfsg-5 armhf development files for opencv ii libopencv-dnn-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-dnn4.5 ii libopencv-dnn4.5:armhf 4.5.1+dfsg-5 armhf computer vision Deep neural network module ii libopencv-features2d-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-features2d4.5 ii libopencv-features2d4.5:armhf 4.5.1+dfsg-5 armhf computer vision Feature Detection and Descriptor Extraction library ii libopencv-flann-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-flann4.5 ii libopencv-flann4.5:armhf 4.5.1+dfsg-5 armhf computer vision Clustering and Search in Multi-Dimensional spaces library ii libopencv-highgui-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-highgui4.5 ii libopencv-highgui4.5:armhf 4.5.1+dfsg-5 armhf computer vision High-level GUI and Media I/O library ii libopencv-imgcodecs-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-imgcodecs4.5 ii libopencv-imgcodecs4.5:armhf 4.5.1+dfsg-5 armhf computer vision Image Codecs library ii libopencv-imgproc-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-imgproc4.5 ii libopencv-imgproc4.5:armhf 4.5.1+dfsg-5 armhf computer vision Image Processing library ii libopencv-ml-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-ml4.5 ii libopencv-ml4.5:armhf 4.5.1+dfsg-5 armhf computer vision Machine Learning library ii libopencv-objdetect-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-objdetect4.5 ii libopencv-objdetect4.5:armhf 4.5.1+dfsg-5 armhf computer vision Object Detection library ii libopencv-photo-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-photo4.5 ii libopencv-photo4.5:armhf 4.5.1+dfsg-5 armhf computer vision computational photography library ii libopencv-shape-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-shape4.5 ii libopencv-shape4.5:armhf 4.5.1+dfsg-5 armhf computer vision shape descriptors and matchers library ii libopencv-stitching-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-stitching4.5 ii libopencv-stitching4.5:armhf 4.5.1+dfsg-5 armhf computer vision image stitching library ii libopencv-superres-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-superres4.5 ii libopencv-superres4.5:armhf 4.5.1+dfsg-5 armhf computer vision Super Resolution library ii libopencv-video-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-video4.5 ii libopencv-video4.5:armhf 4.5.1+dfsg-5 armhf computer vision Video analysis library ii libopencv-videoio-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-videoio4.5 ii libopencv-videoio4.5:armhf 4.5.1+dfsg-5 armhf computer vision Video I/O library ii libopencv-videostab-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-videostab4.5 ii libopencv-videostab4.5:armhf 4.5.1+dfsg-5 armhf computer vision video stabilization library ii libopencv-viz-dev:armhf 4.5.1+dfsg-5 armhf development files for libopencv-viz4.5 ii libopencv-viz4.5:armhf 4.5.1+dfsg-5 armhf computer vision 3D data visualization library ii libopencv4.5-java 4.5.1+dfsg-5 armhf Java bindings for the computer vision library ii libopencv4.5-jni 4.5.1+dfsg-5 armhf Java jni library for the computer vision library ii opencv-data 4.5.1+dfsg-5 all development data for opencv


7. Modified `Makefile` to spec `opencv4` for `armv7l`, then attempted re-compile:

root@allsky:/home/pi/allsky# make arm-linux-gnueabihf-g++ capture.cpp -o capture -Wall -Wno-psabi -g -O2 -lpthread -march=armv7 -mthumb -D_LIN -D_DEBUG -DGLIBC_20 -Llib/armv7 -I./include -I/usr/include/opencv4 -lopencv_stitching -lopencv_alphamat -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_shape -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_ml -lopencv_videostab -lopencv_videoio -lopencv_viz -lopencv_ximgproc -lopencv_video -lopencv_dnn -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core -lASICamera2 -I/usr/include/libusb-1.0 -lusb-1.0 capture.cpp: In function ‘void cvText(cv::Mat&, const char, int, int, double, int, int, int, int, int, int)’: capture.cpp:180:36: error: ‘cvPoint’ was not declared in this scope 180 | cv::putText(img, text, cvPoint(x, y), fontname, fontsize, cvScalar(0,0,0), linewidth+4, linetype); | ^~~ capture.cpp:180:71: error: ‘cvScalar’ was not declared in this scope 180 | cv::putText(img, text, cvPoint(x, y), fontname, fontsize, cvScalar(0,0,0), linewidth+4, linetype); | ^~~~ capture.cpp:181:32: error: ‘cvPoint’ was not declared in this scope 181 | cv::putText(img, text, cvPoint(x, y), fontname, fontsize, fontcolor16, linewidth, linetype); | ^~~ capture.cpp:186:36: error: ‘cvPoint’ was not declared in this scope 186 | cv::putText(img, text, cvPoint(x, y), fontname, fontsize, cvScalar(0,0,0, 255), linewidth+4, linetype); | ^~~ capture.cpp:186:71: error: ‘cvScalar’ was not declared in this scope 186 | cv::putText(img, text, cvPoint(x, y), fontname, fontsize, cvScalar(0,0,0, 255), linewidth+4, linetype); | ^~~~ capture.cpp:187:32: error: ‘cvPoint’ was not declared in this scope 187 | cv::putText(img, text, cvPoint(x, y), fontname, fontsize, | ^~~ capture.cpp:188:21: error: ‘cvScalar’ was not declared in this scope 188 | cvScalar(fontcolor[0], fontcolor[1], fontcolor[2], 255), linewidth, linetype); | ^~~~ capture.cpp: In function ‘double timeDiff(int64, int64)’: capture.cpp:216:21: error: ‘cvGetTickFrequency’ was not declared in this scope 216 | double frequency = cvGetTickFrequency(); | ^~~~~~ capture.cpp: In function ‘void Display(void)’: capture.cpp:240:5: error: ‘cvNamedWindow’ was not declared in this scope 240 | cvNamedWindow("video", 1); | ^~~~~ capture.cpp:243:9: error: ‘cvShowImage’ was not declared in this scope 243 | cvShowImage("video", pImg); | ^~~ capture.cpp:244:9: error: ‘cvWaitKey’ was not declared in this scope 244 | cvWaitKey(100); | ^~~~~ capture.cpp:246:5: error: ‘cvDestroyWindow’ was not declared in this scope 246 | cvDestroyWindow("video"); | ^~~~~~~ capture.cpp: In function ‘int main(int, char**)’: capture.cpp:791:9: error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope 791 | CV_FONT_HERSHEY_SIMPLEX, CV_FONT_HERSHEY_PLAIN, CV_FONT_HERSHEY_DUPLEX, | ^~~~~~~ capture.cpp:791:41: error: ‘CV_FONT_HERSHEY_PLAIN’ was not declared in this scope 791 | CV_FONT_HERSHEY_SIMPLEX, CV_FONT_HERSHEY_PLAIN, CV_FONT_HERSHEY_DUPLEX, | ^~~~~ capture.cpp:791:72: error: ‘CV_FONT_HERSHEY_DUPLEX’ was not declared in this scope 791 | CV_FONT_HERSHEY_SIMPLEX, CV_FONT_HERSHEY_PLAIN, CV_FONT_HERSHEY_DUPLEX, | ^~~~~~ capture.cpp:792:9: error: ‘CV_FONT_HERSHEY_COMPLEX’ was not declared in this scope 792 | CV_FONT_HERSHEY_COMPLEX, CV_FONT_HERSHEY_TRIPLEX, CV_FONT_HERSHEY_COMPLEX_SMALL, | ^~~~~~~ capture.cpp:792:41: error: ‘CV_FONT_HERSHEY_TRIPLEX’ was not declared in this scope 792 | CV_FONT_HERSHEY_COMPLEX, CV_FONT_HERSHEY_TRIPLEX, CV_FONT_HERSHEY_COMPLEX_SMALL, | ^~~~~~~ capture.cpp:792:72: error: ‘CV_FONT_HERSHEY_COMPLEX_SMALL’ was not declared in this scope 792 | CV_FONT_HERSHEY_COMPLEX, CV_FONT_HERSHEY_TRIPLEX, CV_FONT_HERSHEY_COMPLEX_SMALL, | ^~~~~~~~~ capture.cpp:793:9: error: ‘CV_FONT_HERSHEY_SCRIPT_SIMPLEX’ was not declared in this scope 793 | CV_FONT_HERSHEY_SCRIPT_SIMPLEX, CV_FONT_HERSHEY_SCRIPT_COMPLEX }; | ^~~~~~~~~~ capture.cpp:793:41: error: ‘CV_FONT_HERSHEY_SCRIPT_COMPLEX’ was not declared in this scope 793 | CV_FONT_HERSHEY_SCRIPT_SIMPLEX, CV_FONT_HERSHEY_SCRIPT_COMPLEX }; | ^~~~~~~~~~ capture.cpp:841:36: error: ‘CV_AA’ was not declared in this scope 841 | int linetype[3] = { CV_AA, 8, 4 }; | ^~~~~ capture.cpp:1413:42: error: ‘CV_IMWRITE_JPEG_QUALITY’ was not declared in this scope 1413 | compression_parameters.push_back(CV_IMWRITE_JPEG_QUALITY); | ^~~~~~~ capture.cpp:1425:42: error: ‘CV_IMWRITE_PNG_COMPRESSION’ was not declared in this scope 1425 | compression_parameters.push_back(CV_IMWRITE_PNG_COMPRESSION); | ^~~~~~ capture.cpp:1937:25: error: ‘cvSize’ was not declared in this scope 1937 | pRgb.create(cvSize(width, height), CV_16UC1); | ^~ capture.cpp:1941:25: error: ‘cvSize’ was not declared in this scope 1941 | pRgb.create(cvSize(width, height), CV_8UC3); | ^~ capture.cpp:1945:25: error: ‘cvSize’ was not declared in this scope 1945 | pRgb.create(cvSize(width, height), CV_8UC1); | ^~ capture.cpp:2330:12: error: ‘cvPoint’ was not declared in this scope 2330 | from1 = cvPoint(X1, Y1); | ^~~ capture.cpp:2334:52: error: ‘cvScalar’ was not declared in this scope 2334 | cv::line(pRgb, from1, to1, cvScalar(0,0,0), thickness, lt); | ^~~~ capture.cpp:2448:32: error: ‘cvGetTickCount’ was not declared in this scope 2448 | int64 st = cvGetTickCount(); | ^~~~~~ make: *** [Makefile:58: capture] Error 1


8.  Updated all the opencv2 calls to opencv4 calls in [linuxkidd/allsky/tree/opencv4_bullseye](https://github.com/linuxkidd/allsky/tree/opencv4_bullseye), then compiled:
   - Everything works fine again.

### Conclusion:
- With a fresh load of Buster, with/without updates, or Bullseye (after updating `OpenCV4` specific things), I no longer get any USB timeouts with the exact same hardware.
- If I'm being honest, I really expected that some update would break it again... Pleasantly surprised that is not the case.
EricClaeys commented 3 years ago

@bobhillier99, you're special. You are the only one who has a camera that works with the 0.8 exposure but fails with the 0.7. I can't explain it, although I can't explain why ANYONE is getting the timeouts, and so far, neither can ZWO. Running with 0.8 ON is ideal, since it decreases the temperature of your camera, often by a fair amount.

Anyway, thanks much for your detective work. Could you please paste the code that you changed to count the number of errors? It's a good idea so I'll add it to the next capture.cpp.

If you get a chance, would you please try the attached file? It's the 0.7 version of capture that knows about the new 0.8 names (e.g, "nightgain" versus "gain"), and with a function to display error names rather than numbers. I suspect you'll get about 125 errors again. At the end of the hour, would you please check the sensor temp, then when you go back to the 0.8 version, check the sensor temp after an hour. Those of us who developed 0.8 saw a 10-15 C decrease in temp. with our ASI178M[CM] cameras. I'm curious what other people see.

capture0.7with0.8arguments.zip

ckuethe commented 3 years ago

re point 8, it looks like you didn't add -DOPENCV_C_HEADERS like the x86_64 section does.

linuxkidd commented 3 years ago

re point 8, it looks like you didn't add -DOPENCV_C_HEADERS like the x86_64 section does.

Dang, eagle eyes! I fixed it now... and, happy to report it still works fine. :)

I did omit the actual display function of the code.. I spent a bit of time looking into how to implement it in OpenCV4, but came up empty on execution. I don't use it, so it wasn't high priority for my hacking around.

EricClaeys commented 3 years ago

@linuxkidd Michael, anything we should change in the master software based on your test?