A script to read SeaTalk1 from the Raspberry Pi GPIO using pigpio
You can read out the SeaTalk1 bus from old Raymarine devices using this script. The Script sends the sentences via UDP to the listener (opencpn/SignalK and potentially others. These translate the sentences to NMEA0183 or similar.
Preferably, use an MCS-board: Connect the yellow SeaTalk1 signal wire to one of the inputs (In1-In4).
You can also use the Openplotter-MCS app, which includes this script:
https://www.gedad.de/shop/gecos-wired/#cc-m-product-15562399022
https://www.gedad.de/2019/12/27/gedad-marine-control-server/
If you want to use your own hardware, connect the yellow SeaTalk1 wire via an optocoupler to any GPIO. The GPIO number in the script must be edited to match the GPIO port number used!
Example:
Info: If you get problems with your ST1-Bus, increase the 4K7 Resistor on the ST line to a higher Value. On some Modules the 4K7 Resistor seems to less.
The Software uses pigpio for bitbanging 9-bit mode. Thus, you have to enable pigpio:
Usually, pigpio is already installed on your Raspberry Pi. Else:
sudo apt-get install pigpio
To start pigpio:
sudo pigpiod
To enable pigpio by default:
sudo systemctl enable pigpiod
Download STALK_read.py
git clone https://github.com/Thomas-GeDaD/Seatalk1-Raspi-reader
On top of the script, edit the GPIO, Port, and IP to match your setup.
Then start the script:
sudo python /home/pi//Seatalk1-Raspi-reader/STALK_read.py
To check if UDP sends correctly, check in another terminal:
nc -ulkw 0 ipaddress port
If you need help or want changes let me know ...
(tested with Raspberry Pi 3/4B and pigpio version V1.71)