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_move for 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_move starts movement for dur_sec seconds then auto-stops

  • iscope_stop_view stops any ongoing movement immediately

  • UDP scan_iscope on port 4720 must be sent before TCP connect (guest mode unlock)

  • "verify": true is 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_dict

  • seestar-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: object

Direct TCP JSON-RPC client to the Seestar native API.

Thread-safe: move() and stop() 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.

disconnect() → None[source]

Close the TCP connection and stop background threads.

property firmware_ver_int: int
property is_connected: bool
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.

exception argos.core.seestar.native_client.SeestarNativeError[source]

Bases: Exception

Raised when a native client operation fails.