Telescope Control plugin - ASCOM telescope
The version 24.4 Qt6 has the ASCOM disabled, but the Qt5 version kind of works.
I am developing my own ASCOM/Alpaca telescope driver and found that Stellarium calls Connected method many times per reading the rightascension and declination. This makes the interface slow. Is this expected behaviour?
2025-03-07T12:25:28.428 INFO 192.168.8.104 -> GET /api/v1/telescope/0/rightascension?ClientID=36955&ClientTransactionID=1976
2025-03-07T12:25:28.451 INFO 192.168.8.104 <- 0.0
2025-03-07T12:25:28.466 INFO 192.168.8.104 -> GET /api/v1/telescope/0/declination?ClientID=36955&ClientTransactionID=1977
2025-03-07T12:25:28.488 INFO 192.168.8.104 <- 0.0
2025-03-07T12:25:28.582 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1978
2025-03-07T12:25:28.589 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.703 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1979
2025-03-07T12:25:28.709 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.790 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1980
2025-03-07T12:25:28.798 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.816 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1981
2025-03-07T12:25:28.823 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.853 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1982
2025-03-07T12:25:28.860 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.895 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1983
2025-03-07T12:25:28.901 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.940 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1984
2025-03-07T12:25:28.946 INFO 192.168.8.104 <- True
2025-03-07T12:25:28.991 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1985
2025-03-07T12:25:28.997 INFO 192.168.8.104 <- True
2025-03-07T12:25:29.017 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1986
2025-03-07T12:25:29.023 INFO 192.168.8.104 <- True
2025-03-07T12:25:29.055 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1987
2025-03-07T12:25:29.061 INFO 192.168.8.104 <- True
2025-03-07T12:25:29.106 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1988
2025-03-07T12:25:29.111 INFO 192.168.8.104 <- True
2025-03-07T12:25:29.153 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1989
2025-03-07T12:25:29.159 INFO 192.168.8.104 <- True
2025-03-07T12:25:29.195 INFO 192.168.8.104 -> GET /api/v1/telescope/0/connected?ClientID=36955&ClientTransactionID=1990
2025-03-07T12:25:29.201 INFO 192.168.8.104 <- True
2025-03-07T12:25:29.485 INFO 192.168.8.104 -> GET /api/v1/telescope/0/rightascension?ClientID=36955&ClientTransactionID=1991
2025-03-07T12:25:29.505 INFO 192.168.8.104 <- 0.0
2025-03-07T12:25:29.524 INFO 192.168.8.104 -> GET /api/v1/telescope/0/declination?ClientID=36955&ClientTransactionID=1992
2025-03-07T12:25:29.543 INFO 192.168.8.104 <- 0.0
System
- Stellarium version: stellarium-24.4-qt5-win64.exe
Whoa! I just started very first steps at limited speed towards an Alpaca client. Is this only an Alpaca Device serving a Telescope? If you are already familiar with it and want to help also doing an Alpaca client, I can stop works in #4148
The actual answer is yes. We need the pointer coordinates to display on screen. Do you have a better solution? EDIT yes, probably the frequency is too high. I am not familiar with the actual TC plugin code yet.
Yes, I am writing an Alpaca driver for a custom build old telescope and would like to use Stellarium for showing the telescope position graphically.
So why so many Connected calls? I understand one before the coordinate call but why twenty? I have my own python client and it only calls connect in the beginning and assumes connected state untill disconnecting the telescope.
My very simple test client:
from alpaca.telescope import *
T = Telescope('192.168.8.102:5555', 0)
T.Connect()
print(f'Connected to {T.Name}',T.Connected)
ra=T.RightAscension
print("ra=",ra)
de=T.Declination
print("de=",de)
T.Disconnect()
You are right, this flood of connected test reads suspicious.
Wow, it seems isConnected() is called at each frame for all telescopes! That's code from 2010, but probably the connected state should be cached for a second or so? Two months ago someone else may have discovered the same for "flooding a serial connection with garbage". (#4058)
@artooksanen Can you build Stellarium from sources? In plugins/TelescopeControl/src/ASCOM/ASCOMDevice.cpp, find method ASCOMDevice::isDeviceConnected(). For reasons I cannot see, this asks the OLE connection for the connected state instead of just returning the mConnected value. This triggers an OLE call, just as you see as Alpaca API call now. Being at the very beginning of thinking myself into ASCOM, I need to understand the implication of being "connected" when all calls should be stateless.
Hello Georg!
Any progress in this? I am on vacation now and could put some programming effort into this. In my own Alpaca client (a simple text based python code) I am calling isConnected only when I am making the connection to the telescope. From then I am assuming that the telescope is connected. Also I am inquiring the telescope's status only once per second while connected.
arto
to 20.3.2025 klo 18.15 Georg Zotti @.***) kirjoitti:
@artooksanen https://github.com/artooksanen Can you build Stellarium from sources? In plugins/TelescopeControl/src/ASCOM/ASCOMDevice.cpp, find method ASCOMDevice::isDeviceConnected(). For reasons I cannot see, this asks the OLE connection for the connected state instead of just returning the mConnected value. This triggers an OLE call, just as you see as Alpaca API call now. Being at the very beginning of thinking myself into ASCOM, I need to understand the implication of being "connected" when all calls should be stateless.
— Reply to this email directly, view it on GitHub https://github.com/Stellarium/stellarium/issues/4183#issuecomment-2740998524, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ42KZHS7MWZLWAQJDWZAT2VLSSBAVCNFSM6AAAAABYREN7BOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBQHE4TQNJSGQ . You are receiving this because you were mentioned.Message ID: @.***> [image: gzotti]gzotti left a comment (Stellarium/stellarium#4183) https://github.com/Stellarium/stellarium/issues/4183#issuecomment-2740998524
@artooksanen https://github.com/artooksanen Can you build Stellarium from sources? In plugins/TelescopeControl/src/ASCOM/ASCOMDevice.cpp, find method ASCOMDevice::isDeviceConnected(). For reasons I cannot see, this asks the OLE connection for the connected state instead of just returning the mConnected value. This triggers an OLE call, just as you see as Alpaca API call now. Being at the very beginning of thinking myself into ASCOM, I need to understand the implication of being "connected" when all calls should be stateless.
— Reply to this email directly, view it on GitHub https://github.com/Stellarium/stellarium/issues/4183#issuecomment-2740998524, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ42KZHS7MWZLWAQJDWZAT2VLSSBAVCNFSM6AAAAABYREN7BOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBQHE4TQNJSGQ . You are receiving this because you were mentioned.Message ID: @.***>
-- Arto Oksanen @.*** Muurame, Finland
No, did not find time to continue, unfortunately. It may make sense to confirm commection e.g. at start of each command, or maybe even during slews, as someone could have just ripped out the cable. But in idle phases I see no use, otoh I have used the whole plugin for about 3 weeks on 10 years, so I am just sure to not qualified to decide whether it is necessary. Changing undocumented stuff, as obvious it may have been for the developer 15 years ago, is prone to have side effects.
Hi. I'm having the exact same issue. I switched to 23.2 (qt5 based) and the issue basically was unchanged
@charonishot what exact same issue do you have? You write your own Alpaca client? Or you face the well documented ASCOM problem? Please don't hijack threads when you don't add insights to the matter.
Forgive me, I'm experiencing the ASCOM issue; upon basic connection using the EZ GOTO stellarium plugin, the app either immediately crashes, or just does not allow me to slew