diff --git a/assets/index.html b/assets/index.html index 906833d2..4d8c7bff 100644 --- a/assets/index.html +++ b/assets/index.html @@ -37,26 +37,11 @@ - -

Measurements

${ message }

- - +
@@ -67,49 +52,333 @@

Measurements

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${ idx }
DC Voltage (V)${ m.DCVoltageS1 }${ m.DCVoltageS2 }${ m.DCVoltageS3 }${ m.DCVoltage }
DC Current (A)${ m.DCCurrentS1 }${ m.DCCurrentS2 }${ m.DCCurrentS3 }${ m.DCCurrent }
DC Power (W)${ m.DCPowerS1 }${ m.DCPowerS2 }${ m.DCPowerS3 }${ m.DCPower }
Charge State (%)${ m.ChargeState }
Battery Voltage (V)${ m.BatteryVoltage }
Voltage (V)${ m.VoltageL1 }${ m.VoltageL2 }${ m.VoltageL3 }${ m.Voltage }
Current (A)${ m.CurrentL1 }${ m.CurrentL2 }${ m.CurrentL3 }${ m.Current }${ (val(m.CurrentL1) + val(m.CurrentL2) + val(m.CurrentL3)).toFixed(2) }
Power (W)${ m.PowerL1 }${ m.PowerL2 }${ m.PowerL3 }${ m.Power }${ (val(m.PowerL1) + val(m.PowerL2) + val(m.PowerL3)).toFixed(2) }
Reactive Power (var)${ m.ReactivePowerL1 }${ m.ReactivePowerL2 }${ m.ReactivePowerL3 }${ m.ReactivePower }${ (val(m.ReactivePowerL1) + val(m.ReactivePowerL2) + + val(m.ReactivePowerL3)).toFixed(2) }
Apparent Power (VA)${ m.ApparentPowerL1 }${ m.ApparentPowerL2 }${ m.ApparentPowerL3 }${ m.ApparentPower }${ (val(m.ApparentPowerL1) + val(m.ApparentPowerL2) + + val(m.ApparentPowerL3)).toFixed(2) }
Import Power (W)${ m.ImportPowerL1 }${ m.ImportPowerL2 }${ m.ImportPowerL3 }${ m.ImportPower }${ (val(m.ImportPowerL1) + val(m.ImportPowerL2) + + val(m.ImportPowerL3)).toFixed(2) } +
Export Power (W)${ m.ExportPowerL1 }${ m.ExportPowerL2 }${ m.ExportPowerL3 }${ m.ExportPower }${ (val(m.ExportPowerL1) + val(m.ExportPowerL2) + + val(m.ExportPowerL3)).toFixed(2) }
Sum (kWh)${ m.SumL1 }${ m.SumL2 }${ m.SumL3 }${ m.Sum }${ (val(m.SumL1) + val(m.SumL2) + val(m.SumL3)).toFixed(2) }
Tariff 1 Sum (kWh)${ m.SumT1 }
Tariff 2 Sum (kWh)${ m.SumT2 }
Import (kWh)${ m.ImportL1 }${ m.ImportL2 }${ m.ImportL3 }${ m.Import }${ (val(m.ImportL1) + val(m.ImportL2) + val(m.ImportL3)).toFixed(2) }
Tariff 1 Import (kWh)${ m.ImportT1 }
Tariff 2 Import (kWh)${ m.ImportT2 }
Export (kWh)${ m.ExportL1 }${ m.ExportL2 }${ m.ExportL3 }${ m.Export }${ (val(m.ExportL1) + val(m.ExportL2) + val(m.ExportL3)).toFixed(2) }
Tariff 1 Export (kWh)${ m.ExportT1 }
Tariff 2 Export (kWh)${ m.ExportT2 }
Reactive Sum (kvarh)${ m.ReactiveSumL1 }${ m.ReactiveSumL2 }${ m.ReactiveSumL3 }${ m.ReactiveSum }${ (val(m.ReactiveSumL1) + val(m.ReactiveSumL2) + val(m.ReactiveSumL3)).toFixed(2) }
Tariff 1 Reactive Sum (kvarh)${ m.ReactiveSumT1 }
Tariff 2 Reactive Sum (kvarh)${ m.ReactiveSumT2 }
Reactive Import (kvarh)${ m.ReactiveImportL1 }${ m.ReactiveImportL2 }${ m.ReactiveImportL3 }${ m.ReactiveImport }${ (val(m.ReactiveImportL1) + val(m.ReactiveImportL2) + + val(m.ReactiveImportL3)).toFixed(2) }
Tariff 1 Reactive Import (kvarh)${ m.ReactiveImportT1 }
Tariff 2 Reactive Import (kvarh)${ m.ReactiveImportT2 }
Reactive Export (kvarh)${ m.ReactiveExportL1 }${ m.ReactiveExportL2 }${ m.ReactiveExportL3 }${ m.ReactiveExport }${ (val(m.ReactiveExportL1) + val(m.ReactiveExportL2) + + val(m.ReactiveExportL3)).toFixed(2) }
Tariff 1 Reactive Export (kvarh)${ m.ReactiveExportT1 }
Tariff 2 Reactive Export (kvarh)${ m.ReactiveExportT2 }
Power Factor (cos 𝜑)${ m.CosphiL1 }${ m.CosphiL2 }${ m.CosphiL3 }${ m.Cosphi }
THD Voltage (%)${ m.THDL1 }${ m.THDL2 }${ m.THDL3 }${ m.THD }
Phase Angle${ m.PhaseAngle }
Frequency (Hz)${ m.Frequency }
Heatsink Temperature (°C)${ m.HeatsinkTemp }
diff --git a/assets/js/app.js b/assets/js/app.js index e4c3ea15..852d2f3f 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -1,6 +1,6 @@ let sort = { methods: { - sorted: function (theMap) { + sorted: function(theMap) { var devs = Object.keys(theMap); devs.sort(); var res = {}; @@ -12,77 +12,50 @@ let sort = { } } -let formatter = { +var dataapp = new Vue({ + el: '#realtime', + delimiters: ['${', '}'], + mixins: [sort], + data: { + meters: {}, + message: 'Loading...' + }, methods: { + // pop returns true if it was called with any non-null argument + pop: function () { + for(var i=0; i