SK
Signal K5mo ago
chris

sk-to-nmea2000: Battery state of charge missing on n2k side?

I collect battery data via the victron plugin and have voltages, current, state of charge available in sk. I want to display this data on n2k devices (Raymarine a67 plotter, i70s display.). In the plugin sk-to-nmea2000 I configured my battery instances 0 and 1, as intended I then see voltages and currents on my nmea2000 devices. But state of charge does not show up. As a workaround I also mapped battery state of charge to the tank level of a "dummy tank" and configured this tank in sk-to-nmea2000. Then I can see battery state of charge as tank level on my n2k devices. What can be the problem, that I am not able to directly send battery state of charge to n2k?
41 Replies
Scott Bender
Scott Bender5mo ago
This should definitely work. Turn on debug for the plugin so we can see what it’s sending…
chris
chris5mo ago
here an example: May 09 17:27:13 2024-05-09T17:27:13.548Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":127506,"DC Instance":1,"DC Type":"Battery","Instance":1,"State of Charge":95.8,"Time Remaining":-60,"Ripple Voltage":null} On first sight: Here, SOC is sent as 95.8, tank level ist sent as fraction of 1. How is battery SOC defined in n2k? Fraction of 100 or fraction of 1?
Scott Bender
Scott Bender5mo ago
fraction of 100 Tanks too
chris
chris5mo ago
Thats what I get for tanks: May 09 17:31:16 2024-05-09T17:31:16.553Z signalk-to-nmea2000 tanks.fuel.1.currentLevel,tanks.fuel.1.capacity:0.959, shown as 95.9% on the n2k side
Scott Bender
Scott Bender5mo ago
that’s the sk value That’s not the n2k message
chris
chris5mo ago
true May 09 17:31:16 2024-05-09T17:31:16.553Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":127505,"Instance":1,"Type":"Fuel","Level":95.89999999999999,"Capacity":0} understood 😉
Scott Bender
Scott Bender5mo ago
I know this used to work and hasn’t changed I need to check on my i70. You definitely don’t have any conflicts, right? Something else could be sending info or battery instance 0 or 1?
chris
chris5mo ago
Have to check debug log, good to know at this point, that above log messages should be ok
Scott Bender
Scott Bender5mo ago
Going to test in lab now with a garmin mfd. will check my i70 next time I’m on the boat…
chris
chris5mo ago
no hurry, its something where I use the "tank level" workaround since two or three years since there were other priorities. Now decided, to finally try to figure out what is going on here. Now on a completely new system, new raspbian, latest sk server, waveshare CAN hat instead of ikonvert etc. All works perfectly fine, but still this issue with the battery SOC
Scott Bender
Scott Bender5mo ago
Garmin is seeing it. And setup similar to yours. Battery info is coming from a Cerbo.
chris
chris5mo ago
This here is what I extracted from sk-to-n2k debug log with respect to my batteries: May 09 17:31:17 2024-05-09T17:31:17.047Z signalk-to-nmea2000 electrical.batteries.0.voltage,electrical.batteries.0.current,electrical.batteries.0.temperature,electrical.batteries.0.capacity.stateOfCharge,electrical.batteries.0.capacity.timeRemaining,electrical.batteries.0.capacity.stateOfHealth,electrical.batteries.0.ripple:13.57,,,,,, May 09 17:31:17 2024-05-09T17:31:17.048Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":127508,"Battery Instance":0,"Instance":0,"Voltage":13.57,"Current":null,"Temperature":null} May 09 17:31:17 2024-05-09T17:31:17.050Z signalk-to-nmea2000 electrical.batteries.1.voltage,electrical.batteries.1.current,electrical.batteries.1.temperature,electrical.batteries.1.capacity.stateOfCharge,electrical.batteries.1.capacity.timeRemaining,electrical.batteries.1.capacity.stateOfHealth,electrical.batteries.1.ripple:13.731,3.37,,0.959,-60,, May 09 17:31:17 2024-05-09T17:31:17.050Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":127508,"Battery Instance":1,"Instance":1,"Voltage":13.731,"Current":3.37,"Temperature":null} May 09 17:31:17 2024-05-09T17:31:17.051Z signalk-to-nmea2000 emit nmea2000JsonOut {"pgn":127506,"DC Instance":1,"DC Type":"Battery","Instance":1,"State of Charge":95.89999999999999,"Time Remaining":-60,"Ripple Voltage":null} instance 0: starter battery, only voltage. instance 1: house battery, voltage, current and SOC next time you're on the boat it would be interesting, if your i70 sees it
Scott Bender
Scott Bender4mo ago
Your data looks very similar to mine Might be on the boat later today, definitely tomorrow… My i70 sees it
Scott Bender
Scott Bender4mo ago
No description
Scott Bender
Scott Bender4mo ago
They call it “Battery Charge”
Want results from more Discord servers?
Add your server