Hi, just thought I'd post how I setup HomeSeer PI to control a couple generic WiFi relay boards I got on eBay (the kind that you telnet to on port 2000, and just enter a single ascii character to turn on/off a relay on the board).
I just created a file in the /home/homeseer directory,
Put this in it (where x.x.x.x is the IP of your network relay board):
#!/bin/sh
host=x.x.x.x
port=2000
echo $1 | nc ${host} ${port}
In HomeSeer, create an event, and set the action to "Run Another Program or Process", set it to launch /bin/sh
Set the parameters to /home/homeseer/yourfilename eo
as an example if your filename was called yourfilename, and you wanted to momentarily turn on relay 1 (e turns it on, o turns it off).
I have one relay board tied into an X10 remote to control a couple legacy X10 channels, and some other relays tied into a couple other things, and they work great this way along with HomeSeer events! I couldn't seem to get around creating the file rather than just running /bin/echo with command line parameters for some reason. I had to run /bin/sh with the file I created above.
I just created a file in the /home/homeseer directory,
Put this in it (where x.x.x.x is the IP of your network relay board):
#!/bin/sh
host=x.x.x.x
port=2000
echo $1 | nc ${host} ${port}
In HomeSeer, create an event, and set the action to "Run Another Program or Process", set it to launch /bin/sh
Set the parameters to /home/homeseer/yourfilename eo
as an example if your filename was called yourfilename, and you wanted to momentarily turn on relay 1 (e turns it on, o turns it off).
I have one relay board tied into an X10 remote to control a couple legacy X10 channels, and some other relays tied into a couple other things, and they work great this way along with HomeSeer events! I couldn't seem to get around creating the file rather than just running /bin/echo with command line parameters for some reason. I had to run /bin/sh with the file I created above.
Comment