thomasjacquin/allsky

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

bbillp opened this issue · 174 comments

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)

Same error here with the latest version and GUI using a ZWO AI385MC.

Setting "Auto USB bandwidth" back to No and "USB bandwidth" to 80 solved the problem

I tried USBAUTO no and 90 for the bandwidth, no luck. Also USBAUTO on , no luck.
I also set jpg quality very low to reduce the image size , no luck.

What else can I try ?

Neither got luck, wathever value i put on bandwidth..
No idea..

Also a 178mc owner.

With previous version I had to lower quality (png) to 7 and had to plug into a USB2 port.
All this to lower amount of corrupted images and reduce "reset SuperSpeed Gen 1 USB device number X using xhci_hcd" errors.

With the new version of allsky, encountered the timeout error no matter what setting.
I had to use to USB3 plug, but 4/5 images fail (image already saving) after "reset SuperSpeed Gen 1 USB device number X using xhci_hcd" error.

Got the same problem on my Pi Zero which was installed two days ago. I tired with both 120mc and 178mc.. didn't work..

This isn't good. During testing we eliminated the problem by setting USB Bandwidth high. One person has it at 100 with the camera the only thing on the USB 3 bus. Another has it at 75. I have 80 and auto-usb. One of us had to move the camera to the USB port.
Only one of you resolved the problem by using "auto" no, and "USB Bandwidth" of 80. Can other people try a different USB port? And continue trying different combinations of "Auto USB" and "USB Bandwidth "?
I have a feeling there may be a Pi USB driver issue, since we see the reset errors as well.

bbillp, would you please set your Debug Level to 3 then restart allsky and upload the log? The WARNING you got implies the exposure time was set to -1. Thanks.

"would you please set your Debug Level to 3"
Where is this done?
Thanks
Brad

bbillp,
If you have auto-exposure turned on, then the corresponding "exposure" setting is used as a staring point.
For example, if nighttime "Auto-Exposure" is turned on, then the nighttime "Manual Exposure" setting is used as a starting point if the program is started at night. However, when the program has been running during the day and nighttime comes, it will use the last daytime exposure as a starting point for night, adjusting the gain if "Gain Transition Time" is greater than 0. This is done to avoid abrupt changes in brightness between day and night.

In version 0.7, the nighttime exposure setting was called "Exposure".

I have my nighttime "Manual Exposure" set to 45 since when it's fully dark, the camera takes 60 second auto-exposures.
Does this help?

Brad,
If you are running the newest GUI, go to the "Camera Settings" page and at the bottom, click on the "Show Advanced Options" button, then change the "Debug Level" option. We figured most people wouldn't use that option, so we hide it by default as an advanced option.
If you are NOT using the GUI (and I highly suggest you do), then edit the settings_ZWO.json file (I think that's what it's called), looking for the "debuglevel" setting.

I am using the GUI, but nothing shows up for the RPIiHQ Advanced Options looks to be only for the ZWO. Advanced Options is there, but nothing is added to the GUI when turned on. I added it to the settigs_RPiHQ.json file but not sure it's an option.

Brad,
Debug level is in capture_RPiHQ.cpp, but I failed to put it in the settings file. Ooops.
You can get it by adding the following lines to the camera_options_RPiHQ.json file (probably in /etc/raspap):

{
"name":"debuglevel",
"default":"0",
"description":"Debug level, 0 is lowest level.",
"label":"Debug Level",
"type":"select",
"options": [
	{"value": "0", "label": "0"},
	{"value": "1", "label": "1"},
	{"value": "2", "label": "2"},
	{"value": "3", "label": "3"}
],
"advanced":1
},

I just submitted an update for this to Thomas. Thanks for pointing it out.

@EricClaeys Did you send me a pull request for this?

@thomasjacquin Yes. I submitted 15 pull requests last night. Each was in its own branch.
5 pulls for allsky-portal and 10 for allsky.

@EricClaeys Weird, I'm not seeing them on the GitHub page and I didn't get any notification.

Here's a screenshot showing some of them. Could be my lack of GitHub knowledge and I did it incorrectly, but I created separate branches for each one, per your suggestion.

EricPulls

When I click on one of the pulls I get a page similar to this. I did NOT do anything with the "Merge pull request" - should I ?

EricPullsMerge

@EricClaeys I think it's because you submitted a PR onto your own fork of my repository. Let me see if I can bring them over.

When I try to submit on yours, it tells me I don't have write permission, so I don't try.

snip “bbillp, would you please set your Debug Level to 3 then restart allsky and upload the log? The WARNING you got implies the exposure time was set to -1. Thanks.”

V0.8 with debug = 3 , create dark images, one dark file created and the image folder 20210814 was created then saved sudo service allsky status to status.txt Attached are the files for config.sh, settings_ZWO.json, status.txt, log.txt . I was expecting to see a lot of info from debug level 3 in log.txt but there isn't .
.
config.sh.txt
log.txt
settings_ZWO.json.txt
status.txt

Are Erics updates ready to download and update 0.8 on the Pi ?

Bill, my updates aren't there yet. I'm having some problems with GitHub which is making it difficult to merge my changes into Thomas' master.

Bill, sorry, I wasn't clear. Post the /var/log/allsky.log file. Maybe first stop the service, remove or truncate the file, then start the service and let it go a while, then upload allsky.log. That way it will only contain the most recent data, which makes it easier to look at.
The log.txt file basically contains the arguments to allsky.sh and one entry for each picture taken. It isn't very useful.
Eric

Bill, try the attached capture.cpp file - it should fix the -1 exposure for dark frames.

capture.zip

Same problem for me. I use a ZWO ASI120MC Cam. Worked with older version of allsky.
Raspberry PI 3 B+
Tried different USB-Settings or CAM-Modes (RAW...) No luck.

allsky.log

exhausting, i went thru all that time to generate and post debug 3. I think I’ll wait and use 0.7 , the only issue with 0.7 is a warmer than normal camera.

Manfred,
If you're willing, in capture.cpp, please look for the line with ASI_HIGH_SPEED_MODE in it, then try two things:

  1. Put "//" (without quotes) at the beginning of the line, save the file, run "make capture" from the /home/pi/allsky directory, and restart allsky. Look at /var/log/allsky.log - you'll know within 30 seconds if it helped (i.e., look for the TIMEOUT errors).
  2. If # 1 didn't help, remove the "//" from that line and change the "0" to "1", save the file, run "make capture", and restart allsky. Again, look in the log file.
  3. If neither of them helped, try increasing your "USB Bandwidth" to 90 or 100 via the GUI, and look in the log.
  4. If still getting the TIMEOUT error, try setting the "Auto USB" to "Yes".

Let me know how it goes. Since I changed my settings to USB speed 80 and Auto USB to "Yes", I haven't had any problems.

New Pull an hour ago now config.sh line 86 error !

That config.sh error is strange. Somehow a few change control lines were added.
Anyway, I put in a request for Thomas to fix.
It should be:

# corrupt images which then generate funny colors in the summary images...
REMOVE_BAD_IMAGES=false

# Images whose mean brightness is less than THRESHOLD_LOW or over THRESHOLD_HIGH

I will fix the "isupper()" bug when I get my new Pi and can compile the code, bit I THINK the attached file should work.

Eric
capture2.zip

Hi Bill,

Sorry about the errors that came up recently. Eric and a few others have made huge improvements to the source code and there have been a few conflicts when merging their code into the project. I will put in place a dev branch where new features will be merged and tested. Once in a while, the dev branch will be released into the master branch for everyone to enjoy.
I will keep merging hot fixes if there are outstanding errors with the new versions but I will keep new features on the side for now.
I believe that's the best way to manage the evolution of the source code going forward.

Thomas

Thanks for understanding Bill.
Hang tight, I found an issue with saveImageDay.sh. I will have to test and push again to master. Hopefully that's one of the last hot fixes.

How can we do to install v0.7?
Thanks
Pierre

Hi,
is there any way to get back to v0.7?
I still get the asi error timeout whatever parameter i put on v0.8 while it was working straightforward on v0.7...
Thanks
Pierre

Let me see if I can find a copy of version 0.7 to send you.
What camera do you have, and it attached to a USB 2 or 3 port? And the top or bottom port?

Eric

You can select the version you want on github.
https://github.com/thomasjacquin/allsky/tree/v0.7

git clone https://github.com/thomasjacquin/allsky.git --branch v0.7 –single-branch

Browse the commits and hit the <> button to get a snapshot of the code at a certain time.
https://github.com/thomasjacquin/allsky/commits/

I believe this is where the repo was before you committed all the new v0.8 features.
https://github.com/thomasjacquin/allsky/tree/cdd7c1e3b332bb3b73361be04e34d94ca502a737

You will have to apply the same logic for the allsky-portal.
https://github.com/thomasjacquin/allsky-portal/tree/c7b732c4e2bd5c85bc4839c3c8388cd346213102

Manfred,
Thanks. Attached is a newer capture.cpp to use, in capture0.8.zip

pierrebilb and others,
Also attached is the 0.7 version of capture.cpp that knows about the new 0.8 setting names. If you use it, you will still get many of the other benefits of 0.8, but with the 0.7 capture, and don't need to back anything out.
To use it, rename your existing capture.cpp to capture0.8.cpp, then rename capture0.7.cpp to capture.cpp, and run "make capture".

capture0.8.zip
capture0.7.zip

@EricClaeys you saved the day. Thank you. Now my 0.8 version is working without ASI_TIMEOUT_ERROR

Thank you

Glad it works, mhammady911. I've been running it on my test Pi for a couple days with no issues, although as soon as I started running I noticed the ZWO daylight exposure bug - one shot was light, the next couple dark, then light, etc. Version 0.8 fixed that.

I'd like to slowly include additional version 0.8 features into the modified 0.7 capture.cpp file until the ASI_TIMEOUT_ERROR returns, to help determine where the problem is. Would you be willing to help? You'd just need to save the current capture.cpp to a temporary name, then install the new one and recompile and let me know if you see the problem. It tends to happen pretty quickly.

Unfortunately I don't see the problem on either of my two cameras so I have no way to test it myself.

Thanks - Eric

Hi @EricClaeys, sure, I'd be happy to help. Keep sending me the updated capture.cpp and will test them

Hi,
also working for me! I will try the updated capture.cpp as they come. I have an orange pi+2e with a t7 color on a usb2 port.

Thanks in advance for helping, mhammady911 and pierrebilb.
I have a hunch the TIMEOUT error is related to the way version 0.8 handles exposures.
Version 0.7 would turn on video mode, then take a picture, sleep, take another, sleep, etc., going on until you stopped the program or rebooted the Pi. That meant the camera was constantly taking pictures as fast as it can (which it does in video mode), which would heat up the camera. Version 0.8 starts video mode, takes a picture, stops video mode, then sleeps until the next picture, restarting that sequence. So the camera was only heating up when it was taking pictures, which was dependent on how long a delay you had.
For the next test version I think I'll add ALL the other version 0.8 enhancements EXCEPT the video mode one. If that works, we'll know where the issue is, then I can try to find ways around it.
Eric

mhammady911 and pierrebilb,
Attached is an updated version 0.8 capture.cpp using the 0.7 style of exposure control. Also included is an updated camera_options_ZWO.json file (that goes in /etc/raspap). It has a new option called "Version 0.8 Exposure" that when Yes uses the 0.8 exposure method and when set to No uses the version 0.7 method.
Would you please try this and let me know how it goes?

  1. On the GUI "Camera Settings" page at the bottom, click on "Show advanced options". Then set "Version 0.8 Exposure" to Yes.
    Look in /var/log/allsky.log to see if you get TIMEOUT's. You likely will, but if you don't, see if you can get them by playing with the USB settings.

  2. Then, set "Version 0.8 Exposure" to No.
    Look in the log to see if you get TIMEOUTs - hopefully you won't.

Thanks much - Eric
test_capture_cpp.zip

Hi Eric,

  1. the "Version 0.8 Exposure" option present only in the json file and not the UI.
  2. As soon as I save the camera settings, it override the new json with original structure
  3. I didnt change the settings of .json to make sure i use the 0.8 exposure settings

the following is the log output

Aug 27 19:39:13 allskycam01 allsky.sh[4490]: === Starting daytime capture === Aug 27 19:39:13 allskycam01 allsky.sh[4490]: ========== Aug 27 19:39:13 allskycam01 allsky.sh[4490]: Saving images with delay of 5,000 ms (5 sec) Aug 27 19:39:13 allskycam01 allsky.sh[4490]: WARNING: Value of 200 greater than max value allowed (100) for control 'AutoExpMaxGain' (#10). Aug 27 19:39:17 allskycam01 allsky.sh[4490]: STARTING EXPOSURE at: 2021-08-27 19:39:17 Aug 27 19:39:17 allskycam01 allsky.sh[4490]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Aug 27 19:39:19 allskycam01 allsky.sh[4490]: STARTING EXPOSURE at: 2021-08-27 19:39:19 Aug 27 19:39:20 allskycam01 allsky.sh[4490]: > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT) Aug 27 19:39:22 allskycam01 allsky.sh[4490]: > Saving DAY image 'image.jpg' that started at 2021-08-27 19:39:19 Aug 27 19:39:22 allskycam01 allsky.sh[4490]: jq: error (at /etc/raspap/settings_ZWO.json:592): Cannot index array with string "filename" Aug 27 19:39:22 allskycam01 allsky.sh[4490]: jq: error (at /etc/raspap/settings_ZWO.json:592): Cannot index array with string "darkframe" Aug 27 19:39:22 allskycam01 allsky.sh[4490]: jq: error (at /etc/raspap/settings_ZWO.json:592): Cannot index array with string "filename" Aug 27 19:39:22 allskycam01 allsky.sh[4490]: *** copy_notification_image.sh: ERROR: File 'notification_images/NotRunning.' does not exist or is empty! Aug 27 19:39:22 allskycam01 allsky.sh[4490]: jq: error (at /etc/raspap/settings_ZWO.json:592): Cannot index array with string "notificationimages"

Capture
Capture2

mhammady911,
You copied the camera_options_ZWO.json file to /etc/raspap, correct? And that file has the "newexposure" setting as shown in your screenshot? What does config.sh have for the settings directory (it'snear the bottom)? /etc/raspap? If so, then the server isn't getting the updated camera_settings_ZWO file.
After you install that file you need to refresh your browser window before pressing the "Save changes" button.

Which jason file are referring to:
I didnt change the settings of .json to make sure i use the 0.8 exposure settings

The jq errors imply something wrong with the settings_ZWO.json file. Let's not worry about those until you can see the Version 0.8 option in the GUI.

A minor thing but your camera only supports a maximum gain of 100, not 200.
Eric

May not fix the Issue described but for information: I loaded exactly the same 0.8 install on a Pi Zero W and a PI 4 8GB. It worked first time on PI 4 using a ZWO ASI120MC-S but not on PI Zero. After a trying a few variations of the advanced USB settings in the Camera Config to no avail I connected the ZWO via a ANKER powered USB Hub and the ASI_ERROR_TIMEOUT has gone and camera working fine.

PrimeAmp2016,
That's good to know. I suspected it was either the camera or Pi hardware causing the issue, since it only happens to certain people, but not others with the same Pi and camera model. But that doesn't explain why it never (?) happened in version 0.7 and sometimes happens in 0.8.
Would you please look at the post a few above this where I attached test_capture_cpp.zip, and try it on the Pi Zero withOUT the ANKER? I'm really curious if the version 0.7 exposure method will work but the 0.8 method fails.
Before you copy the capture.cpp from the .zip file, rename the current one to capture0.8.cpp, so you can easily restore it if needed.
Thanks - Eric

ZWO ASI183MC bin2 with RPi 4
I would get consistent timeouts using v8 exposure control.
Setting the option "Use v8 exposure" to No and I get images.

Bob,
Thanks for letting me know. By any chance do you have a powered USB3 hub you could try with the 0.8 exposure control?

PrimeAmp2016,
Could you also check if you are getting the following errors in /var/log/kern.log when running in 0.8 mode and the ANKAR?
usb 2-1: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd

Thanks - Eric

Attached screen captures show log files as requested. File names reflect connected items. All used AS120MC-S

PiZeroW_ANKER_A7515Hub_Capture ccpFromZipFile(Works)
PiZeroW_ASI120MC-S_ANKHER_A7515_7PortPoweredHub
PiZeroW_NoHub_Capture ccpFromZipFile(1)
PiZeroW_NoHub_Capture ccpFromZipFile

Top jpeg = PiZeroW_ANKER_A7515Hub_Capture.ccpFromZipFile(Works) Kernal log (works)
2nd jpeg = PiZeroW_ANKER_A7515Hub_Capture.ccpFromZipFile(Works) Kernal log (works)
3rd jpeg = PiZeroW_NoHub_Capture.ccpFromZipFile (does not work) Kernal log
Bottom jpeg = PiZeroW_NoHub_Capture.ccpFromZipFile (does not work) Allsky Log

Count me in the crew with the v8 not working.

System:

  • Pi 3B+
  • Powered over POE via the official Pi POE HAT.
  • ZWO ASI178MC, direct connected to the Pi ( no hub )
  • Running Raspberry Pi OS, upgraded to Bullseye
    • This brought it's own complications, opencv version 4.5.1, but that's a different ball of wax

With 'master' branch:

Aug 31 20:19:28 skycam allsky.sh[11804]: NOTICE: Camera does not support ControlCap # 2; not setting to 50.
Aug 31 20:19:28 skycam allsky.sh[11804]: Will adjust gain at transitions
Aug 31 20:19:28 skycam allsky.sh[11804]: Stop the allsky service to end this process.
Aug 31 20:19:28 skycam allsky.sh[11804]: xxx resetGainTransitionVariables(0, 50) called at NIGHT
Aug 31 20:19:28 skycam allsky.sh[11804]: xxx will not adjust gain right now - numExposures == 0
Aug 31 20:19:28 skycam allsky.sh[11804]: ==========
Aug 31 20:19:28 skycam allsky.sh[11804]: === Starting nighttime capture ===
Aug 31 20:19:28 skycam allsky.sh[11804]: ==========
Aug 31 20:19:28 skycam allsky.sh[11804]: Saving auto exposed night images with delay of 10 ms (0 sec)
Aug 31 20:19:28 skycam allsky.sh[11804]: ===Taking 3 images to clear buffer...
Aug 31 20:19:28 skycam allsky.sh[11804]:   > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms
Aug 31 20:19:28 skycam allsky.sh[11804]:   > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)
Aug 31 20:19:31 skycam allsky.sh[11804]:   > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms
Aug 31 20:19:31 skycam allsky.sh[11804]:   > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)
Aug 31 20:19:34 skycam allsky.sh[11804]:   > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms
Aug 31 20:19:34 skycam allsky.sh[11804]:   > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)
Aug 31 20:19:40 skycam allsky.sh[11804]:      ***** Stopping AllSky *****
Aug 31 20:19:40 skycam allsky.sh[11707]: capture exited with retcode=2

With 'newexposure' disabled:

Aug 31 20:20:37 skycam allsky.sh[12098]: NOTICE: Camera does not support ControlCap # 2; not setting to 50.
Aug 31 20:20:37 skycam allsky.sh[12098]: Will adjust gain at transitions
Aug 31 20:20:37 skycam allsky.sh[12098]: Stop the allsky service to end this process.
Aug 31 20:20:37 skycam allsky.sh[12098]: xxx resetGainTransitionVariables(0, 50) called at NIGHT
Aug 31 20:20:37 skycam allsky.sh[12098]: xxx will not adjust gain right now - numExposures == 0
Aug 31 20:20:37 skycam allsky.sh[12098]: ==========
Aug 31 20:20:37 skycam allsky.sh[12098]: === Starting nighttime capture ===
Aug 31 20:20:37 skycam allsky.sh[12098]: ==========
Aug 31 20:20:37 skycam allsky.sh[12098]: Saving auto exposed night images with delay of 10 ms (0 sec)
Aug 31 20:20:37 skycam allsky.sh[12098]: ===Taking 3 images to clear buffer...
Aug 31 20:20:37 skycam allsky.sh[12098]:   > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms
Aug 31 20:20:38 skycam allsky.sh[12098]:   > ERROR: Failed getting image, status = 11 (ASI_ERROR_TIMEOUT)
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Got image @ exposure: 30000 µs (30.00 ms)
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Exposure set to 30000 µs (30.00 ms), timeout: 560 ms
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Got image @ exposure: 30000 µs (30.00 ms)
Aug 31 20:20:40 skycam allsky.sh[12098]: ...DONE.  Reset exposure to 10000000 µs
Aug 31 20:20:40 skycam allsky.sh[12098]: STARTING EXPOSURE at: 2021-08-31 20:20:40
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Exposure set to 10000000 µs (10000.00 ms), timeout: 20500 ms
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Got image @ exposure: 14950000 µs (14950.00 ms)
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Saving image 'image.jpg' that started at 2021-08-31 20:20:40  (0 µs)
Aug 31 20:20:40 skycam allsky.sh[12098]:   > Sleeping: 5060 ms
Aug 31 20:20:46 skycam allsky.sh[12098]: STARTING EXPOSURE at: 2021-08-31 20:20:46
Aug 31 20:20:46 skycam allsky.sh[12098]:   > Exposure set to 14950000 µs (14950.00 ms), timeout: 30400 ms
Aug 31 20:20:46 skycam allsky.sh[12098]:   > Got image @ exposure: 14950000 µs (14950.00 ms)
Aug 31 20:20:46 skycam allsky.sh[12098]:   > Saving image 'image.jpg' that started at 2021-08-31 20:20:46  (0 µs)
Aug 31 20:20:46 skycam allsky.sh[12098]:   > Sleeping: 5060 ms
Aug 31 20:20:51 skycam allsky.sh[12098]: STARTING EXPOSURE at: 2021-08-31 20:20:51
Aug 31 20:20:51 skycam allsky.sh[12098]:   > Exposure set to 14950000 µs (14950.00 ms), timeout: 30400 ms
Aug 31 20:20:56 skycam allsky.sh[12098]:   > Got image @ exposure: 12969125 µs (12969.12 ms)
Aug 31 20:20:56 skycam allsky.sh[12098]:   > Saving image 'image.jpg' that started at 2021-08-31 20:20:51  (0 µs)
Aug 31 20:20:56 skycam allsky.sh[12098]:   > Sleeping: 7040 ms

Note:

  • There were no other settings variations between these runs ( actually, the top run was the 'master' compiled version, the bottom was with only necessary lines added from the test code above to disable the new capture method. )
  • autousb is off
  • usb is set to 40
    • I've tried multiple 'usb' values, 40, 80, 100 -- none of them made any difference.

PrimeAmp2016,
Thanks for the info. Interesting that you are still getting all the USB resets even though things are working.

Would you please try the Zero withOUT the ANKER with the capturre.cpp and .json files in the zip file above? You'll need to copy it to /home/pi/allsky, then "cd allsky ; make capture". Then in the GUI, click on the "Show advanced options" at the bottom, and UNcheck the "Version 0.8 Exposure" box. That will force it to use the 0.7 exposure, which I expect will work ok withOUT the ANKER.
You'll know you have the correct capture.cpp file running when the log shows "New exposure: yes|no" after the "TTY: line" - about midway in your last screenshot.

If that works for you, you can leave it - no need to revert to the prior version.

@thomasjacquin FYI - PR created with -only- the '-newexposure' option for quick merge.

linuxkidd,
Thanks much for the info. It looks like UNchecking the "Version 0.8 exposure" box WORKED for you, correct? The very first image got an ASI_ERROR_TIMEOUT but none of the others did. The first 3 images are never displayed anyhow - they are very short exposures to "flush the buffer", so to speak.
If this is working, I suggest leaving it as is. If a few other people tell me that UNchecking that box fixed it for them, I'll ask Thomas to push a high-priority fix.

FYI, the version 0.7 code never checked for timeouts, so everyone may have been getting them and never knowing it.

Michael, I though I recognized your handle "linuxkidd". I helped you when you first started building your observatory at Rusty's. I want to say we dug some holes for the concrete? I remember it was you, me, and another guy.
Nice presentation you gave on the AIC. I'm glad the observatory's working for you.
I had one built in the mountains by Alamogordo, next to New Mexico Skies.
Eric Claeys

@EricClaeys Ha! Small world, eh! :D Thanks for your help with the Obs.. and glad you enjoyed my tAIC presentation. :) We plan to be back out at Rusty's mid October. o/

And yes, setting -newexposure to 0 allowed images to be downloaded. Interesting that there are likely silent USB timeouts due to the original code not checking...

@linuxkidd I would guess there's an underlying hardware/OS issue with either the Pi or the ZWO cameras which causes the USB resets in /var/log/kern.log and sometimes also causes ASI_ERROR_TIMEOUTs in the AllSky software.

The USB reset messages appear every time we turn the ZWO video mode on. In version 0.7 we did that once, and left it on until the program exited. That meant the camera was always taking pictures so it heated up. In version 0.8 we turn video mode on before taking a picture, then turn it off after taking a picture, so the camera is only doing something while taking a picture, not in the delay between pictures. This also means with version 0.8 we see lots of USB reset messages in the kern.log.

I suspect in version 0.7 the first image may have failed for some people but no one noticed - partially due to a bug somewhere that causes the first 3 images to be identical. My test Pi doesn't exhibit the TIMEOUT issue so it's hard for me to test it.

Eric

I can also confirm that using the new "Version 0.8 Exposure" set to No, resolves the issue for me when running an ASI 224MC on a raspberry pi zero W.

Thank you, I followed your advice Eric and PiZeroW working now without hub and Capture0.7. Kernal log below for your information. Given that Capture0.8 works with a powered Hub the problem may be related to 'loading' of the usb bus. A high bandwidth Oscilloscope may show subtle differences in the USB waveform but it is not really accessible. A bit nugatory now as problem is sorted.

An additional question: Do the log files clear after a period of time? They seem to get rather large.

I certainly appreciate your help in resolving this problem. Thank you again from Lincolnshire UK

PiZeroW_NoHub_Capture0 7 ccp_Working

@jryd2000, thanks for the good news. UNchecking "Version 0.8 Exposure" seems to fixing the TIMEOUT issues for people (not everyone) that was having them.

@PrimeAmp2016, are you running the capture.cpp I included in the .zip file with "Version 0.8 Exposure" unchecked, or are you running the older version 0.7 capture.cpp.
It's interesting that you're still getting USB reset messages, but not at consistent times - some a few seconds apart, then about 30 seconds to the next one, then a few seconds apart.

I used the instructions you gave to mhammady911 6 days ago so I was using the capture0.7.

Thank you again.

@PrimeAmp2016, forgot to answer your log question. The current log file is renamed allsky.log.1 after some period of time, and a new log file created. I think it's a week but don't quote me. You can decrease what's written to the file by decreasing Log Level in the GUI. If everything is working fine you can set it to 0 and only increase it if you have a problem.

Just for clarification, you are running the capture.cpp I included in the zip file several days ago and have "Version 0.8 Exposure" UNchecked?
Eric

Thank you Eric, I will set debug to '0'.

Yes I am running the capture.ccp included in the zip file several days ago and have 'Version 0.8 Exposure' UNchecked.

Thanks @PrimeAmp2016. You may have noticed an update to capture.cpp and the ZWO .json file that Thomas just posted that fixes the ASI_ERROR_TIMEOUT. You already have the fix so don't need the update on GitHub.

Hi, i'm a french astrophotograph. Just installed the allsky soft on my raspberry with a 120mm ASI camera. And just getting the bug error timeout when i launch the soft.... I didn't really understand if the pb was solved or not... Anyone.would tell me what to.do with this issue ? I tried to change the autousb & USB bandwith, but useless.... Thanks all

Astrothumb, try the attached file. I'm 99% sure I found the issue you are having yesterday and submitted a fix to Thomas, but he hasn't had a chance to post it. The attached file is what I submitted. Copy the file to /home/pi/allsky, then "cd allsky; make capture", then restart the service.
Let me know how it goes.
Eric
capture.zip

I've tried several 0.8 and 0.7 cpp files here to no avail. I'm on a Pi3 and have a 174mm and usb3 cable. This is all I get now with a black screen

 make capture
arm-linux-gnueabihf-g++  capture.cpp -o capture -Wall -Wno-psabi -g -D_LIN -D_DEBUG   -Llib/armv7 -I./include -lpthread  -DGLIBC_20 -I/usr/include/opencv -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_datasets -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_video -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_rgbd -lopencv_viz -lopencv_surface_matching -lopencv_text -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core -lASICamera2 -I/usr/include/libusb-1.0 -lusb-1.0
pi@allsky:~/allsky $ sudo service allsky restart


pi@allsky:~/allsky $ sudo service allsky status
● allsky.service - All Sky Camera
   Loaded: loaded (/lib/systemd/system/allsky.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2021-09-05 11:55:04 EDT; 1s ago
  Process: 3019 ExecStart=/home/pi/allsky/allsky.sh (code=exited, status=2)
 Main PID: 3019 (code=exited, status=2)
pi@allsky:~/allsky $

Astrothumb, try the attached file. I'm 99% sure I found the issue you are having yesterday and submitted a fix to Thomas, but he hasn't had a chance to post it. The attached file is what I submitted. Copy the file to /home/pi/allsky, then "cd allsky; make capture", then restart the service.
Let me know how it goes.
Eric

Gah, sorry I missed those lines... that's what I get for manually editing and submitting patches on code I can't compile... ( running on bullseye ). Thanks for correcting it @EricClaeys .

@maphilli14, please use the capture.cpp I included in the zip file a few messages above. When you restart the service, look in /var/log/allsky.log. It will give you an idea of the issue. Feel free to post the file (don't just copy/paste, but attach the file instead).
Eric

image
allsky.log

Thanks Eric! I tried your zipped file, the most recent one and got this result.

maphilli14,
Something is stange with the arguments passed to the "capture" program.
What does allsky/log.txt look like?


pi@allsky:~/allsky $ cat log.txt
 -alwaysshowadvanced 0 -angle -6 -autousb 1 -autowhitebalance 0 -coolerEnabled 0 -darkframe 0 -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 60.7N -locale en_US.UTF-8 -longitude 135.05W -newexposure 0 -nightautoexposure 1 -nightautogain 0 -nightbin 1 -nightbrightness 50 -nightdelay 10 -nightexposure 1000 -nightgain 50 -nightmaxexposure 1000 -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 80 -wbb 90 -wbr 53 -width 0 -daytime 1 -tty 0

I'm trying the latest branch of allsky too.

@maphilli14, please make sure you are using the latest allsky.sh. Also, please post the /etc/raspap/settings_ZWO.json file.

I did a git and also freshened by hand from github web for /home/pi/allsky/allsky.sh and attached is the settings file, perhaps i'm an outlier using the ASI174mm ??? :(
settings_ZWO.zip

@maphilli14, the settings_ZWO.json file you sent is from version 0.7. If you are running version 0.8 of AllSky you'll need to update your settings_ZWO.json file to the version 0.8 one.
If you use version 0.7 of the web GUI it creates the correct settings_ZWO.json file (which is in /etc/raspap when using the GUI).

Based on the contents of your log.txt file, I'd guess you are using the GUI and sent the settings_ZWO.json file from ~/allsky, not the one from /etc/raspap? When you install the GUI it copies the settings_ZWO.json file from ~/allsky to /etc/raspap; unfortunately it leaves an unused copy in ~/allsky.
If my guess is correct, please stop the allsky service, then "sudo rm /var/log/allsky.log", then in the GUI click on the "Show advanced options button at the bottom and set the debug log to 3, then click the "Save settings" button. Post the first couple hundred lines from /var/log/allsky.log.

OK, joining this one and first of all, thanks for the great piece of software! It perfectly works with my RaspiHQ but I wanted to get my ZWO ASI 120 MM connected and that results in the discussed ASI_ERROR_TIMEOUT as well (Raspberry 4 Model B). I tried what was stated above (got the updated capture.cpp and recompiled it, set the NewExposure switch to off and play a bit with the AutoUSB and USB Bandwith settings (no success). I also tried both, a USB3 and a USB2 connection - both works on the ZWO ASI Studio, none work at the moment with AllSkyCam. So following :)

PS: I tried this with my ZWO ASI 533 as well - just to make sure that it was not something with that model of the ZWO ASI Cameras... same result ;)

allsky.log
settings_ZWO.json.txt

@azapf1972, Please check that you are running the newest capture.cpp. There should be a line in the log stating whether or not Version 0.8 Exposure is yes or no. It would be next to this line:
Sep 8 16:19:26 ASCZWO allsky.sh[859]: TTY: 0 (no)
Eric

Hello! I posted this in entry #460 before I saw this thread.
I'm having the same issue.
This is a brand new install of RPiOS (Buster), headless with no GUI installed.
I'm using an ASI120MC, and have tried using a Pi3 and a Pi4 with no joy either time. I loaded the ZWO SDK and compiled their demos. The demos work, so I know the camera is working and reachable by the Pi.
Thanks,
Mike