--- title: "Pool’nX TCP client: read and control the pool over TCP (port 50000)" description: Allow the IP address of a supervisor or PLC in Pool’nX, then read the pool statuses and send pool commands over TCP on port 50000 of the gateway. canonical: https://wiki.can-nx.com/en/guides/pool-tcp-client/ language: en product: Pool’nX audience: - administrateur - installateur context: "Pool’nX on the local network: Options, IP addresses of TCP clients, port 50000" --- # Pool’nX TCP client: read and control the pool over TCP (port 50000) Context: Pool’nX on the local network: Options, IP addresses of TCP clients, port 50000 In addition to the KNX bus, Pool’nX exposes the pool’s statuses and commands on a TCP server, port 50000 of its local network. An authorized supervisor, PLC or home automation system reads the values and sends commands with short text messages. Intended for the integrator who connects the pool to a non-KNX system. For the KNX bus, follow [the KNX statuses](https://wiki.can-nx.com/en/guides/pool-knx-status/) and [the KNX commands](https://wiki.can-nx.com/en/guides/pool-knx-commands/). ## Before you start - Note the IP address of the Pool’nX, shown as **Local IP address** on its Can’nX Cloud page, and the IP address of the client on the same network. - The client must reach the Pool’nX with this IP address, with no address translation between the two. ## Allow the client 1. In the **Pool'nX** window, open **Options** with the gear icon button. 2. In **IP addresses of TCP clients**, enter the client’s IP address, for example **192.168.1.50** (example). 3. Turn on the row’s switch. 4. Click **Save**. **Success!** confirms the save. A connection from another address, or with the switch off, receives a message starting with **Connection Refused**, then is closed. ## Exchange messages with Pool’nX Connect the client over TCP to port 50000 of the Pool’nX. Each message is a text ending with two asterisks. | Direction | Message | Effect | | --- | --- | --- | | Pool’nX to client | `key:value**`, for example `tempWater:27.5**` (example) | One status value per message | | Client to Pool’nX | `requestUpdate**` | Reads the controller again and resends all statuses | | Client to Pool’nX | `key:value**`, for example `aux1:1**` (example) | Sends the matching command to the controller | - On connection, Pool’nX reads the controller again and sends all statuses that have a value. - Pool’nX then sends the statuses at every reading, whether their row is ticked **Active** or not in the KNX table. - Messages are sent one by one, about every 50 milliseconds. - The value of a command is read as a whole number: the decimal part is ignored. - Send one message at a time: several messages joined in the same send are not recognized. The keys and accepted values are those of the [Klereo](https://wiki.can-nx.com/en/guides/pool-klereo-knx/) and [PoolCop](https://wiki.can-nx.com/en/guides/pool-poolcop-knx/) tables. ## Check the result 1. Connect a TCP test tool from the allowed IP address: the statuses arrive as `key:value**`. 2. Send `requestUpdate**`: the statuses are sent again. 3. Send a test command, then check **Last event** in **Pool Commands** and the state in **Pool Status**. ## Troubleshooting | Symptom | Cause and action | | --- | --- | | **Connection Refused** message, then the connection closes | The IP address seen by the Pool’nX is not the allowed one, or the switch is off. Correct **IP addresses of TCP clients** and save. | | Connection impossible | Check the local IP address of the Pool’nX, port 50000 and the network between the two devices. | | Command with no effect | Check the key, the value and the `**` terminator. A value outside the controller’s list is not passed on. | See also [Pool’nX troubleshooting](https://wiki.can-nx.com/en/guides/pool-help/). French labels: **Options**, **Adresse IP du client TCP**, **Enregistrer**.