Python Forum
Basic TCP to Pioneer VSX-1021 Stereo Receiver
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic TCP to Pioneer VSX-1021 Stereo Receiver
#6
sparkz_alot - I'm using current version of Python, I had just copied and pasted from old scripts found online to create the script...tried removing the raw, but same outcome.

Wavic - Thanks again for the input. I ran it in a terminal window. It does not appear to me like the Telnet commands are getting processed. It immediately starts typing the PO on the screen and then I have to press the enter key to get it to continue. Then it indicates:
Traceback <most recent call last>:
File "...path to python Scripts folder\aaa.py", line 9, in <module> telnet.write<VSX Command>
File "C:\Program Files\Python36-32\lib\telnetlib.py", line 287, in write if IAC in buffer:
TypeError: 'in <string>' requires string as left operand, not bytes

Here is the current aaa.py script:
import telnetlib

telnet = telnetlib.Telnet()

HOST = "192.168.1.140"
VSXCommand = input("PO")

telnet.open(HOST)
telnet.write(VSXCommand)
telnet.close()

I know its port 23 because I can get it to work using a telnet session from the command prompt...what is strange though, is that if I type telnet from the command prompt and try to do an interactive start, it doesn't work...I have to type telnet 192.168.1.140 to start it off and it works...then I just type PO and the Stereo Receiver turns on and there is some feedback as to the status of the receiver in the telnet session...I press the control key and the ] and it exits and then I type quit and it ends the telnet session, then I type exit to close command prompt.

Thank you again for all of your help! I have probably spent 10 hours trying to figure this out :)
Reply


Messages In This Thread
RE: Basic TCP to Pioneer VSX-1021 Stereo Receiver - by Bpet - Oct-22-2017, 03:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Frames above 2000 bytes not acknowledged by client/receiver lukasz139 0 2,190 Aug-24-2018, 06:34 PM
Last Post: lukasz139

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020