Moving to CanBus and SignalK on OpenPlotter on a RPi

216 views
Skip to first unread message

Soggy Paws

unread,
Jul 31, 2020, 2:43:50 AM7/31/20
to Smart Alternator Regulator
Hi All, hopefully people are still out there monitoring this group.  We have two 1.3.1 Smart Alt regulators on twin engines/alternators.  In 2018, I rigged up a monitoring app on my Windows computer using node-red, and the USB connections (starting from Soerg's node-red app).  It's a nice visual interface to see what the alternators, regulators, and battery are doing.  There's a post here somewhere on the group where I documented how to do it.

I have recently gotten a Raspberry Pi 4B, and wish to convert my monitoring setup on Node-Red from the Windows Laptop and USB to the Pi using Canbus.  I have just gotten it working on the Pi with OpenPlotter / SignalK with the node-red plugin, using the USB ports. (yay!) But I'd really like to switch to Canbus instead (to free up USB ports, for one), and to figure out how the Canbus is working, to use it for future addtions.

I have on order one of these: https://amzn.to/2D7HPG9 (RS485 CAN HAT for Raspberry Pi).

Hopefully, I can figure out how to get the data coming out of the SmartAlts on the Canbus into the RPi.  Anyone with tips or helpful info... please speak up.

My specific question though is converting my working node-red setup with the USB (serial port) input to use the same inputs as SignalK inputs.  I've never used SignalK and am only just starting to grasp the concept.  I think I understand that you acquire the input data via SignalK, and then "subscribe" (is that the right word?) to the input for my node-red setup via SignalK instead of just reading it directly from the serial port.  Is that right?

Anybody who's done that who can help me along, I'd be grateful.

Thanks,
Sherry s/v Soggy Paws


Al Thomason

unread,
Aug 1, 2020, 10:35:32 AM8/1/20
to Soggy Paws, Smart Alternator Regulator

Hello Saggy Paws!

 

Wonderful you are having good success with the VSR, always nice to hear.  And love the openPlotter/Signal-K stuff!

 

Cannot help you with the Signal-K side of things much, but here are some ideas for the CAN side of the equation:

 

1)      There is a Signal-K provider for the VSR  (Ok, maybe a small help…): 

a.       https://github.com/thomasonw/signalk-parser-OSEnergy

b.       It is HORID code, just me being blind, but I did get something working.

c.        At least a few years ago, not sure if it still works….

d.       Is USB based (See comment below), but maybe can help with a CAN based provider?

 

2)      I have been using a PiCAN hat for some time to connect to the CAN bus:

a.       https://copperhilltech.com/pican-2-can-bus-interface-for-raspberry-pi/

b.       Kind of costly, but nicely built. 

c.        There are a few options, single port, dual, some isolated.

d.       You can download the J1939/NMEA-lib from Timo (same base as used on the VSR) and then I have a socketCAN driver here:

                                                               i.      https://github.com/thomasonw/NMEA2000_socketCAN

e.       It all works very well (at least it did a few years ago), and will give you a good start towards the CAN side of things.

                                                               i.      I would suggest to use the Timo NEMA2000 lib from the VSR source, as well as the RV-C adders from there as well – as opposed to the newest / latest Timo lib (there are incompatibilities between RV-C and NMEA2000 that show up in Timo’s later versions)

                                                             ii.      That way you are on the same source tree as the VSR, and should not have any issues with data formats.

                                                           iii.      Ref all here: https://github.com/AlternatorRegulator/VSR-Source/tree/master/libraries

 

3)      Check this out as an idea for harvesting the CAN information for later pushing back out via Signal-K / OpenPlotter.

a.       https://github.com/AlternatorRegulator/OSEnergy-Dash-Display

 

 

Myself:  I have never liked the idea of using the USB for long term monitoring, it is for config and updates.  Too many reliability issues for long term and not even talking about ground loops.. A few weeks ago I noted a ‘Hot Smell’ in the lab that turned out to be a ground loop issue overheating a USB hub cable.  And this was with a lap-top, ala isolated in its own right!  CAN is abs the way to go.  With the above you should be able to get the CAN side of your project all nailed down, then just figure out the Signal-K side and be good to go. 

 

 

Best of luck!

-al-

--
You received this message because you are subscribed to the Google Groups "Smart Alternator Regulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-alt+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smart-alt/0bb89bd9-6279-4267-b07b-f1b4d10b5cafn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages