I'm implementing a software in Python to perform automatic observations, it runs everyday via cron job. I noticed that an error occurs when connecting to the indiservers, and it is not reproducible. I don't understand really well why it's happening. And when the error is raised, the mount doesn't move or points to the wrong coordinates. This is the message that is being printed:
Connect new device 10micron
Dispatch command error(-1): INDI: Could not find property MINIMAL_NEW_ALIGNMENT_POINT_RO in 10micron
<setNumberVector device="10micron" name="MINIMAL_NEW_ALIGNMENT_POINT_RO" state="Idle" timeout="60" timestamp="2023-12-07T21:56:21">
<oneNumber name="MRA">
19.810110092163085938
</oneNumber>
<oneNumber name="MDEC">
88.2845001220703125
</oneNumber>
<oneNumber name="MSIDE">
0
</oneNumber>
<oneNumber name="SIDTIME">
1.8413222222222223046
</oneNumber>
</setNumberVector>
Connect new device SBIG CCD
or this for the dome:
Connect new device Baader Dome
Dispatch command error(-1): Device Baader Dome not found
<setSwitchVector device="Baader Dome" name="DOME_FLAP" state="Ok" timeout="60" timestamp="2024-03-04T15:21:49">
<oneSwitch name="FLAP_OPEN">
Off
</oneSwitch>
<oneSwitch name="FLAP_CLOSE">
On
</oneSwitch>
</setSwitchVector>
I don't know where this error is being generated to catch it, and restart the indiserver connection, or even resetting the mount is what fixes the problem. I need to find this error in my code to make the system completely automatic. This was my attempt to see this error, but I haven't managed to reproduce it:
img = bp.getblobdata()
blobfile = io.BytesIO(img)#buffer containing the data
hdu_list = fits.open(blobfile)#we give a memory buffer instead of a file
img_data = hdu_list[0].data
fits.writeto('img_test_%s.fits'%i,img_data,header=hdu_list[0].header,overwrite=True)
#print('img data type:',type(img_data))
pass
#def process_img(self,img):
# blobfile = io.BytesIO(img)
# hdu_list = fits.open(blobfile)
# img_data = hdu_list[0].data
# i = 0
# fits.writeto('img_test_%s.fits'%i,img_data,header=hdu_list[0].header,overwrite=True)
def newSwitch(self, svp):
pass
def newNumber(self, nvp):
pass
def newText(self, tvp):
pass
def newLight(self, lvp):
pass
def newMessage(self, d, m):
pass
def serverConnected(self):
pass
def serverDisconnected(self, code):
pass
def disconnectServer(self):
return PyIndi.BaseClient.disconnectServer(self)
I guess that the error is being raised after a newDevice has been connected, but I'm not sure. I would appreciate it if you could guide me on this. Thanks in advance.