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
AIS connection to Signal K server
#1
Hi All... I have a newbie question!

I have a Quark Elec QK-A024 AIS Wireless receiver. My pi 4 OpenCPN software connects to it with no issues. However, I also want to feed the AIS data into the Signal K server. So I created a data connection and pointed it to the TCP ip of the QK-A024. My Signal K dashboard shows that it has connected to the AIS receiver and is receiving data. However, when I go to the Signal K data browser, I see no AIS data. I can still see data from my GPS and WeMos board.

Any ideas where else I can look to see what data i'm getting from the AIS.



Many thanks
Paul
Reply
#2
(2020-12-09, 04:07 PM)Pyxis Wrote: Hi All... I have a newbie question!

I have a Quark Elec QK-A024 AIS Wireless receiver. My pi 4 OpenCPN software connects to it with no issues. However, I also want to feed the AIS data into the Signal K server. So I created a data connection and pointed it to the TCP ip of the QK-A024. My Signal K dashboard shows that it has connected to the AIS receiver and is receiving data. However, when I go to the Signal K data browser, I see no AIS data. I can still see data from my GPS and WeMos board.

Any ideas where else I can look to see what data i'm getting from the AIS.



Many thanks
Paul

Not sure ais gets translated into signalk, any nmea data getting received by signalk should get passed straight through to port 10110 so there should be no connection to the ais in opencpn, just signalk. Then you should see the ais data in opencpn.
Reply
#3
(2020-12-09, 05:56 PM)PaddyB Wrote:
(2020-12-09, 04:07 PM)Pyxis Wrote: Hi All... I have a newbie question!

I have a Quark Elec QK-A024 AIS Wireless receiver. My pi 4 OpenCPN software connects to it with no issues. However, I also want to feed the AIS data into the Signal K server. So I created a data connection and pointed it to the TCP ip of the QK-A024. My Signal K dashboard shows that it has connected to the AIS receiver and is receiving data. However, when I go to the Signal K data browser, I see no AIS data. I can still see data from my GPS and WeMos board.

Any ideas where else I can look to see what data i'm getting from the AIS.



Many thanks
Paul

Not sure ais gets translated into signalk, any nmea data getting received by signalk should get passed straight through to port 10110 so there should be no connection to the ais in opencpn, just signalk. Then you should see the ais data in opencpn.

Ah! that makes sense! So now I have removed all the connections from openCPN apart from port 10110 and then added data connections within the signal K server for the GPS (USB) and AIS (WiFi).... and openCPN works brilliant showing GPS and AIS data Smile

The only issue is within the Signal K server under "Data Browser". I can see live signal k data from the GPS and even the Wemos (Temperatures) board but nothing from AIS! Can you think why this would happen?

I've been finding the data browser really useful for getting path names.

Cheers
Paul
Reply
#4
(2020-12-09, 07:17 PM)Pyxis Wrote: The only issue is within the Signal K server under "Data Browser". I can see live signal k data from the GPS and even the Wemos (Temperatures) board but nothing from AIS! Can you think why this would happen?

I've been finding the data browser really useful for getting path names.

Cheers
Paul

Not sure why but don't think the server can display ais messages, maybe because it's not straight forward text nmea but needs to be decoded to get at the numbers.
Reply
#5
(2020-12-09, 07:32 PM)PaddyB Wrote:
(2020-12-09, 07:17 PM)Pyxis Wrote: The only issue is within the Signal K server under "Data Browser". I can see live signal k data from the GPS and even the Wemos (Temperatures) board but nothing from AIS! Can you think why this would happen?

I've been finding the data browser really useful for getting path names.

Cheers
Paul

Not sure why but don't think the server can display ais messages, maybe because it's not straight forward text nmea but needs to be decoded to get at the numbers.

I'm slowly starting to understand! lol
So the Signal K server will try to decode nmea connections into Signal K format but even if it can not it will still push this data out to port 10110!
I scanned port 10110 in raw format and can see this;
!AIVDM,2,1,8,A,53P7AsD2<Iu=a4u7:21<B0tl4LR22222222222150pD2574g061PDk0C,0*3D
!AIVDM,1,1,,B,13MARih000wbAbJP0kr23aSV0<0g,0*73
!AIVDM,1,1,,A,13P>Hq0000wbF:pP0jIEdkNH0l0O,0*46
!AIVDM,1,1,,A,13P>Hq0000wbF:lP0jI5dkNH0d0N,0*23
!AIVDM,1,1,,B,33P;FBE000wbHI4P0he=Da?>0000,0*6B
!AIVDM,1,1,,A,13P>Hq0000wbF9rP0jHUdkNv0l0O,0*68
!AIVDM,1,1,,B,39NWtpm000wb=GBP19oqt9qn0Dtr,0*24
!AIVDM,1,1,,B,13MARih000wbAb8P0kpj3aRv06K8,0*54
!AIVDM,1,1,,A,33OhGr1001Ob;SvP1vKFoC@d0De:,0*3E
!AIVDM,1,1,,B,13MARih000wbAatP0kkj3aRH06J`,0*67
!AIVDM,1,1,,B,13P>Hq0000wbF:8P0jFEdkN20l0O,0*78
!AIVDM,2,1,1,B,53P7k`@2=QMAI4dK:20<u9DU<f222222222222154HO6874>07Ti@H54,0*09
!AIVDM,1,1,,A,13MARih000wbAbnP0kqR3aRf0<0e,0*04
!AIVDM,1,1,,A,33P7k`E000wbEqPP0i5@T9:60000,0*53
!AIVDM,1,1,,B,13P>Hq0000wbF9`P0jGEdkOD0d0P,0*42
!AIVDM,1,1,,A,13MARih000wbAatP0kkj3aRf08=B,0*11
!AIVDM,1,1,,B,13P>Hq0000wbF9pP0jJ5dkN20d0O,0*47
!AIVDM,1,1,,A,13P>Hq0000wbF:2P0jG5dkO00PRI,0*5B
!AIVDM,1,1,,B,13MARih000wbAb2P0kqB3aSV06K8,0*56
!AIVDM,1,1,,B,13P>Hq0000wbF:RP0jR5dkOF0hHr,0*42

Which is AIS data so I'm guessing the Signal K can not decode this into a json format

Cheers
Paul
Reply
#6
(2020-12-09, 09:01 PM)Pyxis Wrote: I'm slowly starting to understand! lol
So the Signal K server will try to decode nmea connections into Signal K format but even if it can not it will still push this data out to port 10110!

I scanned port 10110 in raw format and can see this;
!AIVDM,2,1,8,A,53P7AsD2<Iu=a4u7:21<B0tl4LR22222222222150pD2574g061PDk0C,0*3D
!AIVDM,1,1,,B,13MARih000wbAbJP0kr23aSV0<0g,0*73

!AIVDM,1,1,,B,13P>Hq0000wbF:RP0jR5dkOF0hHr,0*42

Which is AIS data so I'm guessing the Signal K can not decode this into a json format

Cheers
Paul

Yep,  you've got it! Now annoyingly a few weeks ago I got into the ais data and with some node red saved the distance to the target into an influxdb database. But not a clue now how I did it! Think was to check if any antenna tweaks were helping to pick up more distant targets. No idea how I did it though. Must take a few notes in future...... Wink

Aha, knew it was there somewhere - have you used node-red yet? If you know what a json is then should be easy enough, there's an ais dedcode node - https://flows.nodered.org/node/node-red-...is-decoder

So if you input an AIS message you get this on the output =>
{"mmsi":227006760,"navigationStatus":"Under way using engine","rateOfTurn":128,"speedOverGround":0,"longitude":0.13138,"latitude":49.47557666666667,"courseOverGround":36.7,"trueHeading":511,"timeStampSeconds":14,"date":1607546243406,"isoDate":"2020-12-09 20:37:23","source":"!AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23"}
Reply
#7
(2020-12-09, 09:28 PM)PaddyB Wrote:
(2020-12-09, 09:01 PM)Pyxis Wrote: I'm slowly starting to understand! lol
So the Signal K server will try to decode nmea connections into Signal K format but even if it can not it will still push this data out to port 10110!

I scanned port 10110 in raw format and can see this;
!AIVDM,2,1,8,A,53P7AsD2<Iu=a4u7:21<B0tl4LR22222222222150pD2574g061PDk0C,0*3D
!AIVDM,1,1,,B,13MARih000wbAbJP0kr23aSV0<0g,0*73

!AIVDM,1,1,,B,13P>Hq0000wbF:RP0jR5dkOF0hHr,0*42

Which is AIS data so I'm guessing the Signal K can not decode this into a json format

Cheers
Paul

Yep,  you've got it! Now annoyingly a few weeks ago I got into the ais data and with some node red saved the distance to the target into an influxdb database. But not a clue now how I did it! Think was to check if any antenna tweaks were helping to pick up more distant targets. No idea how I did it though. Must take a few notes in future...... Wink

Aha, knew it was there somewhere - have you used node-red yet? If you know what a json is then should be easy enough, there's an ais dedcode node - https://flows.nodered.org/node/node-red-...is-decoder

So if you input an AIS message you get this on the output =>
{"mmsi":227006760,"navigationStatus":"Under way using engine","rateOfTurn":128,"speedOverGround":0,"longitude":0.13138,"latitude":49.47557666666667,"courseOverGround":36.7,"trueHeading":511,"timeStampSeconds":14,"date":1607546243406,"isoDate":"2020-12-09 20:37:23","source":"!AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23"}

Thanks for the pointers... I'm still not seeing any data in node-red. I'll probably need to work on it a bit more.
I copied the nmea data that I pulled from port 10110 and ran it through the data fiddler. The fiddler decoded it correctly into json and I was also able to push the send to server button... but unfortunately, I still can't see the data in the signalk data browser or node-red. Even though I have gauges and text boxes working ok for the GPS data and temperature sensors... All very strange! lol


Attached Files Image(s)
   
Reply
#8
I'm getting so close to getting this working! lol


The AIS decoder node is working great when I feed it from port 10110. However, when I wire it to the Signal K connector I get nothing!

It just seams that the AIS data is not getting into Signal K!

Can you think of anything else I could try?


Attached Files Image(s)
   
Reply
#9
Hmm, though I'd replied but it's disappeared - OK, few things to try -
have a look at the server - data fiddler, paste in an ais message like !AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23 and you'll see it as signalk so it *does* get decoded.
Then, and I had to ask over on slack signalk help, go back to the data browser, then the message is there but you have to have a look in the context filter.. it was there all the time.

Also, from your node red - have you tried influxdb? Gold dust, the sigk - influxdb app does it all for you and then chronograf or grafana will make lovely plots.
Reply
#10
(2020-12-10, 01:15 AM)PaddyB Wrote: Hmm, though I'd replied but it's disappeared - OK, few things to try -
have a look at the server - data fiddler, paste in an ais message like !AIVDM,1,1,,A,13HOI:0P0000VOHLCnHQKwvL05Ip,0*23 and you'll see it as signalk so it *does* get decoded.
Then, and I had to ask over on slack signalk help, go back to the data browser, then the message is there but you have to have a look in the context filter.. it was there all the time.

Also, from your node red - have you tried influxdb? Gold dust, the sigk - influxdb app does it all for you and then chronograf or grafana will make lovely plots.

Bingo! I've found them! The context filter was defaulted to 'self' and when I pulled the dropbox down every vessel found by the receiver was listed on the context filter dropdown. When I selected one, all the vessel data was displayed in the Data Browser!

Thank you so much for your help... 

I can see that I need to do alot more reading up on context filters and how to use them in node-red to filter the AIS data from there but i'm definitely moving forward now! Smile

Cheers
Paul
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)