This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenCPN to Pypilot link via Signal K - Help?
#1
Hi,
I have had OpenCPN and Pypilot working very successfully in the past - with OpenCPN on both Linux and Windows. I have now gone back to Linux (Ubuntu 20.04?) and can see my Pypilot using a browser on 192.168.14.1. I can receive wind speed and direction in OpenCPN from the Pypilot.

The part that escapes me at present is establishing a Signal K link between the two to get the Pypilot to work from OpenCPN. The Pypilot plug-in cannot auto-detect a Signal K server and despite setting one up in the OpenCPN communications panel it doesn't help. I assume this is the reason the plug-in can't connect with the Pypilot. I can't recall doing anything tricky in the past - but now I'm struggling, but still with a conviction there's a simple fix I'm missing!

I believe I'm up to date with OpenCPN on my Linux box but may be behind the times with the Pypilot.

Cheers
Ted
Reply
#2
Have you allowed a read/write connection in signalK?
Reply
#3
Hi,
I have allowed a read/write connection. Not about port allocation though.
Cheers
Ted
Reply
#4
There has been a bit of a shuffle in the pypilot code recently. Pypilot used to call its internal operational data layer 'signalk' and that layer was accessible through port 21311. This was the port through which the opencpn pypilot plugin talked to the pypilot. Recently this has been overhauled. This internal data layer is now called pypilotServer and it has moved to another socket 23322. So, it's no wonder your updated plugin cannot talk to your outdated pypilot anymore. It's knocking on the wrong door.

For your correct understanding, there is no auto-detect at play in the plugin: in the plugin you type the ip address of the pypilot, and the plugin starts talking to that address on the known port number. You might be confused with a recent addition, where pypilot connects all by itself to a real signalk server using some zeroconf mechanism and then starts exchanging nautical information with it. This mechanism is the successor of the infamous port 20220, where you had to connect through with OpenCPN to enable track and wind mode, and/or get wind and heading back. Port 20220 is still doing its thing in the recent version, as you have implicitly noticed.

So I'm afraid you're gonna have to upgrade your pypilot - including your arduino. Alternatively, you could consider pulling an old version of the plugin from github and compile that, if you are comfortable with that type of stuff, but then you might run into compatibility problems with OpenCPN itself. I'm on ubuntu as well and have done that in the past. Painful as it might be, upgrading is often the better choice.
Reply
#5
Yes, I am very sorry about the data breakage, it has caused a lot of problems but I felt like I had no choice because this increases efficiency while also making pypilot more flexible for future developments.

If the pypilot plugin won't connect it is likely you have mismatched pypilot and pypilot plugin versions. So either new pypilot or new plugin. You can use the old plugin but it has to compile from source because the plugin manager of opencpn doesn't support it.

It is true also that the new pypilot automatically detects signalk-node-server which is typically running on openplotter by default. You can still use 20220 for legacy nmea data as well, and signalk is optional. Hopefully support in the future will improve to do more than nmea ever supported.

You don't need to upgrade the arduino or the motor controller, just the sd card image of the tinypilot.
Reply
#6
I think I may have the same problem: I cannot get the Pypilot plugin to connect to Pypilot. These are the versions I have:
PyPilot version 2.2.1
OpenCPN version: 5.2.4.0-0
PyPilot plugin version: 0.22.5.0

What do I need to update, or do I just need to add a port number after the IP address in the Host setting in the plugin?
Many thanks
David
Reply
#7
No need to add a port number.

First, ensure that pypilot is working. You can do this in a variety of ways, for example a web browser to the ip address. Next add a connection to opencpn to this ip on port 20220 (usually both input and output) and ensure you receive nmea data.

If this is working and you still cannot connect the plugin then it is a new problem... Please attach the output from the opencpn.log file

There is no version 2.2.1 pypilot. I do not know if this is the openplotter-pypilot version or where you found this, but the most recent version of pypilot is 0.24
Reply
#8
Hi Sean et al,
I've been offline for a while - thanks for the replies. I had arrived at the same solution independently but the more comprehensive answer is useful. Looking forward to putting Pypilot to use again in the next few weeks!
Cheers
Ted
Reply
#9
(2021-03-25, 08:31 PM)drbarritt Wrote: I think I may have the same problem: I cannot get the Pypilot plugin to connect to Pypilot.  These are the versions I have:
PyPilot version 2.2.1
OpenCPN version: 5.2.4.0-0
PyPilot plugin version: 0.22.5.0

What do I need to update, or do I just need to add a port number after the IP address in the Host setting in the plugin?
Many thanks
David

You might find some clues here https://github.com/pypilotWorkbook/workb...oldversion
Reply
#10
(2021-03-25, 08:39 PM)seandepagnier Wrote: No need to add a port number.

First, ensure that pypilot is working.   You can do this in a variety of ways, for example a web browser to the ip address.   Next add a connection to opencpn to this ip on port 20220 (usually both input and output) and ensure you receive nmea data.

If this is working and you still cannot connect the plugin then it is a new problem...    Please attach the output from the opencpn.log file

There is no version 2.2.1 pypilot.   I do not know if this is the openplotter-pypilot version or where you found this, but the most recent version of pypilot is 0.24

Hi Sean, many thanks for your reply.  I got the Pypilot version from the top of the Pypilot window under OpenCPN 9see attached), but I have found the actual version is 0.16 (this came with OpenCPN 5.2).  Do I need to upgrade to  0.24 and, if I do, will I also need to upgrade my Arduino code?  
I have also attached the OpenCPN log file.
Outdoor sports are re-opening in the UK from Monday so I am really looking forward to trying out Pypilot on my 27' yacht.
Regards
David


Attached Files Image(s)
   

.txt   opencpn.txt (Size: 17.92 KB / Downloads: 200)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)