Get metadata and/or internet from carplay

Hello
Was wondering if there is anyway to get either the internet passed on to the RPI from the carplay dongle and/or some metadata from the carplay instance (like what song is currently playing) so that another script running on the RPI use it for interesting applications/UI built around carplay?

Thanks!

Hi,

This is implemented, although I believe it may only work with the wireless dongles for some reason! The socket that sends carplay messages from node-carplay sends out a “media” event, this contains current track details, even the album art also gets sent

1 Like

Hey, thanks for the info! I do have the wireless version!
I have basically 0 knowledge of node and/or react, so before I dive into it I wanted to ask you what the difference is between react-carplay and node-carplay?
It seems like node-carplay is more of a library rather than an actual implementation, but I could be wrong. Is there a way to “run” node-carplay i.e launch a carplay window similar to react-carplay? If so, can you guide me as to how it can be done?

To add to that, it looks like there is a socket connection being created. I wonder if this means another script, say a python script, could also sniff some messages being sent?

Hi, yes correct, it creates a socket.io instance that anything should be able to connect to. I’ll put some more info on here later.

But yes node-carplay does all the leg work of communicating with the dongle, parsing the messages, and then sending out video, audio and also status data.

Oh that seems like something I might be able to use then! Would appreciate more info!
It shoud work when running react-carplay too then, right? While react-carplay is running I am trying to get the python script to connect to the socket

import websocket

ws = websocket.WebSocket()
ws.connect('ws://localhost:3001')

But I am getting a connection refused error :frowning:

Yeah it needs to be a socket.io instance, the connection details are here

Socket.io has a library for python, python-socketio — python-socketio documentation