Skip to content
tagyoureit edited this page Apr 23, 2020 · 1 revision

Want to have a RaspberryPi Zero, or other $5 computer, sitting by your pool equipment while the main code runs elsewhere on your network? Or want to help get involved with the project and debug in an app like Netbeans?

@arrmo was super slick in getting this to run.

There are two options:

  1. Run socat each time to enable the pipe
  2. Setup a daemon to automatically start socat

The "run it each time" method

Run these commands on the remote machine

  1. sudo apt-get install socat to install socat
  2. /usr/bin/socat TCP-LISTEN:9801,fork,reuseaddr FILE:/dev/ttyUSB0,b9600,raw
  3. Setup the app parameters (below)

The "run under a daemon" method

Run these commands on the remote machine

  1. sudo apt-get install socat to install socat
  2. sudo apt-get install daemon to install daemon
  3. Copy the poolTTY file (in /scripts directory) to your remote machine directory /etc/init.d
  4. Run the following command to make the daemon run the socat upon startup: sudo update-rc.d poolTTY defaults
  5. Setup the app parameters (below)

Another alternative method

Props to @antamy. Another approach to an etc/init.d script. The script is runAtBoot.sh. See https://github.com/chovy/node-startup for instructions to use this script.

Test socat

From your local machine, you should be able to telnet to port 9801 and see incoming packets.