Hello,
i start the plugin Network Event Sender.
The only command i have is "map".
No documentation, nothing. How can i use it ?
I need send a string over IP to a global cache box.
192.168.11.36 Port 4999
Data : 3,1,3,1 (no cr)
Thanks
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Need help with Network sender
Re: Need help with Network sender
Check out my response to this same question, but on the thread for my network broadcaster. Basically the network sender uses the old "Girder" handshake, so you can't just send arbitrary data on the network directly with it. But you can write a quick python script to do it:
http://www.eventghost.org/forum/viewtop ... 272#p12272
~K
http://www.eventghost.org/forum/viewtop ... 272#p12272
~K
Re: Need help with Network sender
Thank you, but my testscipt do not work.
python script :
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("192.168.11.36", 4999)) # Specify the target device and port number
print s.recv(1024) # Writes anything it tells you when it first connects to the log for troubleshooting. If there's no initial connect string, you can probably remove this line
s.send("1,1,0,0\n")
s.send("3,1,1,3\n") # You could also do eg.event.payload[0] and pass commands to this script from other events.
print s.recv(1024) # Writes anything it tells you after your command is sent to the log for troubleshooting
s.close()
In the log appear a python script, but after that, eg hung up.
No command are send to the globalcache.
The data, i want to send are four bytes. Is the string with the commas correct ?
python script :
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("192.168.11.36", 4999)) # Specify the target device and port number
print s.recv(1024) # Writes anything it tells you when it first connects to the log for troubleshooting. If there's no initial connect string, you can probably remove this line
s.send("1,1,0,0\n")
s.send("3,1,1,3\n") # You could also do eg.event.payload[0] and pass commands to this script from other events.
print s.recv(1024) # Writes anything it tells you after your command is sent to the log for troubleshooting
s.close()
In the log appear a python script, but after that, eg hung up.
No command are send to the globalcache.
The data, i want to send are four bytes. Is the string with the commas correct ?
Re: Need help with Network sender
You should write it as "\x03\x01\x03\x01" if you want to send literal bytes. Check python docs about string literals for reference http://docs.python.org/reference/lexica ... g-literals
Re: Need help with Network sender
it works !
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '192.168.11.36'
PORT = 4999
s.connect((HOST, PORT)) # the Host in " " works too.
s.send('\x08\x01\x01\x08') # in my case, no LF or CR needed
s.close()
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '192.168.11.36'
PORT = 4999
s.connect((HOST, PORT)) # the Host in " " works too.
s.send('\x08\x01\x01\x08') # in my case, no LF or CR needed
s.close()