AstroHuntsman / huntsman-pocs

POCS on the Huntsman Telescope
MIT License
7 stars 8 forks source link

Improve robustness of ZWO camera reset after failed exposure #421

Open danjampro opened 3 years ago

danjampro commented 3 years ago

Example of hanging:

D 05-18 15:15:23.888 (15:15:23 UTC) | panoptes.pocs.camera.libasi start_exposure:451                       | Exposure started on camera 0
D 05-18 15:15:23.893 (15:15:23 UTC) | panoptes.pocs.camera.camera _poll_exposure:811                       | Polling exposure with timeout of 61.1 seconds.
D 05-18 15:15:23.896 (15:15:23 UTC) | panoptes.pocs.camera.camera take_exposure:531                        | Blocking on exposure event for 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel
D 05-18 15:15:23.899 (15:15:23 UTC) | panoptes.utils.time restart:164                                      | Restarting Timer  61.10/61.10
W 05-18 15:15:27.569 (15:15:27 UTC) | huntsman.pocs.camera.zwo _readout:338                                | Exposure failed on 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel. Reconnecting camera.
D 05-18 15:15:28.756 (15:15:28 UTC) | panoptes.pocs.camera.libasi close_camera:158                         | Closed camera 0
W 05-18 15:15:28.760 (15:15:28 UTC) | huntsman.pocs.camera.zwo _reset_usb:398                              | Resetting USB for 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel.
D 05-18 15:15:28.765 (15:15:28 UTC) | panoptes.pocs.camera.libasi get_product_ids:118                      | Got 93 supported camera product IDs from SDK.
D 05-18 15:15:29.061 (15:15:29 UTC) | huntsman.pocs.camera.zwo _reset_usb:402                              | Identified USB product ID: 6206.
D 05-18 15:15:29.347 (15:15:29 UTC) | huntsman.pocs.camera.zwo connect:158                                 | Connecting to 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel
D 05-18 15:15:29.394 (15:15:29 UTC) | panoptes.pocs.camera.libasi get_camera_property:131                  | Got info from camera 0, ZWO ASI183MM Pro
D 05-18 15:15:29.437 (15:15:29 UTC) | panoptes.pocs.camera.libasi open_camera:148                          | Opened camera 0
D 05-18 15:15:30.035 (15:15:30 UTC) | panoptes.pocs.camera.libasi init_camera:153                          | Initialised camera 0
D 05-18 15:15:30.040 (15:15:30 UTC) | panoptes.pocs.camera.libasi get_num_of_controls:194                  | Camera 0 has 14 controls
D 05-18 15:15:30.054 (15:15:30 UTC) | panoptes.pocs.camera.libasi get_control_caps:209                     | Got details of 14 controls from camera 0
D 05-18 15:15:30.057 (15:15:30 UTC) | panoptes.pocs.camera.libasi disable_dark_subtract:330                | Dark subtraction on camera 0 disabled.
D 05-18 15:15:30.062 (15:15:30 UTC) | panoptes.pocs.camera.libasi set_control_value:237                    | Set GAIN to 100 on camera 0
D 05-18 15:15:30.068 (15:15:30 UTC) | panoptes.pocs.camera.libasi get_camera_property:131                  | Got info from camera 0, ZWO ASI183MM Pro
D 05-18 15:15:30.125 (15:15:30 UTC) | panoptes.pocs.camera.libasi set_roi_format:270                       | Set ROI, format on camera 0 to 5496x3672/1, RAW16
E 05-18 15:15:30.129 (15:15:30 UTC) | panoptes.utils.error __init__:13                                     | PanError: Exposure failed on 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel
E 05-18 15:15:30.137 (15:15:30 UTC) | panoptes.pocs.camera.camera _poll_exposure:830                       | Error during readout on 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel: PanError('Exposure failed on 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel')
E 05-18 15:15:30.143 (15:15:30 UTC) | panoptes.pocs.camera.camera log_thread_error:520                     | _thread.ExceptHookArgs(exc_type=<class 'panoptes.utils.error.PanError'>, exc_value=PanError('Exposure failed on 192.168.80.151 (1815420013090900) with Birger Focuser & ZWO Filter Wheel with ZWO Filter Wheel'), exc_traceback=<traceback object at 0xffff7c3f2400>, thread=<Thread(Thread-78, started daemon 281472653042144)>)