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
#7
I was able to get rid of the error messages, but it still does not turn on the stereo receiver? Here is the latest code:
import time
import telnetlib

HOST = "192.168.1.140"
VSXCommand = "PO"
telnet = telnetlib.Telnet("192.168.1.140", 23)
time.sleep(3)
telnet.write((VSXCommand + "\n").encode('ascii'))
telnet.close()

I started a new session manually with telnet 192.168.1.140 and then typed PO and it worked fine, so I know that it works with Telnet...not sure what I have wrong in the code?

Also tried without telnetlib and does not work?
import sys
import socket
import time

hostname = "192.168.1.140"
VSXCommand = "PO"
connect = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect.connect((hostname, 23))
time.sleep(3)
connect.send((VSXCommand).encode('ascii'))
connect.send(("\n").encode('ascii'))
connect.close()
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Frames above 2000 bytes not acknowledged by client/receiver lukasz139 0 2,223 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