API call using Javascript or Python

I have one of these Ethernet Relays (https://store.ncd.io/product/ethernet-relay-5-10-amp/) and would like to control it programmatically either through an https request or an API call to specified endpoint using Javascript or Python. Is there documentation on how to access any API endpoints or set them up to be controlled via Javascript or Python?

Hi,

Its generally preferable to use the API calls instead of HTTP for faster response times, lower overhead, and its better supported.

These controllers have a command set that can be used over a TCP socket (default) or UDP messages.

We have a library for Python at: GitHub - ncd-io/Industrial-Relay-Control that contains examples for controlling the relay over the TCP connection in the Examples directory. The library should be relatively portable from Python to Javascript if you prefer nodejs.

Great! I will look through this and I see there’s some examples. Appreciate it!