I still have a problem using this corrected code, my mount is not moving, can you send me an example code please ?
Because the library lacks of documentation....

Thank you per advice !
Astronomically,

Enzo

Here's the modified code :

const { newSwitchVector, INDIClient } = require("indi-client");

const indiHost = process.env.INDI_HOST || "127.0.0.1";
const indiPort = process.env.INDI_PORT ? parseInt(process.env.INDI_PORT) : 7624;

const indiClient = new INDIClient(indiHost, indiPort);

indiClient.on("connect", async () => {
indiClient.getProperties();

console.log("indi connection connected");

// Create a newSwitchVector object for the telescope coordinates
const slewCommand = new newSwitchVector(
"ASCOM OnStep Telescope",
"TELESCOPE_MOTION_NS",
new Date(),
[
{
name: "MOTION_NORTH",
value: "On",
},
{
name: "MOTION_SOUTH",
value: "Off",
},
]
);

// Send the slew command to the telescope
await indiClient.send(slewCommand);
});

indiClient.on("close", () => {
console.log("indi connection closed");
});

// Connect to the INDI server
indiClient.connect();

Read More...