question

mike-r avatar image
mike-r asked

How to get VE Can data to dBus

I have a non-Victron AC and DC NMEA 2000 monitoring system on my boat. I have the NMEA 2000 bus connected to my Cerbo. I would like to get this data from the VE Can bus to the dbus so that I can see the AC and DC data on VRM and also on the html app via my Garmin MFD. I have done some research and I know that I would need to create a script to do this. I have also seen some dummy examples and am looking for more advice on how to do this along with how to install the script. I know that I need to get into the command line in order to do this (and have been successful in doing so via Putty), but I don't have experience in Linux. Any additional help would be greatly appreciated.

VE.Can
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
bathnm avatar image
bathnm answered ·

@Mike R

How much CAN network protocol experience and software development experience do you have? This is not simple or easy.

If the Cerbo is already connected to the N2K network and it has not detected the devices via the N2K network, then there is a likelihood that they are not suing standard means of identifying themselves on the N2K network.

So it means you have to do this yourself. What is required is

  1. Identify the N2K device and its CAN network address. Note due to the underlying CAN protocol definition a device can move addresses, so your code will not only have to identify it's address on startup, but also if it happens too change address.
  2. Once you have the messages from the given device, you need to decode these. The NMEA2000 standard is closed, aka you need to purchase it from NMEA. Alternatively us open source libraries and information too reverse engineer the messages
  3. Once you have the messages, you can decode them and feed them into dBus, modelling one of the existing devices/services if you want them available on the HTML app.

This is not a half dozen or so lines of script, it is a significant development and code writing in either C, C++ or Python. Finding an open source NMEA2000 library that will do a lot of the low level protocol work for you will significantly reduce the code, but you still have a lot of logic to work through in order to extract the the messages broadcast on the CAN network and load the data into dBus.

I doubt anyone will give you any further guidance than this. So a few pointers.

  • research dbus and the Victron use of it and the data elements available by service. A google search will return various useful wiki pages with a lot of good information.
  • research can and open source libraries. Again a good google will return a lot of useful information and a very good one source NMEA2000/RV-C library. Be aware that this is written in C++ and to use it you will need a good level of C/C++ programming background.

My personal advise, based on what you have written, except the system for what it is and maybe look at the Garmin MFD and see what PGNs it will read and display related to AC and DC systems and compare this with what the non Victron equipment is sending out. Accept that if there is not a good match, then what you want will be really difficult without significant knowledge.

Also note that any certified NMEA2000 device, must provide details of what PGNs it transmits and what it receives. For Victron a good starting point is here and here

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mike-r avatar image mike-r commented ·
Thanks for the tips. I hadn’t considered that Victron would be using different NMEA 2000 pgns but after a couple of minutes of looking that may be the case for some of the data. I do have much more experience with NMEA 2000 and if that was the only thing it wouldn’t be a problem. I have programmed an arduino on my boat that does something similar for rudder position (my Garmin MFD needs rudder position and my boat outputs rudder angle si my arduino takes care of that) and a couple of other things. But at least some of the data looks to be the same between Czone and Victron so some of it would still be good. Which gets back to the dBus programming which is where I need more help.
0 Likes 0 ·
seamaster avatar image
seamaster answered ·

@Mike R any progress on that? i have some NMEA2000 AC Monitors and DC Current meters that I would like to get on the dbus and show on venus os


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mike-r avatar image mike-r commented ·

I still haven’t found much help on this so haven’t pursued it further for now. If you have ideas on how to go about this I would love to see them.

0 Likes 0 ·

Related Resources

Additional resources still need to be added for this topic