2020-10-13, 08:50 PM (This post was last modified: 2020-10-17, 10:48 AM by Indee.)
Hello to all!
For my entry into Pypilot I would have liked a detailed overview of the configuration. After a lot of research and trial and error, I have clarified some problems.
Because other users might have similar questions, I recorded an overview of the connections for the GPS signal in OpenPlotter 2.
I hope it can help some people to understand the system.
If there are still proposals for changes, please let me know. Maybe it can be added to the OP manual.
port 20220 is bi-directional nmea for pypilot. So opencpn can receive nmea from pypilot on this as well as send.
port 10110 is from signalk node server, not pypilot. So if you get pitch/heel this way, it is not directly from pypilot.
You may be able to convert this nmea to signalk also, but it's not recommended anymore because with pypilot 0.2 and later, pypilot automatically connects to signalk server, and if granted read/write permission, it can send as well as receive. This means that if you assign a usb nmea device to pypilot such as wind or even gps for example, it will forward the data to signalk. Or you could have signalk server receive this data first and pypilot will get it as well. It's best pypilot gets wind first for better reaction time, but gps doesn't matter as much.
It's true that only one program can read from one device such as gps. It's possible that this can be gpsd, opencpn, pypilot, or even signalk server, and all of these can relay the data to all of the others. Whichever program reads directly from the gps must be running then and if it stops all the others will lose it.
Well, also pypilot since 0.2 has bidirectional communication to signalk via signalk websockets not using nmea or port 20220 for this. gps to opencpn as gpsd -> pypilot -> signalk -> opencpn is actually possible (maybe not always desirable) it makes more sense when pypilot is not on the same machine as signak.
Unfortunately so many possible channels leads to inevitable data loops so these may need filters.
For my entry into Pypilot I would have liked a detailed overview of the configuration. After a lot of research and trial and error, I have clarified some problems.
Because other users might have similar questions, I recorded an overview of the connections for the GPS signal in OpenPlotter 2.
I hope it can help some people to understand the system.
If there are still proposals for changes, please let me know. Maybe it can be added to the OP manual.
Bye
Hi, where can I see your recorded overview? Even if the reality is more complicated?
(2020-10-13, 09:52 PM)seandepagnier Wrote: It's a little more complicated... maybe
port 20220 is bi-directional nmea for pypilot. So opencpn can receive nmea from pypilot on this as well as send.
port 10110 is from signalk node server, not pypilot. So if you get pitch/heel this way, it is not directly from pypilot.
You may be able to convert this nmea to signalk also, but it's not recommended anymore because with pypilot 0.2 and later, pypilot automatically connects to signalk server, and if granted read/write permission, it can send as well as receive. This means that if you assign a usb nmea device to pypilot such as wind or even gps for example, it will forward the data to signalk. Or you could have signalk server receive this data first and pypilot will get it as well. It's best pypilot gets wind first for better reaction time, but gps doesn't matter as much.
It's true that only one program can read from one device such as gps. It's possible that this can be gpsd, opencpn, pypilot, or even signalk server, and all of these can relay the data to all of the others. Whichever program reads directly from the gps must be running then and if it stops all the others will lose it.
Hi Sean from your reply above (in bold) it seems that if you set-up the GPS in SignalK it should automatically be picked up by pypilot. Please help me as I have done this but can not get pypilot to detect the gps. In short, I have set-up the gps in signal K and when I enter sudo ca /dev/ttyACM0 I get beautiful NMEA sentences and the three green bars in the top left corner of OpenCPN. However, when I open up the pypilot plugin I can not get it to read these sentences. In the pypilot configuration there are a few options for the pypilot host (localhost(127.0.0.1) or 192.168.14.1), etc. I have tried all of them using the data port 20220 but the gps bearing never shows in pypilot. I do not have an IMU connected as I want to navigate using gps bearings, please help
another way to get the data to pypilot would be to "output this data as a nmea repeater or autopilot route" checkbox in opencpn connections must be checked. Then the data can be sent on port 20220 to pypilot from opencpn.
I'm not sure why pypilot is unable to directly receive the gps data from signalk though.
(2021-03-03, 10:28 PM)seandepagnier Wrote: another way to get the data to pypilot would be to "output this data as a nmea repeater or autopilot route" checkbox in opencpn connections must be checked. Then the data can be sent on port 20220 to pypilot from opencpn.
I'm not sure why pypilot is unable to directly receive the gps data from signalk though.
Hi Sean
Thanks for the reply. One problem could be the data transfer. As you can see in the picture the OUT sentences (port 20220) are all in red. Not sure why but I have tried various versions and they are all the same so I think they are not valid. This is a fresh install of Raspbian on a RPi4 with only OpenCPN installed so no Openplotter and no SignalK to mix things up. However, the Pypilot plugin still does not receive the data, any ideas will be appreciated.
Richard
2021-03-04, 08:04 PM (This post was last modified: 2021-03-04, 08:30 PM by ironman.)
(2021-03-03, 07:27 PM)richarddaneel Wrote: Please help me as I have done this but can not get pypilot to detect the gps.
(2021-03-03, 10:28 PM)seandepagnier Wrote: I'm not sure why pypilot is unable to directly receive the gps data from signalk though.
The zeroconf mechanism, through which pypilot (almost) automatically connects to a signalk database, only works when signalk's server setting 'mdns' is switched 'on', which it does not seem to be by default. If that is switched on, you will find an Access Request under the signalk Security menu, which you have to approve. Mind you, many setting changes in signalk require a restart to become effective.
(2021-03-04, 09:25 AM)richarddaneel Wrote: Hi Sean
Thanks for the reply. One problem could be the data transfer. As you can see in the picture the OUT sentences (port 20220) are all in red. Not sure why but I have tried various versions and they are all the same so I think they are not valid. This is a fresh install of Raspbian on a RPi4 with only OpenCPN installed so no Openplotter and no SignalK to mix things up. However, the Pypilot plugin still does not receive the data, any ideas will be appreciated.
Richard
I am not completely sure, but is pypilot actually running on 127.0.0.1?
What if you try to connect with "telnet localhost 20220" ?