argos.core.seestar¶
Native JSON-RPC 2.0 TCP client for the Seestar S30 Pro.
- The Seestar exposes two separate APIs:
ASCOM Alpaca HTTP → standard telescope control (GoTo, tracking, position…)
Native JSON-RPC TCP (port 4700) → features not in Alpaca, notably
scope_speed_movefor continuous manual jogging.
- Protocol details (from seestar_alp / smart-underworld):
Raw TCP socket, port 4700
JSON-RPC 2.0, messages delimited by CRLF (rn)
Direction angles use compass convention: 0=North, 90=East, 180=South, 270=West
scope_speed_movestarts movement fordur_secseconds then auto-stopsiscope_stop_viewstops any ongoing movement immediatelyUDP scan_iscope on port 4720 must be sent before TCP connect (guest mode unlock)
"verify": trueis required in params for firmware 2582–2705 only; firmware ≥ 2706 is SSL-authenticated and rejects verify in dict params.
- Architecture — three background threads:
seestar-reader: continuously drains socket into response_dictseestar-heartbeat: sends scope_get_equ_coord every 10s (keeps TCP alive)Caller thread : sends commands and polls response_dict (up to 3s)
Usage:
client = SeestarNativeClient("192.168.1.42")
client.connect()
client.move(angle=0, speed=3000, dur_sec=2) # move North for 2s
client.stop()
client.disconnect()
- class argos.core.seestar.native_client.SeestarNativeClient(host: str, port: int = 4700)[source]¶
Bases:
objectDirect TCP JSON-RPC client to the Seestar native API.
Thread-safe:
move()andstop()can be called from any thread.Internally maintains: - A reader thread that continuously drains socket responses into a dict. - A heartbeat thread that pings the device every 10s to keep TCP alive.
- Parameters:
host – IP address of the Seestar device.
port – TCP port (default 4700).
- connect() None[source]¶
Open the TCP connection and start background threads.
Sends a UDP scan_iscope handshake on port 4720 first — the Seestar requires this to release guest-mode lock before accepting TCP control.
- Raises:
SeestarNativeError – If the connection cannot be established.
- move(angle: int, speed: int, dur_sec: int = 2) None[source]¶
Move the mount continuously in the given direction.
- Parameters:
angle – Compass direction — 0=North, 90=East, 180=South, 270=West.
speed – Movement speed. Typical range 500–8000.
dur_sec – Duration the mount will move (seconds, default 2).
- Raises:
SeestarNativeError – If the command cannot be sent.
- stop() None[source]¶
Stop any ongoing movement immediately.
- Raises:
SeestarNativeError – If the command cannot be sent.