```html
Connecting Yamaha HARMO to Linux Autopilot
Integrating Yamaha HARMO with Linux Autopilot
The Yamaha HARMO is a beautiful electric rim-drive motor that supports NMEA 2000 (N2K) for data output. To control it via your Starlink-connected Linux PC using PyPilot or OpenCPN, you need a hardware bridge that can translate between Linux (USB/Serial) and the N2K CAN bus.
1. The Hardware: The "Cheapest Reliable" Interface
To get NMEA 2000 data into your Linux machine, you have two primary paths. One is DIY-heavy, the other is "plug-and-play."
Primary Recommendation: CANable (or any CandleLight-compatible USB-CAN adapter)
This is the most "Linux native" way. It uses the SocketCAN driver, which is built into the Linux kernel.
- The Device: CANable V2.0 or a high-quality clone (e.g., MKS CANable).
- Cost: ~$25 - $40 USD.
- Connection: You will need to sacrifice a cheap NMEA 2000 drop cable, cut one end, and wire the CAN_H and CAN_L wires to the screw terminals of the adapter.
Alternative: Yacht Devices USB Gateway (YDNU-02)
If you want galvanic isolation (protecting your Linux PC from electrical surges on the boat's N2K bus).
- Cost: ~$150 - $180 USD.
- Benefit: No wiring required. It plugs directly into an N2K T-connector and the USB port. Recognized immediately by Signal K.
2. The Software Stack
Since you are already using reverse SSH, you have the hardest part (connectivity) solved. Here is how to route the data:
- Signal K Server (The Data Broker): Install Signal K on your Linux PC. It acts as the "translator." It will take the raw CAN bus data from the Yamaha and convert it into JSON/Signalk format.
- OpenCANard / signalk-to-nmea2000: Use plugins within Signal K to read the engine data and steering angle from the HARMO.
- PyPilot: This acts as your "Brain." PyPilot can receive heading data from Signal K and send "Steer" commands back to the bus.
3. The Critical Challenge: Autopilot Control
Important Note on Steering: The Yamaha HARMO uses its own proprietary digital steering. NMEA 2000 is usually read-only for propulsion systems unless you have a specific gateway that accepts PGN 129284 (Navigation Data) or PGN 129285 (Route Information).
To make the Linux Autopilot actually move the motor:
- You must ensure the HARMO system is set to "Track" or "External Control" mode.
- Your Linux software will output NMEA 0183 sentences (like
$GPAPB), which Signal K must convert back to NMEA 2000 via your USB adapter to tell the HARMO where to go.
4. Estimated Build List (Cheapest Path)
| Item |
Est. Price |
Role |
| CANable V2 USB Adapter |
$30 |
Hardware interface to N2K bus. |
| NMEA 2000 T-Connector & Drop Cable |
$25 |
Physical tap into the Yamaha network. |
| Signal K (Software) |
$0 |
Data multiplexer. |
| PyPilot (Software) |
$0 |
Autopilot algorithms. |
| Total Estimated |
$55 USD |
(Assuming Linux PC and HARMO already exist) |
5. Implementation Steps
- Install
can-utils on Linux: sudo apt-get install can-utils.
- Bring the interface up:
sudo ip link set can0 up type can bitrate 250000.
- In Signal K, add a "CANbus" data connection pointing to
can0.
- Verify you see Yamaha engine/steering data in the Signal K instrument panel.
- Configure the OpenCPN Autopilot plugin to output APB/RMB sentences to Signal K, which will then push them to the HARMO via the CANable adapter.
```