question

vassilis-bourdakis avatar image
vassilis-bourdakis asked

V2.80 Large: getting N2K temp and tank data in VenusOS (vecan-dbus?) and enhanced GUI tools

morning all,

system works fine following the upgrade to 2.80Large20, very happy!

Took me some time to get all my signalk mods back onboard and now all the data I want are channelled to influx and grafana.


Now, having installed kwindrem tools, I realised that I can now have temps (inside, outside, water, fridge/freezer, etc) as well as the three tanks (fresh, black, diesel) shown on this same screen which is a great advantage in not having to turn on any garmin displays (in my case) to view the obvious (running out of water, or something...) thing is that the values don't "pass on" automagically, so need some work. Kwindrem tried to help me (see here this github discussion: https://github.com/kwindrem/GuiMods/issues/13# ) to no avail. I did learn a few things out of that discussion, but no firm conclusions, hence turning to here.

One suggestion is that my system misses vecan-dbus service which is indeed not running as seen on my posts on the github thread. Now, my system has a BMV and a MPPT30/100 hooked up with usb cables to the rpi 3B+. The current multiplus is v.old and doesn't feature ve.bus or whatever the new ones have, so cannot connect it to my rpi. I'm in the process of upgrading it but will be some time before I do so.

So, to reach a conclusion/question:

how can I get the N2K PGNs/data that flow through the WAVESHARE HAT on my pi and happily get into signalk and off to influx, be "visible" (not sure that's the right word!) to VenusOS and thus accessible from kwindrem excellent gui tools?

what am I missing?


cheers

V.



VE.Bus
2 |3000

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

3 Answers
vassilis-bourdakis avatar image
vassilis-bourdakis answered ·

closing the thread:

1. if N2K tank data are setup according to spec [device configured for tanks only, multiple tanks sent with individual IDs] they'll appear on venusOS with GuiMods

2. N2K temp data are not supported

3. If something's wrong, try reinstalling @Kevin Windrem SetupHelper et al. In my case, following all this editing taking place it somehow got the can1 pointers on /opt/victronenerge/system/vecan-dbus.can0 . As a result system was ALWAYS trying to start vecan-dbus.can0 but was failing (easy to find it by checking the run log..). Editied it back to point to can0 and rebooted, everything is running fine!

again many thanks to @mvader (Victron Energy) and @Kevin Windrem

V.

2 |3000

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

vassilis-bourdakis avatar image
vassilis-bourdakis answered ·

@mvader (Victron Energy) could be that your reply in the above issue is relevant to what I'm asking?

https://community.victronenergy.com/questions/46344/vecan-dbus-services-disappear-if-gui-isnt-running.html

just searching about with not much luck...

V.

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.

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

Hi Vassilis, I'm sorry, but reading your question I don't really understand it. What information are you trying to get, and from where to where?


Is it tank data and temperature data from SignalK into Venus OS? Then look at the signalk-venus plugin to see what is supported, and what is not.


Or is there data on the N2K network that you want to read directly into Venus OS? From N2K we only support tank data. Not temperature data. And tank data has some limitations.


And to read data from N2K, indeed the vecan-dbus process needs to be running and configured propery. Which is taken care of by the gui. And how to set that up exactly is documented afaik. For example here: https://github.com/victronenergy/venus/wiki/RaspberryPi-CAN-Interfaces..


I hope that helps

0 Likes 0 ·
vassilis-bourdakis avatar image
vassilis-bourdakis answered ·

good morning Matthijs,

apologies, always trying to formulate my Qs in a way that will make easier you knowledgeable lot spent least time comprehending and replying. Not always succeeding though! Problem is that I'm still confused on the internals of what I'm trying to achieve, so please bear with me:

Following the wiki and using kwindrem https://github.com/kwindrem/VeCanSetup scripts I have my WAVESHARE HAT working fine. Now I define fine as in data from half a dozen N2K devices sending many PGNs get to the pi, signalk interprets them and sends them off to influxDB and then grafana. This in my mind means that N2K Input to rpi h/w is functioning.

I want to use some of that data with kwindrem's gui tools on the 7in rpi screen. I wrongly thought that it would be transparent/automatic. It isn't, fine! so I'm now at the stage of figuring out how to do it.

System has only got 2 VE.Direct devices connected to it via USB. Guess that's why vecan-dbus is not running as a service, may be wrong on that.You can probably confirm that hypothesis.

Now candump can0 dump loads of data, which is consistent with signalk getting 140deltas/sec!

dbus-spy shows:

Services
com.victronenergy.adc
com.victronenergy.battery.ttyUSB1                                        BMV-700
com.victronenergy.fronius
com.victronenergy.logger
com.victronenergy.modbusclient.tcp
com.victronenergy.modbustcp
com.victronenergy.qwacs
com.victronenergy.settings
com.victronenergy.solarcharger.ttyUSB0        BlueSolar Charger MPPT 100/30 rev2
com.victronenergy.system


running the following command (picked it up reading around on the web):

/opt/victronenergy/vecan-dbus/vecan-dbus -c socketcan:can0 --banner --log-before 25 --log-after 25 -vv

dbus-spy shows:

Services
com.victronenergy.adc
com.victronenergy.battery.ttyUSB1                                        BMV-700
com.victronenergy.fronius
com.victronenergy.gps.socketcan_can0_vi0_uc25801                   NMEA 2000 GPS
com.victronenergy.logger
com.victronenergy.modbusclient.tcp
com.victronenergy.modbustcp
com.victronenergy.qwacs
com.victronenergy.settings
com.victronenergy.solarcharger.ttyUSB0        BlueSolar Charger MPPT 100/30 rev2
com.victronenergy.system
com.victronenergy.vecan.can0

note the extra com.victronenergy.gps.socketcan_can0_vi0_uc25801 and the I guess more useful

com.victronenerg.vecan.can0

on doing so, on the rpi I can now see on Settings/Services/CAN-bus(1)/Devices a list of all my NMEA2000 network devices onboard. Which I guess is a good sign.

However on Settings/Services/Modbus TCP [Enabled]/Available Services/ I only get:

com.victronenergy.system
com.victronenergy.battery
com.victronenergy.solarcharger
com.victronenergy.gps

don't see com.victronenergy.temperature or .tank or something?

the above are clearly shown in the following capture:

venusos-vebus.jpg


Now, vecan-dbus is not installed, just run from a terminal with certain parameters. Need to get it running properly as the other services. Unfortunately the following instructions in the Venus wiki you posted seem to be outdated:

To connect can0 to the Venus system the following should be added:

Create a file /etc/venus/canbus_ports that contains the entry can0
Copy the directory /opt/victronenergy/can-bus-bms/service to /service/can-bus-bms.can0
Copy the directory /opt/victronenergy/vecan-dbus/service to /service/vecan-dbus.can0
Copy the directory /opt/victronenergy/mqtt-n2k/service to /service/mqtt-n2k.can0
In all three of those /service/*.can0 directories change DEV to can0 in the run and log/run files.

cannot copy this dirs as for example the /service/can-bus-bms.can0 dir structure (which is installed and running normally on my pi) doesn't match the single (large!) file that is in /opt/victronenergy/can-bus-bms/service folder. Something must have changed or missing a post-processing/compilation stage? Not sure, can you please confirm/help here?

For the record I have canbus_ports file already configured (from kwindrem's config scripts) and I do have can-bus-bms installed.

I'm missing the following two services:

vecan-dbus.can0
mqtt-n2k.can0


So, after all this intro, guess q is how do I install them bearing in mind that wiki seems to be wrong/outdated in this respect.

apologies for the long post!

cheers


V.


venusos-vebus.jpg (142.4 KiB)
17 comments
2 |3000

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

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·
Hi,


Looks like the only thing you’ll gain by running (or installing, both will have the same end result when it comes to data in dbus-spy) vecan-dbus is a gps.


apparently your tank data is on n2k in a format we don’t support. And temperature data on n2k is something we don’t support at all.

The list of devices shown on that canbus configuration page is unrelated; that shows all devices on the bus, and some config parameters such as name or device instance. Having something listed there does not mean its data (tankdata or temperature data) is supported.


hope that explains it

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ mvader (Victron Energy) ♦♦ commented ·
Ps: you’re running into two seperate issues:

1. What data is supported by us aka by vecan-bus.

2. How to install vecan-dbus such that it auto starts at boot.


My previous comment was about the first.


On the second one, there’ll be other users around here I suppose that can help you. I won’t be able to, I’m sorry.but as said, end result will only be having your gps data on dbus

0 Likes 0 ·
Show more comments
Show more comments
Kevin Windrem avatar image Kevin Windrem commented ·

@mvader (Victron Energy), this appears to be a bug.

The Wiki is out of date for v2.80 since services are installed in /opt/victronenergy/service. This directory overlays /service.

The other issue is v2.80 has a read-only /root file system. It must be remounted read-write to make any changes.

SetupHelper and VeCanSetup address both issues, but there is another difference starting with v2.80.

Previous versions required coping the service directory from inside /opt/v*/vecan-dbus. v2.80 doesn't do this, AND there is no service directory to copy so VeCanSetup can't install them. In v2.80, all services are already present in /opt/v*/service BUT the vecan-dbus and mqtt-n2k services are missing on the RPI 4!

They are present on Cerbo. I can't check other builds because currently v2.73~1 is the release candidate.

On Cerbo /opt/v*/service includes the following (among others):

drwxr-xr-x 3 root root 1024 Aug 19 10:19 can-bus-bms.can0

drwxr-xr-x 3 root root 1024 Aug 19 10:19 can-bus-bms.can1

drwxr-xr-x 3 root root 1024 Aug 19 10:19 dbus-motordrive.can0

drwxr-xr-x 3 root root 1024 Aug 19 10:19 dbus-motordrive.can1

drwxr-xr-x 3 root root 1024 Aug 19 10:19 dbus-valence.can0

drwxr-xr-x 3 root root 1024 Aug 19 10:19 dbus-valence.can1

drwxr-xr-x 3 root root 1024 Aug 19 10:32 mqtt-n2k.can0

drwxr-xr-x 3 root root 1024 Aug 19 10:32 mqtt-n2k.can1

drwxr-xr-x 3 root root 1024 Aug 19 10:19 vecan-dbus.can0

drwxr-xr-x 3 root root 1024 Aug 19 10:19 vecan-dbus.can1


On Rpi 4 /opt/v*/service includes the following (among others):

drwxr-xr-x 4 root root 1024 Aug 19 11:00 can-bus-bms.can0

drwxr-xr-x 3 root root 1024 Aug 19 11:00 can-bus-bms.can1

drwxr-xr-x 4 root root 1024 Aug 19 11:00 dbus-motordrive.can0

drwxr-xr-x 3 root root 1024 Aug 19 11:00 dbus-motordrive.can1

drwxr-xr-x 4 root root 1024 Aug 19 11:00 dbus-valence.can0

drwxr-xr-x 3 root root 1024 Aug 19 11:00 dbus-valence.can1


mqtt-nk2 and vecan-dbus are missing!


Update: I checked other builds of v2.80~15 for missing services:

raspberrypi2 and raspberrypi4 are missing

mqtt-n2k.can0

mqtt-n2k.can1

vecan-dbus.can0

vecan-dbus.can1

nanopi is missing

vecan-dbus.can1

ccgx

vecan-dbus.can1


canvu500 is complete

beaglebone is complete

einstein is complete


0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin Windrem commented ·
I have updated the VeCanSetup and SetupHelper packages to install the missing vecan-dbus and mqtt-n2k services.


BTW, the missing service directories are missing on the RPI 3 build also.

Question to @mvader (Victron Energy) : should my script be installing dbus-motordrive and dubs-valence services also? I don't recall seeing these prior to v2.80 and since v2.80 has all services installed it may be a non-issue.

0 Likes 0 ·
Show more comments

Related Resources