Hi there all! I am looking to control my AVR450 through the internet using a python script. I managed to establish a connection to the receiver but i cant succesfully seem to send a message through.
My code sofar:
import socket
#Simply change the host and port values
host = '192.168.178.31'
port = 50000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect((host, port))
s.send("21 01 08 02 10 10 0D")
s.shutdown(2)
print("Success connecting to ")
print(host," on port: ",str(port))
except socket.error as e:
print("Cannot connect to ")
print(host," on port: ",str(port))
print(e)
When i run this script it says connection is succesfull. However i am having the idea that i am missing the boat when it comes to sending the hex code....
Anyone who got this running and willing to help me out?
Thanks in advance!
My code sofar:
import socket
#Simply change the host and port values
host = '192.168.178.31'
port = 50000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect((host, port))
s.send("21 01 08 02 10 10 0D")
s.shutdown(2)
print("Success connecting to ")
print(host," on port: ",str(port))
except socket.error as e:
print("Cannot connect to ")
print(host," on port: ",str(port))
print(e)
When i run this script it says connection is succesfull. However i am having the idea that i am missing the boat when it comes to sending the hex code....
Anyone who got this running and willing to help me out?
Thanks in advance!