cryxli / sr201

Protocol example for SR-201 Series network relay
MIT License
32 stars 22 forks source link

Netcat does not send the command On o Off #11

Open StefanoVitale69 opened 1 year ago

StefanoVitale69 commented 1 year ago

HI, I use the SR201-server with Home Assistant I would like to use the sr201-server command line with netcat on windows 10. But if I use echo -n "11" | nc -n -w 1 192.168.1.100 6722 does not send the command but only reads the status. And as if he does not see "11" I have tried so many ways but it doesn't send commands it always reads only the status. How can I fix? Screenshot (120)

StefanoVitale69 commented 1 year ago

It's strange because with Putty I can turn the relays on or off. But I would like to use netcat to create an executable .bat file to run at set times so as to compensate for the lack of a clock on the board

cryxli commented 1 year ago

It seems Microsoft is blocking everything. You may want to try another/newer version of netcat: https://nmap.org/ncat/ Or, you may want to look into another scripting language that may send bytes over sockets. Python comes to mind: https://www.python.org

With Win10, I don't see a way, at the moment.

dangtrungluong commented 4 months ago

it work. send binary file