Interpretate TCP IP binary_sensor awnser

Hello,
i try to get the status of our projector via TCP IP.
In the picture you can see what I send and the awnser from my device for “The projector ist ON”

I tryed different things now in my config, but it leads to nothing so far (i’m pritty new in HA)

One of my first trys so far:

binary_sensor:

  - platform: tcp
    host: 192.169.4.4
    port: 1024
    payload: "00QPW\r"
    name: Projector Status
    value_on: 00001

I appreciate every hint!

This look like something that a Restful interface could be used for.

Thank you! But now i have the same problem, how to filter the incoming data for the right value?

I’m only interested in the „0“ or „1“ in the end.

What do you get?

My incoming data is “NTCONTROL 0\r00001\r” for ON
and “NTCONTROL 0\r00000\r” for OFF

You might have to make an binary sensor based on that restful sensor then.

template:
  - binary_sensor:
      - name: "Projector state"
        state: >
          {% if is_state('sensor.restful', 'NTCONTROL 0\r00001\r') %}
            on
          {% elif is_state('sensor.restful', 'NTCONTROL 0\r00000\r') %}
            off
          {% else %}
            unknown
          {% endif %}