The TCP Binary Sensor is a type of TCP Sensor which is either “off” or “on”. In order to use this sensor type, in addition to the configuration for the TCP Sensor, you must supply a
value_on value to represent what is returned when the device is turned on.
To enable this sensor, add the following lines to your
# Example configuration.yaml entry binary_sensor: - platform: tcp name: TCP Binary Sensor host: IP_ADDRESS port: PORT payload: "r State\n" value_on: 1 timeout: 5
(string)(Optional)The name you’d like to give the sensor in Home Assistant.
Default value: TCP Sensor
(string)(Required)The hostname/IP address to connect to.
(integer)(Required)The port to connect to the host on.
(string)(Required)What to send to the host in order to get the response we’re interested in.
(string)(Required)The value returned when the device is “on”.
Default value: entire response is the value
(integer)(Optional)The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default.
Default value: 1024
(integer)(Optional)How long in seconds to wait for a response from the service before giving up and disconnecting.
Default value: 10