Bi-monthly release with minor bug fixes and improvements
Please Log in or Create an account to join the conversation.
def getDeviceProperties(self, device):
properties = dict()
for p in device.getProperties():
name = p.getName()
properties[name] = dict()
if p.getType() == PyIndi.INDI_TEXT:
for t in p.getText():
properties[name][t.getName()] = t.getText()
elif p.getType() == PyIndi.INDI_NUMBER:
for t in p.getNumber():
properties[name][t.getName()] = t.getValue()
elif p.getType() == PyIndi.INDI_SWITCH:
for t in p.getSwitch():
properties[name][t.getName()] = self.__state_to_str_s[t.getState()]
elif p.getType() == PyIndi.INDI_LIGHT:
for t in p.getLight():
properties[name][t.getName()] = self.__state_to_str_p[t.getState()]
elif p.getType() == PyIndi.INDI_BLOB:
pass
#for t in p.getBLOB():
# logger.info(" %s(%s) = %d bytes", t.name, t.label, t.size)
logger.warning('%s', pformat(properties))
return properties
Please Log in or Create an account to join the conversation.
telnet hecate 7624
<getProperties version="1.7"/>
<defSwitchVector device="Telescope Simulator" name="ON_COORD_SET" label="On Set" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60" timestamp="2023-11-18T09:30:53">
<defSwitch name="TRACK" label="Track">
On
</defSwitch>
<defSwitch name="SLEW" label="Slew">
Off
</defSwitch>
<defSwitch name="SYNC" label="Sync">
Off
</defSwitch>
</defSwitchVector>
<defNumberVector device="Telescope Simulator" name="EQUATORIAL_EOD_COORD" label="Eq. Coordinates" group="Main Control" state="Idle" perm="rw" timeout="60" timestamp="2023-11-18T09:30:53">
<defNumber name="RA" label="RA (hh:mm:ss)" format="%010.6m" min="0" max="24" step="0">
7.4151005755258916352
</defNumber>
<defNumber name="DEC" label="DEC (dd:mm:ss)" format="%010.6m" min="-90" max="90" step="0">
90
</defNumber>
</defNumberVector>
<defSwitchVector device="Telescope Simulator" name="TELESCOPE_ABORT_MOTION" label="Abort Motion" group="Main Control" state="Idle" perm="rw" rule="AtMostOne" timeout="60" timestamp="2023-11-18T09:30:53">
<defSwitch name="ABORT" label="Abort">
Off
</defSwitch>
</defSwitchVector>
<defSwitchVector device="Telescope Simulator" name="TELESCOPE_TRACK_MODE" label="Track Mode" group="Main Control" state="Ok" perm="rw" rule="OneOfMany" timeout="0" timestamp="2023-11-18T09:30:53">
<defSwitch name="TRACK_SIDEREAL" label="Sidereal">
On
</defSwitch>
<defSwitch name="TRACK_SOLAR" label="Solar">
Off
</defSwitch>
<defSwitch name="TRACK_LUNAR" label="Lunar">
Off
</defSwitch>
<defSwitch name="TRACK_CUSTOM" label="Custom">
Off
</defSwitch>
</defSwitchVector>
<defSwitchVector device="Telescope Simulator" name="TELESCOPE_TRACK_STATE" label="Tracking" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="0" timestamp="2023-11-18T09:30:53">
<defSwitch name="TRACK_ON" label="On">
Off
</defSwitch>
<defSwitch name="TRACK_OFF" label="Off">
On
</defSwitch>
</defSwitchVector>
<defNumberVector device="Telescope Simulator" name="TELESCOPE_TRACK_RATE" label="Track Rates" group="Main Control" state="Ok" perm="rw" timeout="60" timestamp="2023-11-18T09:30:53">
<defNumber name="TRACK_RATE_RA" label="RA (arcsecs/s)" format="%.6f" min="-16384" max="16384" step="9.9999999999999995475e-07">
15.04106717867020393
</defNumber>
<defNumber name="TRACK_RATE_DE" label="DE (arcsecs/s)" format="%.6f" min="-16384" max="16384" step="9.9999999999999995475e-07">
0
</defNumber>
</defNumberVector>
<defSwitchVector device="Telescope Simulator" name="TELESCOPE_MOTION_NS" label="Motion N/S" group="Motion Control" state="Idle" perm="rw" rule="AtMostOne" timeout="60" timestamp="2023-11-18T09:30:53">
<defSwitch name="MOTION_NORTH" label="North">
Off
</defSwitch>
<defSwitch name="MOTION_SOUTH" label="South">
Off
</defSwitch>
</defSwitchVector>
Please Log in or Create an account to join the conversation.
indi-mqtt: AD - getDeviceProperties
Fatal Python error: Segmentation fault
Thread 0x74b9e440 (most recent call first):
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1150 in _loop
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1756 in loop_forever
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3591 in _thread_main
File "/usr/lib/python3.7/threading.py", line 865 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Current thread 0x76effb40 (most recent call first):
File "/home/pi/.local/lib/python3.7/site-packages/PyIndi.py", line 1279 in getProperties
File "indi-mqtt.py", line 319 in getJSON
File "indi-mqtt.py", line 523 in <module>
Erreur de segmentation
def getProperties(self, *args):
return _PyIndi.BaseDevice_getProperties(self, *args)
2023-11-19 14:01:22,733 new property TELESCOPE_TIMED_GUIDE_NS as INDI_NUMBER for device Telescope Simulator
2023-11-19 14:01:22,734 new property TELESCOPE_TIMED_GUIDE_WE as INDI_NUMBER for device Telescope Simulator
2023-11-19 14:01:22,734 new property GUIDE_RATE as INDI_NUMBER for device Telescope Simulator
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/PyIndi.py", line 1093, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, BaseClient, name)
File "/home/pi/.local/lib/python3.7/site-packages/PyIndi.py", line 80, in _swig_getattr
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
AttributeError: 'BaseClient' object has no attribute 'newText'
Please Log in or Create an account to join the conversation.
### Causing a segfault as of 8/25/22
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.