×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Dispatch command error(-1): INDI

  • Posts: 2
  • Thank you received: 0
Hello all,

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:

class IndiClient(PyIndi.BaseClient):
def __init__(self):
super(IndiClient, self).__init__()
def newDevice(self, d):
try:
logging.info("Connect new device " + d.getDeviceName())
self.device = d
except:
print("Error alignment found")
raise Exception("Dispatch command error")
def newProperty(self, p):
Type = ("number", "switch", "text", "light", "blob", "xxx5", "xxx6")
tsp = (" ", " ", " ", " ", " ", " ", " ")
logging.debug("New " + Type[p.getType()] + tsp[p.getType()] + p.getName() + " for device "+ p.getDeviceName())
pass
def removeProperty(self, p):
logging.debug("Remove property " + p.getName() + " for device " + p.getDeviceName())
pass
def newBLOB(self, bp):
print('Entering NewBLOB')
global blobEvent #test if this is causing problems
blobEvent=threading.Event()
blobEvent.clear()
print("new BLOB ", bp.name)
#blobEvent.set()
print("name: ", bp.name," size: ", bp.size," format: ", bp.format)

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.
4 weeks 15 hours ago #100096

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

Time to create page: 0.390 seconds