How do I send a carriage return with serial port commander?

How do I send a carriage return with serial port commander? I want to send this to my LG TV. ka 01 00(CR) I try ka 01 00 0D to no avail. I can send it to hyper terminal (ht) on my laptop. From ht on the laptop to the TV I send ka 01 00 and hit enter. Using ka 01 00 and ok on RPI doesn’t work and by the way I have to use an external keyboard as the on screen one didn’t work. Typing the same and enter on the keyboard doesn’t work. I’ve tried the decimal equivalent characters to no avail. Also can the string be saved? It works once from trigger to my laptop and then is gone, doesn’t get tied to the outgoing events button.

Please try “ka 01 00\n” if that doesn’t work try “ka 01 00\r\n”

This plug-in is supposed to be used together with rules or scripts. So you define a command string in a rule, and that rule might be triggered manually if tagged as a scene.


I’m thinking about extending the LG plug-in with those serial-port commands, but that will take some time - there several other plug-ins in the dev queue.

Bernhard

1 Like

Thanks, two things that keep me from using \n\r etc are the on screen keyboard is British and closes as soon as I touch a key and a usb keyboard also may act British, can’t do \ . \r should be return that I need, \n should be new line, don’t need. I try on a Win 10 laptop to no avail. Maybe nymea still can’t send a cr that way. I’ll see if I can figure out rules and scripts. Thanks.

I fixed the British keyboard issue, I thought the little globe key was web browser. In any case when trying to use the keyboard to enter a trigger it closes the keyboard. I saw where someone else had that issue and believe a fix was made but can’t find that thread again. I can use an external keyboard. I have tested sending strings to hyper terminal (ht) on my laptop and can get them thru. I can use ht to turn off my TV using ka 01 00 and then enter from keyboard. That works from nymea trigger input to ht when I press ok but it still won’t work to turn off the TV. When I research using a USB to serial from RPI I only find coming off the IO pins to serial. The USB adapter does show up in nymea. I don’t know if it is a signal level issue or what. Maybe an issue with the RPI keyboard being British, will try now that I fixed that. That made no difference. Just wondering if there is an issue because the onscreen keyboard disappears when touched. I did some research and it looks like you can’t use a USB to serial adapter to create a full blown RS232 port. You have to come off the GPIO pins with an FTDI adapter. I’ve used these programming Arduinos. I think the reason I can send to my laptop is the RPI is then acting like a DCE device and not a DTE that can control my TV. I found a HAT for the Pi that can provide four USB that can be adapted to serial. IMHO anyway, I could be thinking wrong.