Signal-k + Cerbo with Raymarine network

34 views
Skip to first unread message

Al Grant

unread,
Jan 21, 2025, 2:56:28 PMJan 21
to Signal K
Good Morning,

I have a Raymarine network with mainly N2K devices (aka SeaTalk NG), a cellular ethernet/raynet modem and a Victron Cerbo GX.

Signal-K is already enabled on the Cerbo and I am looking to setup the system for two reasons:

1. I want to be able to build graphs of wind/boat speed etc;
2. I have a weird issue on my network where my Raymarine i70s dont display any wind data for about 1 second every 20 or so seconds - so I want to be able to record/inspect the data that signal-k receives re wind to see if packets are dropped etc.

I know that #1 is possible (although I dont know how yet) - what sorts of possibilities are there with #2?

I also see NodeRed is enable - is this a double up with Signal-K or are they accomplishing different things?

I feel this is going to be a exciting world of possobilities.

Al



Graham Wainright

unread,
Jan 21, 2025, 3:41:20 PMJan 21
to sig...@googlegroups.com
Hi Al

I have garmin n2k with Cebrogx and have managed to download all the ais data using python. You can have the code of you want. It's not very tidy but it'll get you into the signal k stuff. By the way i tried node red on the Cebrogx but it seemed very memory intensive and i did at one stage have to factory reset the Cebrogx to remove the node red and get it going again. Just saying be careful.

Let me know if you want the code

Graham 

--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/signalk/c2e3e139-df0b-44b7-b498-e21222cd7e04n%40googlegroups.com.

Al Grant

unread,
Jan 21, 2025, 3:51:42 PMJan 21
to sig...@googlegroups.com
Hi Graham,

Thanks - are you saying that natively signal-k does not offer anyway
to do packet inspections - kinda similar to how wireshark would if you
are familiar with that?

I take it your python code was to save ais data to a file for later review?

Al
> To view this discussion visit https://groups.google.com/d/msgid/signalk/CAMYyhgv-d965ZHBiirnhmbz__1m_O%2BLC6gBhu09C-QvxoT%2B4fw%40mail.gmail.com.



--
"Beat it punk!"
- Clint Eastwood

Graham Wainright

unread,
Jan 21, 2025, 5:31:57 PMJan 21
to sig...@googlegroups.com
Hi Al

I had some.success with rhe signalk apps but found logging in afer timing out to be an issue. So i ended up using the api.

I  am currently crossing the Atlantic but will send all I've learned once i arrive in Caribbean in 2 days.

But basically you have to tunnel into the signal k server. Something like:-

import paramiko

import time

import requests



def connect_to_victron(hostname, port, username, password, remote_port):

    try:

        # Initialize the SSH client

        ssh = paramiko.SSHClient()

        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())


        # Connect to the Victron device via SSH

        print("Connecting to Victron device...")

        ssh.connect(hostname, port=port, username=username, password=password)


        # Open an SSH tunnel to the Signal K server port (default is usually 3000 or similar)

        transport = ssh.get_transport()

        print("Setting up port forwarding...")

        channel = transport.open_channel("direct-tcpip", ("localhost", remote_port), ("127.0.0.1", 0))


        print("Connection established. Ready to access Signal K server through the tunnel.")

        # Perform any additional steps, such as making requests to the Signal K server here

        # BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB


        url = f"http://192.168.1.175:3000/signalk/v1/vessels/self"


        try:

            # Send a request to the Signal K server

            response = requests.get(url)

            response.raise_for_status()  # Raise an error for bad status codes

            data = response.json()  # Parse JSON response


            # Output the Signal K server data

            print("Signal K Server Data:", data)

        except requests.RequestException as e:

            print("Error accessing Signal K server:", e)

#BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBb

        time.sleep(10)  # Keep connection open for testing; adjust as needed


        # Close the SSH connection and tunnel after use

        channel.close()

        ssh.close()

        print("Connection closed.")


    except Exception as e:

        print(f"An error occurred: {e}")



# Replace these variables with your Victron GX device details

hostname = "192.168.1.175"  # IP of the Victron device

port = 22  # Default SSH port

username = "root"

password = "tombraider"

remote_port = 3000  # Port of the Signal K server on the Victron GX device


# Connect to the device

connect_to_victron(hostname, port, username, password, remote_port)


Teppo Kurki

unread,
Jan 23, 2025, 12:00:28 AMJan 23
to sig...@googlegroups.com
If you activate data logging for your data connections Signal K server will log all your data to hourly files. No need to fiddle with ssh and the data logged will be bit for bit the original data, prior to conversion to Signal K format.

There’s Data Fiddler that is closest to Wireshark’s inspection capabilities, where you can see what Signal K output a given input snippet generates

With signalk-to-influxdb2 plugin you can write all or some of your data to InfluxDb for later analysis and graphing.

For nmea 2000 there’s n2k-debug, a prototype of something like Wireshark for inspecting live traffic, but it is a pretty crude start.

Reply all
Reply to author
Forward
0 new messages