Corretto il percorso del messaggio SignalK per il BMS e semplificato il nome del campo SOC
This commit is contained in:
4
index.js
4
index.js
@@ -32,7 +32,7 @@ module.exports = function (app) {
|
||||
let opts = null;
|
||||
const timers = new Set();
|
||||
|
||||
const sk = (path, value) => ({ path: `electrical.batteries.${opts.batteryId}.${path}`, value });
|
||||
const sk = (path, value) => ({ path: `meb.battery.${opts.batteryId}.${path}`, value });
|
||||
const sendDelta = values => values && values.length && app.handleMessage(plugin.id, { updates: [{ values }] });
|
||||
|
||||
const safe = async (label, fn) => {
|
||||
@@ -47,7 +47,7 @@ module.exports = function (app) {
|
||||
sendDelta([
|
||||
sk('voltage', s.total_voltage),
|
||||
sk('current', s.current), // SignalK: + = uscita (scarica), come Daly
|
||||
sk('capacity.stateOfCharge', s.soc_percent / 100)
|
||||
sk('soc', s.soc_percent / 100)
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user