Python Gateway YDPG-01

The Yacht Devices Python Gateway connects NMEA 0183 devices to the NMEA 2000 network and provides unbeatable data processing and filtering capabilities using the power of the Python 3 programming language and the Yacht Devices library.

This can be used to perform the following tasks:

  • Create custom gateways. In the case of proprietary or non-standard messages, the Gateway is the best platform for rapid development thanks to the flexibility of the Python language and power of the Yacht Devices NMEA library.
  • Ensure proper functioning of the equipment. For example, with a few lines of code you can create a virtual NMEA 2000 or NMEA 0183 depth sounder that sends the corrected value from a real instrument or adds sensor offset data.
  • Ensure equipment compatibility. The Gateway allows you to set different speeds for NMEA 0183 transmit and receive lines. User code can forward messages, add checksums (not required in early NMEA versions), fix transducer names in sentences, etc.
  • Not just NMEA. You can use the Gateway on any CAN network (J1939, BRP CAN, CANOpen) with speeds up to 1 Mbps and with any RS-232 or RS-422 device.
  • Diagnose faults. Just like in a hacker movie, you can connect your laptop via USB and type commands into the terminal to view live network data or run tests.
  • Log network data. An internal 16 MB flash drive allows you to create data logging or streaming applications. For example, you can create a digital log book or collect data for your own depth chart.

 

Scheme of a typical installation

Picture 1. Python Gateway YDPG-01R and YDPG_01N (see more images)

The Gateway is equipped with an NMEA 2000 (CAN bus) interface with NMEA 2000 Micro Male or SeaTalk NG connector depending on the model, two serial ports (one NMEA 0183 TX and one RX), and a USB Mini Type-B connector that provides both USB serial port and USB disc interfaces. NMEA 2000 and NMEA 0183 interfaces have high voltage galvanic isolation.

 

Order ($249 USD) User Manual (PDF)

Order now and get our special offer: free world wide delivery!

 

User programs can be copied from a PC to the Gateway's internal disc using the USB connection. We recommend the free and open source Thonny IDE to work with the Gateway. This simple IDE allows to edit files directly on the Gateway, highlight syntax, save backup files to PC, run and stop your code, interact with REPL, plot variables, etc.


   # Sends data from the internal voltmeter in PGN "Battery Status"
   import struct

   def send_battery_status():
        i16 = int(round(ydpg.busvoltage() * 100))
        data = struct.pack('<BhhHB', 0, i16, 0x7FFF, 0xFFFF, 0xFF)
        n2k.sendpgn(data, 127508)

   while True:
        send_battery_status()
        time.sleep(1.5)

Picture 2. Example of a program

More code examples:

To learn more about Gateway programming, please visit the Yacht Devices library page. Programming the Gateway requires knowledge of NMEA 2000 and NMEA 0183. A copy of the NMEA Standard can be obtained from the National Marine Electronics Association: https://www.nmea.org.

 

Drawing of Python Gateway YDPG-01

Picture 3. Drawing of Python Gateway YDPG-01N and YDPG-01R (with SeaTalk NG connector)

For additional technical details, please see the User Guide and FAQ.

 

View models and prices