×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro

2 weeks 2 days ago 2 weeks 2 days ago by scberg99. Reason: fixed typo
scberg99
Fresh Boarder
Fresh Boarder
Posts: 16
More
Topic Author
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57302
Hello. I'm writing a client using PyIndi-Client to control a ZWO ASI6200MM Pro. I am using Python package Flask to allow for the exposure info to be sent as a http POST request. The client and indiserver are running on a Raspberry Pi 4. The camera is not attached to any telescope but is connected to the RPi4 via USB. When I send the POST request to take the exposure, the client outputs the following:
2020-07-24 20:46:29,834 new Message 2020-07-24T20:46:29: [INFO] Taking a 10 seconds frame... 
2020-07-24 20:46:29,836 172.19.0.1:59174 POST /elements/1/cameras/1:startExposure 1.1 202 57 9393
[2020-07-24 20:46:29,836] 172.19.0.1:59174 POST /elements/1/cameras/1:startExposure 1.1 202 57 9393
2020-07-24 20:46:40,939 new Message 2020-07-24T20:46:40: [INFO] Exposure done, downloading image... 
2020-07-24 20:46:41,064 new Message 2020-07-24T20:46:41: [INFO] Download complete. 
2020-07-24 20:46:41,066 new Message 2020-07-24T20:46:41: [WARNING] Telescope focal length is missing. 
2020-07-24 20:46:41,067 new Message 2020-07-24T20:46:41: [WARNING] Telescope aperture is missing. 
INDI server indiserver/7624 disconnected.
2020-07-24 20:46:43,274 Server disconnected (exit code = -1,indiserver:7624)

In case it is relevant to know, here is the simple script to send the request:
import requests

url = 'http://localhost:9001/elements/1/cameras/1:startExposure'
data = {'exposure':10}

x = requests.post(url, json = data)

print(x.text)

I have copied code from www.indilib.org/develop/indi-python-bindings.html to print out BLOB information after the exposure is taken, but this is obviously not printed before the indiserver disconnects, so it seems the problem happens after the exposure is taken but before the indiserver receives the BLOB. I am hoping someone can explain what the error code -1 means (I have been unable to find any documentation of indiserver error codes) and tell me if there is some way to fix this problem. Thank you.

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
scberg99
Fresh Boarder
Fresh Boarder
Posts: 16
More
Topic Author
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57303
I should have added, this is my newBLOB method for post-exposure image processing:
def newBLOB(self, bp):
        self.logger.info("new BLOB " + bp.name)
        print("name: ", bp.name," size: ", bp.size," format: ", bp.format)
        # get image data
        fits=bp.getblobdata()
        print(type(fits))
        # write image data to BytesIO buffer
        blobfile = io.BytesIO(fits)
        # open a file and save buffer to disk
        with open("%s.fits" % datetime.now(), "wb") as f:
            f.write(blobfile.getvalue())
        blobfile.close()

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
knro
Administrator
Administrator
Posts: 8205
Karma: 51
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57314
INDI server still running? Maybe the client disconnects after they send the request? I'm not exactly familiar with how the python binding work, I presume they work along the same lines as the C++ client?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
scberg99
Fresh Boarder
Fresh Boarder
Posts: 16
More
Topic Author
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57331
Thanks for the reply. The INDI server and the client are running in separate docker containers linked with a docker network, and yes, the INDI server continues to run after the client is forcibly disconnected. If the docker container with the client is rebooted, it will connect to the INDI server again with no problems. However, the fact that it disconnects after an exposure is a pretty large issue in the context of the project I’m working on, because there is nothing in the client that tells the server to disconnect after an exposure. Also, I have only use PyIndi so I am not very familiar with the C++ client, but I would also assume it works along the same lines. Do you know what the error code -1 signifies?

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
knro
Administrator
Administrator
Posts: 8205
Karma: 51
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57332
If the pyINDI client acts the same as the C++ one, then there shouldn't be any disconnections. Maybe it's best to communicate with the pyINDI maintainer?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
scberg99
Fresh Boarder
Fresh Boarder
Posts: 16
More
Topic Author
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57334
Okay, do you know who that is/how I can contact them?

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
knro
Administrator
Administrator
Posts: 8205
Karma: 51
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57335
Sure, you can find the information here: pypi.org/project/pyindi-client/

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Please Log in or Create an account to join the conversation.

2 weeks 2 days ago
scberg99
Fresh Boarder
Fresh Boarder
Posts: 16
More
Topic Author
Indiserver disconnects with error code -1 for exposure with ZWO ASI6200MM Pro #57336
Thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.509 seconds