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
SeaTalk 1 to NMEA0183/2000 with Raspberry Pi
#31
(2021-03-13, 11:35 PM)Pierrot277 Wrote: Hello everybody,

Thanks for all of these answers and informations.
I am actually looking at how to connect my raymarine ST70 instruments to the raspberry. ST70 instruments are connected via a seatalkNG cable and not via a standard seatalk cable.
My question is, am i able to connect via an octocoupler as described above my instruments to the raspberry using pin numbers 6 and 2 (see the picture) on the seatalkNG white cable?

Thanks for the highlight....
Yes that should work. But I would check that the ST70 really outputs ST1 and that the ST NG cable really have the pin 6 populated. 
On the other hand I wouldn't go for ST1 !!
You are building for the future using ST NG/N2K using for example one of these products
https://github.com/SignalK/signalk-serve...00-can-bus
/Mats
________________________________________

Blog; https://pysselilivet.blogspot.com/
Reply
#32
(2021-03-14, 05:21 PM)MatsA Wrote:
(2021-03-13, 11:35 PM)Pierrot277 Wrote: Hello everybody,

Thanks for all of these answers and informations.
I am actually looking at how to connect my raymarine ST70 instruments to the raspberry. ST70 instruments are connected via a seatalkNG cable and not via a standard seatalk cable.
My question is, am i able to connect via an octocoupler as described above my instruments to the raspberry using pin numbers 6 and 2 (see the picture) on the seatalkNG white cable?

Thanks for the highlight....
Yes that should work. But I would check that the ST70 really outputs ST1 and that the ST NG cable really have the pin 6 populated. 
On the other hand I wouldn't go for ST1 !!
You are building for the future using ST NG/N2K using for example one of these products
https://github.com/SignalK/signalk-serve...00-can-bus
/Mats
 Hey Mats, 

Thanks for the advice, i think you are right and there is maybe nothing on the pin 6. 
I will use the waveshare RS485 can hat and configure directly via openplotter. It's maybe a more easier option.
Reply
#33
(2020-09-08, 01:10 AM)Cari20 Wrote: https://github.com/dnegrotti/seatalk1_ou...lk1_out.py

You can import the flow directly into Nodered with this code:

Code:
[{"id":"c964b9cf.79b678","type":"signalk-app-event","z":"46419c75.a897b4","name":"NMEA0183 Out","event":"seatalkOut","x":110,"y":140,"wires":[["4633789b.f5aac8"]]},{"id":"4633789b.f5aac8","type":"python-function","z":"46419c75.a897b4","name":"Seatalk1 Out","func":"#!/usr/bin/env python\n#Sends seatalk1 datagrams to serial output\n#By Cari20 (2020) loosely based on Marco Bergman ST2000 RPi remote\n\nimport RPi.GPIO as GPIO\nimport serial\nimport binascii\n\nmsg2 = msg['payload']\nlst = msg2.split(\"*\")[0].split(\",\")\nlst.append(msg2.split(\"*\")[1])\n\nif lst[0]=='$STALK':\n  with serial.Serial('/dev/serial0', 4800, timeout=10, writeTimeout=0) as ser:\n      ser.parity = serial.PARITY_MARK\n      ser.write(binascii.unhexlify(lst[1]))\n      ser.parity = serial.PARITY_SPACE\n      for i in lst[2:-1]:\n        ser.write(binascii.unhexlify(i))\n      ser.close()\n\nreturn msg","outputs":1,"x":290,"y":140,"wires":[[]]}]


With this setup you can have bidirectional communication with the ST2000 and the autopilot app is fully functional, I have a very long ToDo list to keep adding functionality, as I mentioned before the ST40 emulation and also the OpenCPN waypoint navigation. This can be extended to any signalk event provided you translate it to a seatalk1 datagram and inject the message into the “Seatalk1 Out” node. 

If you (or any other member) need any further details feel free to enquire.

Cari20

Cari20, Great work and also for SignalK team.
When I imported and examine the node for phyton function while waiting my circuit parts for boat test, I see the some parsing for *$STALK but when I tested this on phyton at VSC at home, the output is not exactly what I expected. 
I'm not experienced on programming maybe  I'm missing something here?
Your support appreciated,
Thanks,Sancan
Test code and result is:
#Sends seatalk1 datagrams to serial output\
#By Cari20 (2020) loosely based on Marco Bergman ST2000 RPi remote\
msg2 = '*$STALK,30,00,0C'
print(msg2)
lst = msg2.split('*')[0].split(',')
print(lst)
lst.append(msg2.split('*')[1])
print(lst)
if lst[0]=='*$STALK':
   print('helloinif')
   for i in lst[2:-1]:
       print(lst[i])
       print('helloinloop')

Sancans-MacBook-Pro-2:~ sensesp$ /usr/bin/python /Users/sensesp/Documents/PythonScripts/gpioseatalk.py

*$STALK,30,00,0C

['']

['', '$STALK,30,00,0C']
Sancans-MacBook-Pro-2:~ sensesp$ 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)