SignalK / node-red-embedded

Node red nodes for use with the signalk-node-red plugin
Apache License 2.0
12 stars 2 forks source link

Converting SignalK battery data to NMEA200 #31

Closed Selene53 closed 10 months ago

Selene53 commented 10 months ago

HI, I'm having trouble converting SK to N2K in Node-red. I have a "subscriber node" connected to a "function node" which takes the single voltage as a string and creates json: const pgn = { "pgn": 127508, "Battery Instance": 0, "Instance":0, "Voltage": Number(msg.payload ), "Current": 0, "Temperature":0 } msg.payload = pgn; return msg;

Here is the debug Output: {pgn: 127508, Battery Instance: 0, Instance: 0, Voltage: 26.3, Current: 0, Temperature: 0}

from this function its going to a "signalk-send-nmea2000" node

If I check in "SignalK Server Log" under "signalk-server:events:nmeaJsonOut" I see the data: "Oct 18 12:04:46 2023-10-18T19:04:46.052Z signalk-server:events:nmea2000JsonOut [ { pgn: 127508, 'Battery Instance': 0, Instance: 0, Voltage: 26.55, Current: 0, Temperature: 0 } ]"

But I don't see any reference of it under "signalk-to-nema2000" or under the WebApps @Mxtommy/Kip

Any help? Thanks

sbender9 commented 10 months ago

What exactly are you trying to do?

You would not see this in kip or anywhere else in SK. You would only see it on other n2k devices. This just sends out n2k data.

Seems like you should just being using the signalk-to-nmea2000 plugin, no reason to be using node-red here.

Selene53 commented 10 months ago

I was trying just signalk and I thought I would see it on my Actisence NGK input to signalK but didn't, so I tried Node-red. I am seeing other instruments like the depth sounder coming in to signalk from the Actisence. Should I just assume its going out.

Backgound is I'm trying to take sensor battery data from an ESP8266 and send it to a chart plotter. Its getting in signalK Path Value Units Timestamp Source Battery BowThruster.2.label "BowThruster 2" 10/18 12:31:22 ESPDevices

Thanks for responding.

sbender9 commented 10 months ago

Yeah, you won't see outgoing data on the Actisense. You need to confirm with another n2k device on the network.

Selene53 commented 10 months ago

Thanks, I Really appreciate your quick responce.