telnet shell-script in Automator I'm partly new to Automator and since there is no application for Mac to control my Pioneer AVR I use some commands in the Terminal. But I'd like to automate some of my commands with the terminal.
I have to say that I don't know much about the Terminal and Networking. But I know that it's not so easy in Automator or in Xcode (with swift) like in the Terminal. 
In the Terminal I use this code:

telnet vsx-923.fritz.box.


Response:

Trying 123.456.789.10...
Connected to vsx-923.fritz.box.
Escape character is '^]'.
BridgeCo AG Telnet server


vd //which means Volume down


Response:

FL004D2E564F4C20202D33302E356442
VOL100


In Automator in the Shell-Script I typed 

telnet vsx-923.fritz.box.
vd


Where I got the error "Connection closed by foreign host."
In a forum I found out that I had to use echo
why I get a response now.
But If I type in

telnet vsx-923.fritz.box.
echo 'vd'


I only get the response that the avr is connected but for the Volume I don't get a response.

In the future hopefully I am able to build an application, but for now It'll be enough to make it this way.
I hope you can help me with the solution.
Here you get the PDF of the pioneer commands if you'd like to have them. http://www.pioneerelectronics.com/StaticFiles/PUSA/Files/Home%20Custom%20Install/VSX-1120-K-RS232.PDF

Thanks in advance.

Jonas
Incorporating Automator might be unnecessary for what you're trying to achieve. Perhaps it would be more suitable to just write a bash shell script. If you've never written a bash shell script before, it's easy to get started. You can simply type out the commands exactly how you've already demonstrated, but into some kind of text editor or notepad software, and save it with an .sh extension on the end.  

When I first started learning about this stuff years ago I found nano to be a quick and easy text editor for learning and writing new material. If you want to give it a try you can start by just typing nano in the terminal.  

If necessary, you can grant executive permission with:  

chmod +x ./example.sh


Let me know if this helps put you on the right track or not. If not, we can just try something else. Also, if you want/need you can reply here or contact me privately via chat.