I’m trying to display a custom value in Cockpit as a NAMED_VALUE_FLOAT message sent from my surface computer with a Python script, but Cockpit never shows it in the MAVLink Inspector.
Please consider the python script is located on the topside PC . So i’m attempting to inject it directly into Cockpit. The Test script is the following but after i tried i’m unable to locate the paramenter inside the datalake:
#!/usr/bin/env python3
from pymavlink import mavutil
import time
# Try sending directly to BlueOS telemetry ports
TARGET_IPS = [
("udpout:192.168.2.2:14550", "Main Cockpit port"),
("udpout:192.168.2.2:14552", "Alternate telemetry"),
("udpout:192.168.2.2:14600", "Extra test port")
]
for conn, label in TARGET_IPS:
print(f"\n[TRY] Sending to {conn} ({label})")
try:
m = mavutil.mavlink_connection(conn, source_system=245, source_component=191)
for i in range(5):
value = -0.812 + 0.001 * i
m.mav.heartbeat_send(18, 8, 0, 0, 4)
m.mav.named_value_float_send(int(time.time()), b"CP_VOLT\x00\x00\x00", value)
print(f" → Sent CP_VOLT={value:.3f}")
time.sleep(1)
m.close()
except Exception as e:
print(f"[ERR] {e}")
We didn’t merge yet the consumption from MAVLink sources other than the main vehicle. Coincidently I was working on that during last week and the PR is open for review. I would ask you to test it from those binaries, which also includes some modifications on Menu>Tools>DataLake to make it easier to find your data.
To enable it, go to Menu>Settings>General on Cockpit and click “Enable Pirate Mode”. After that go to Menu>Settings>MAVLink and click “Enable DataLake variables from other systems”. Than you can use Menu>Tools>DataLake to find your data. It should be under /mavlink/system=X/component=Y being X and Y the MAVLink SystemID and ComponentID of your script.
I’ve downloaded and installed the Version 1.17.0-beta.7 . Can you confirm the “Enable DataLake variables from other systems” is something that need to be enabled somewhere? I’ve not found anything related on it.