Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 05-09-2020, 06:27   #1
Registered User

Join Date: Jun 2019
Location: Sweden, Stockholm
Boat: Westerbergare
Posts: 7
Signal K and Autopilot

Hi all
I have a Raspberry Pi running a Signal K server.
My Autopilot is connected to the Raspberry using NMEA 0183 RS232
OpenCPN is running on a laptop using Ethernet port 3000 connected to Raspberry with the Signal K server.
Data from Signal K to OpenCPN works good.

But is it possible to create a route in OpenCPN and send Autopilot data over the Signal K connection to RPI?

So my question is, is the Signal K connection one way or both way?

Best
Per
Svinninge is offline   Reply With Quote
Old 05-09-2020, 08:08   #2
Registered User

Join Date: Apr 2018
Location: Saugatuck, MI
Boat: Nauticat 32
Posts: 286
Re: Signal K and Autopilot

Quote:
Originally Posted by Svinninge View Post
Hi all
I have a Raspberry Pi running a Signal K server.
My Autopilot is connected to the Raspberry using NMEA 0183 RS232
OpenCPN is running on a laptop using Ethernet port 3000 connected to Raspberry with the Signal K server.
Data from Signal K to OpenCPN works good.

But is it possible to create a route in OpenCPN and send Autopilot data over the Signal K connection to RPI?

So my question is, is the Signal K connection one way or both way?

Best
Per
Answer: Both, but it depends.

Yes, SignalK can control an autopilot. There is a SK plugin specifically for it. Also, OpenCPN can send a route easy enough. I do it all the time, but have an issue with doing it through SignalK. Hence the "it depends" part. It will come down to your connection and how it's set up. SignalK documentation is a bit spotty, but I've been using it for a few weeks now and find it to be easy to figure out and solid. Looking for a RPI myself to do host SignalK, just like you're doing.

OpenCPN and it's SignalK connection, I believe, are currently "read only." That will most likely change in the future. So for now, you'll need to have an output from OpenCPN through the NMEA-SignalK converter (port 10110) or directly connect and configure the NMEA 0183 RS232 connector direct to the laptop for OpenCPN control.

Regardless, yes, it can all work in theory, but you'll need to spend some time making sure it's setup properly and test it.
SCarns is offline   Reply With Quote
Old 05-09-2020, 15:42   #3
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: Signal K and Autopilot

opencpn only receives signalk, it does not output signalk.


pypilot only sends and receives signalk since version 0.21. control from signalk is not well tested.



signalk definitions for autopilots are currently not very well thought out. They are based on proprietary nmea2k autopilots which is a shame. see this discussion:
https://forum.openmarine.net/showthread.php?tid=2858
seandepagnier is offline   Reply With Quote
Old 05-09-2020, 22:04   #4
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Signal K and Autopilot

Svinninge,
for the autopilot, take a look at the Twocan plugin. It has, in this respect, the same functionality as Signal K. Could be an alternative.

/Lennart
LennartG is offline   Reply With Quote
Old 06-09-2020, 02:17   #5
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,121
Re: Signal K and Autopilot

Quote:
Originally Posted by Svinninge View Post
Hi all
I have a Raspberry Pi running a Signal K server.
My Autopilot is connected to the Raspberry using NMEA 0183 RS232
OpenCPN is running on a laptop using Ethernet port 3000 connected to Raspberry with the Signal K server.
Data from Signal K to OpenCPN works good.

But is it possible to create a route in OpenCPN and send Autopilot data over the Signal K connection to RPI?

So my question is, is the Signal K connection one way or both way?

Best
Per
Yes, it is possible to send route information from OpenCPN to the SignalK server.

Make an extra connection In OpenCPN outgoing (not out en in). At the two dots line below remove all settings. And tick only the ones your need.

Setting UDP localhost and port 2000

In SignalK add a new connection give it a name openc-in or something then:

NMEA183 UDP port 2000 and of course restart.

Now the route or waypoint data is coming form OpenCPN to the SignalK server.


Bram
Attached Thumbnails
Click image for larger version

Name:	Schermafdruk van 2020-04-24 13-32-46.jpg
Views:	212
Size:	417.6 KB
ID:	222828  
verkerkbr is offline   Reply With Quote
Old 06-09-2020, 06:58   #6
Registered User

Join Date: Mar 2011
Posts: 729
Re: Signal K and Autopilot

Quote:
Originally Posted by LennartG View Post
Svinninge,
for the autopilot, take a look at the Twocan plugin. It has, in this respect, the same functionality as Signal K. Could be an alternative.

/Lennart
Not entirely correct. At the moment TwoCan does not control autopilots, nor does it convert NMEA 183 autopilot related sentences (APB, XTE etc) to their NMEA 2000 equivalents.

But this is moot as the OP wishes to connect a NMEA 0183 based autopilot. Peronally I don't understand why you just don't keep things simple and connect the autopilot directly to OpenCPN ?
stevead is offline   Reply With Quote
Old 06-09-2020, 07:20   #7
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Signal K and Autopilot

Svinninge and Stevead,
probably a slight misunderstanding here.

Neither Twocan nor Signal K generates NMEA 2000 sentences to control the autopilot from OpenCPN NMEA 0183.
Both Twocan and Signal K converts the required NMEA 2000 signals sent by the autopilot to NMEA 0183 (probably you only need/get HDG from the autopilot).
I am using this setup with Twocan myself having NMEA 2000 -> NMEA 0183 (only HDG is sent). The autopilot (Garmin GHP20) has an RS422 input for the required steering signals (RMC, RMB, APB etc.) that are sent by OpenCPN through a. FDTI USB to RS422 converter.
Works like a charm.
/Lennart
LennartG is offline   Reply With Quote
Old 06-09-2020, 09:21   #8
Registered User

Join Date: Jun 2019
Location: Sweden, Stockholm
Boat: Westerbergare
Posts: 7
Re: Signal K and Autopilot

Quote:
Originally Posted by verkerkbr View Post
Yes, it is possible to send route information from OpenCPN to the SignalK server.

Make an extra connection In OpenCPN outgoing (not out en in). At the two dots line below remove all settings. And tick only the ones your need.

Setting UDP localhost and port 2000

In SignalK add a new connection give it a name openc-in or something then:

NMEA183 UDP port 2000 and of course restart.

Now the route or waypoint data is coming form OpenCPN to the SignalK server.


Bram
Thanks verkerkbr, i great idea!

I followed your recommendation and setup OpenCPN to send out using UDP port 2000. (I filtered RMC, no need for that)
Signal K now receives APB, RMB, XTE
In "SignalK to NMEA0183" plugin I checked APB,RMB,RMC,XTE
But my NMEA0183 RS232 Autopilot only receives RMC and XTE?

So APB and RMB is not sent from SignalK to the Autopilot, any idea?

Log:
Sep 06 18:17:45 2020-09-06T16:17:45.348Z signalk:streams:udp $GPAPB,A,A,0.3442,L,N,V,V,119.1343,T,003,60.5064,T ,60.5064,T*2C
Sep 06 18:17:45 2020-09-06T16:17:45.353Z signalk:streams:udp $GPXTE,A,A,0.344,L,N*5D
Sep 06 18:17:46 2020-09-06T16:17:46.082Z signalk:streams:serialport Writing:$GPRMC,161745,A,5926.8193,N,01817.6961,E,0 .3,0.0,060920,0.0,E*74
Sep 06 18:17:46 2020-09-06T16:17:46.082Z signalk:streams:serialport Writing:$GPRMC,161745,A,5926.8193,N,01817.6961,E,0 .3,0.0,060920,0.0,E*74
Sep 06 18:17:46 2020-09-06T16:17:46.352Z signalk:streams:udp $GPRMB,A,0.344,L,002,003,5927.018,N,01818.386,E,0. 403,60.488,0.144,V,A*50
Sep 06 18:17:46 2020-09-06T16:17:46.354Z signalk:streams:serialport Writing:$IIXTE,A,A,-637.088,R,N*78
Sep 06 18:17:46 2020-09-06T16:17:46.354Z signalk:streams:serialport Writing:$IIXTE,A,A,-637.088,R,N*78
Sep 06 18:17:46 2020-09-06T16:17:46.357Z signalk:streams:udp $GPAPB,A,A,0.3439,L,N,V,V,119.1343,T,003,60.4878,T ,60.4878,T*20
Sep 06 18:17:46 2020-09-06T16:17:46.362Z signalk:streams:udp $GPXTE,A,A,0.344,L,N*5D


SignalK settings.json:
{
"pipeElements": [
{
"type": "providers/simple",
"options": {
"logging": true,
"type": "NMEA0183",
"subOptions": {
"validateChecksum": true,
"type": "serial",
"baudrate": 19200,
"device": "/dev/serial/by-id/usb-FTDI_FT2232H_device_FT46QF1E-if00-port0",
"providerId": "AP0183-19200",
"toStdout": [
"nmea0183out"
],
"sentenceEvent": ""
},
"providerId": "AP0183-19200"
}
}
],
"id": "AP0183-19200",
"enabled": true
Best /Per
Svinninge is offline   Reply With Quote
Old 06-09-2020, 10:04   #9
Registered User

Join Date: Jun 2019
Location: Sweden, Stockholm
Boat: Westerbergare
Posts: 7
Re: Signal K and Autopilot

I think I found a solution, here is what I did:
- For the SignalK connection to UDP:2000 to OpenCPN, I put a name for the Sentence Event "nmeaOpenCPN"
- For the SignalK connection to my NMEA0183 autopilot, I changed the Output event to "nmeaOpenCPN,nmea0183out"
- In the plugin SignalK to NMEA0183 I only checked RMC.

The Autopilot now receives RMC, RMB, APB and XTE.

/Per
Svinninge is offline   Reply With Quote
Old 07-09-2020, 05:43   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: Signal K and Autopilot

Can you write this up more completely, so it can be added to Signal K wiki?





Quote:
Originally Posted by Svinninge View Post
I think I found a solution, here is what I did:
- For the SignalK connection to UDP:2000 to OpenCPN, I put a name for the Sentence Event "nmeaOpenCPN"
- For the SignalK connection to my NMEA0183 autopilot, I changed the Output event to "nmeaOpenCPN,nmea0183out"
- In the plugin SignalK to NMEA0183 I only checked RMC.

The Autopilot now receives RMC, RMB, APB and XTE.

/Per
rgleason is offline   Reply With Quote
Old 27-12-2023, 18:32   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: Signal K and Autopilot

https://opencpn.org/wiki/dokuwiki/do...ftware:signalk
rgleason is offline   Reply With Quote
Old 03-01-2024, 13:24   #12
Registered User

Join Date: Apr 2018
Location: Saugatuck, MI
Boat: Nauticat 32
Posts: 286
Re: Signal K and Autopilot

In the end, my solution was to output APB, RMB, RMC and XTE from OpenCPN over TCP (on port 10110, the nmea0183 port) to a port in SK called OCPN which received 0183 into the "seatalkout" port, as used by the autopilot plugin in SK. All worked great for years. Sold the boat, but will do something similar on the next one.
SCarns is offline   Reply With Quote
Reply

Tags
autopilot


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not under command signal and Robot Boats sailorphil9 Rules of the Road, Regulations & Red Tape 14 26-08-2020 05:11
Autopilot B&G ac12n and ISailor: is it possible to steer autopilot with Isailor CaptainRivet Navigation 2 11-07-2020 13:23
For Sale: OLIN 25MM and OLIN 12 Guage Signal Flare Launching Pistols hanks Classifieds Archive 1 01-03-2014 07:21
Raymarine ST60 Autopilot without GPS Signal myocean Marine Electronics 23 30-08-2012 18:26
NMEA *Input* string format to signal next autopilot waypoint? neodiogenes OpenCPN 7 04-07-2012 21:02

Advertise Here


All times are GMT -7. The time now is 02:39.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.