```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.

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).

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:

  1. 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.
  2. OpenCANard / signalk-to-nmea2000: Use plugins within Signal K to read the engine data and steering angle from the HARMO.
  3. 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:

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

  1. Install can-utils on Linux: sudo apt-get install can-utils.
  2. Bring the interface up: sudo ip link set can0 up type can bitrate 250000.
  3. In Signal K, add a "CANbus" data connection pointing to can0.
  4. Verify you see Yamaha engine/steering data in the Signal K instrument panel.
  5. 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.
```