OpenMarine

Full Version: Can I have multiple RPi in the system?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have one RPi 4 with the dAISy hat attached and one RPi 3b+ with the BerryGPS IMU attached.  Can I have these both supplying there data to one of them running OpenPlotter?  what would be the best way to do this?
(2020-09-17, 01:00 AM)Oceant Wrote: [ -> ]I have one RPi 4 with the dAISy hat attached and one RPi 3b+ with the BerryGPS IMU attached.  Can I have these both supplying there data to one of them running OpenPlotter?  what would be the best way to do this?

It seems I may have figured this out on my own.  I have set up the both RPI's to run openplotter and opencpn.  After configuring the sensors to work on their individual RPI systems and show the corresponding info in opencpn.  I opened opencpn on both RPI's low and behold I can see the information from both RPI's in both opencpn systems.

This is how I thought it should work. How ever I have not been able to find this information anywhere in this forum, in the documentation, on youtube, or any kind of google search.

Can anyone tell me by what means this is working?
Are both RPIs in the same network?
what connections are defined in both opencpn?
OpenCpn supports discovering SK servers.

For details see https://signalk.org/specification/1.4.0/...ction.html
(2020-09-25, 11:59 AM)Sailoog Wrote: [ -> ]Are both RPIs in the same network?
what connections are defined in both opencpn?

Yes both RPI's are in the same network.  I set up the sensors using Openplotter which is running on each RPI.  In Openplotter I made the connection to SignalK.  In OpenCPN on both RPI's I created a localhost:3000 connection to SignalK.

I don't know if SignalK is running on both RPI's, I'm sure there's some command I can use to determine what running which I'll need to figure out.

(2020-09-25, 06:36 PM)tkurki Wrote: [ -> ]OpenCpn supports discovering SK servers.

For details see https://signalk.org/specification/1.4.0/...ction.html

OK, I get how this can work.  Does the master SignalK server always retain being the master and is the slave always the slave?  Does it happen automatically?  Can it be hardset?
I think I may have been a bit premature thinking this was working.  I started everything up again today and the 2 RPI's were no longer sharing data.  I am now thinking this may be partly due to there being 2 Signal K server.  It seems it might be difficult to multiplex the nmea0183 stream if two servers are doing at the same time.  I am still looking into figuring out how to make one a master and one a slave.  Also, looking to eliminate one.  If anyone has some ideas of how to proceed that would be great.
(2020-09-17, 01:00 AM)Oceant Wrote: [ -> ]I have one RPi 4 with the dAISy hat attached and one RPi 3b+ with the BerryGPS IMU attached.  Can I have these both supplying there data to one of them running OpenPlotter?  what would be the best way to do this?

You have two ways to do it.

1 have both devices with their SK server running by serving each its data. One the AIS and the other the berryIMU.

Then in opencpn you define two connections pointing each one to each IP address of each one of the SK servers. This you can do in each of the Opencpn that run in each Rpi. It works, more or less works. But I prefer option 2. 

2 Send the data collected by one of the SK servers to the other. For example send the data of the SK that collects the data of the berryIMU to the one that collects the data of the AIS. Then create in opencpn, in both devices a single connection to the SK server that collects and aggregates both data. This is the most intelligent and elegant option.

No SK server has to be defined as master or slave. They all work in parallel and can send and receive data to and from each other over the network. What is important is not to forward data from both two to each other because it would create a loop that could block both systems.

I use the metod 2 in assembly type BlackBox where a simple Rpi With HAT gathers all the data in its server SK and sends them by the network. Then each device reads them for their applications. Among them there is a second Rpi4 more powerful that receives them in its own server SK. It does not forward the data anymore but uses it for things like InfluxDB, Grafana and similar uses. It is a simpler assembly than it seems.