(2023-07-13, 04:14 PM)SCarns Wrote: Greetings,
Here's a dumb thing:
I'm trying to set up a new SK server at home and need to use Node Red to insert navigation coordinates, as I don't have a GPS set up yet. However, I can't get the simple thing to work. Can someone smarter than me give me the proper syntax to use, please?
Much appreciated.
Thanks!
Steve
By "can't get anything to work" do you mean that you are struggling to get workflows in node red to properly handle whatever logic you tried to set up, or do you mean that you can't access or take action on specific inputs (or outputs) from signalk data? For what it's worth, node red can be a little tricky to use, since its underlying data format is json/java and so the logic you set up expects this format, if that makes any sense. I struggled with mqtt attached devices where, for example, the topic appeared as a string (to my human eyes) but was actually a boolean payload. If plain english logic is replaced by a java script function, things worked great, but it was super tricky for me to figure out how to create plain english/drag and drop equivalents, even if they appeared correct. The way I fix a lot of this is to use super generic but functional operator logic (eg, rather than using "== string X", I would use "includes x", where X is the value of the data I want to act on), and that seems to work mostly.
Not sure if this is your issue or if this is at all helpful but know that node red can be tricky for the reason I described. I suggest sticking debug node to output the whole message at each step of the workflow, then trial and error your way through finding the operators that work. Alternatively, just use the function mode and create java script to handle logic. Node red lives java script, so that is probably a sure bet (use Claude or gemini to create the script if coding is not your thing, at least this can help you know that node red is working.
If you share specific details of what's not working, I'm happy to try and help further, it took me a long time to figure out how to give node red the data/format/type it wanted for certain signalk inputs (like mqtt), whereas others (like nmea0183) were much more forgiving.