Problems with carrige return with echo command

I am trying to send the command “PWR OFF” to my projector. I tried bot these commands:

'echo "PWR ON\r" | nc 4999'
'echo -e "PWR OFF\r" | nc 4999'

But neither works.

This other command works fine:

'echo "9120a" | nc 23'

So i think the problem is with the command itself, not the echo-function itself.

Maybe try using ‘\n’ instead of ‘\r’

Thanks, tried that but doesn’t seem to work either.

I tried using putty, and a “raw” connection, with the following parameters:

Then i wrote PWR ON and hit enter in the terminal. That worked fine. So i think i am doing something wrong with the carrige return part in HA.

maybe one of these will work:

  1. \n\n
  2. \r\n
  3. \r\n\r\n

Thanks, I tried all three, with our with -e and none seemed to work.