Compare commits
No commits in common. "766879494335ecb88c6a000a37f87584118c3a06" and "95489c1409db26164fa77a2c9493f09cd926f017" have entirely different histories.
7668794943
...
95489c1409
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
Prototype ie-entwicklung@10.2.3.115 Prototype
|
Prototype ie-entwicklung@10.2.3.115 Prototype
|
||||||
Salimax0001 ie-entwicklung@10.2.3.104 Marti Technik (Bern)
|
Salimax0001 ie-entwicklung@10.2.3.104 Marti Technik (Bern)
|
||||||
Salimax0002 ie-entwicklung@10.2.4.29 Weidmann d (ZG)
|
Salimax0002 ie-entwicklung@10.2.4.29 Weidmann Oberwil (ZG)
|
||||||
Salimax0003 ie-entwicklung@10.2.4.33 Elektrotechnik Stefan GmbH
|
Salimax0003 ie-entwicklung@10.2.4.33 Elektrotechnik Stefan GmbH
|
||||||
Salimax0004 ie-entwicklung@10.2.4.32 Biohof Gubelmann (Walde)
|
Salimax0004 ie-entwicklung@10.2.4.32 Biohof Gubelmann (Walde)
|
||||||
Salimax0004A ie-entwicklung@10.2.4.153
|
Salimax0004A ie-entwicklung@10.2.4.153
|
||||||
|
|
|
@ -109,6 +109,7 @@ public static class Aggregator
|
||||||
var batteryChargePower = new List<Double>();
|
var batteryChargePower = new List<Double>();
|
||||||
|
|
||||||
|
|
||||||
|
Console.WriteLine("-----------------------------------------------------------------------------------------------------------------");
|
||||||
Console.WriteLine("File timestamp should start after "+ afterTimestamp);
|
Console.WriteLine("File timestamp should start after "+ afterTimestamp);
|
||||||
|
|
||||||
foreach (var csvFile in csvFiles)
|
foreach (var csvFile in csvFiles)
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class AcDcDevicesRecord
|
||||||
public SystemControlRegisters? SystemControl { get; }
|
public SystemControlRegisters? SystemControl { get; }
|
||||||
public IReadOnlyList<AcDcRecord> Devices { get; init; }
|
public IReadOnlyList<AcDcRecord> Devices { get; init; }
|
||||||
|
|
||||||
//public IEnumerable<AlarmMessage> Alarms => new []{AlarmMessage.}; //Devices.SelectMany(d => d.Status.Alarms).Distinct();
|
//public IEnumerable<AlarmMessage> Alarms => new []{AlarmMessage.OvercurrentBalancer}; //Devices.SelectMany(d => d.Status.Alarms).Distinct();
|
||||||
//public IEnumerable<WarningMessage> Warnings => new []{WarningMessage.DcOffset}; //Devices.SelectMany(d => d.Status.Warnings).Distinct();
|
//public IEnumerable<WarningMessage> Warnings => new []{WarningMessage.DcOffset}; //Devices.SelectMany(d => d.Status.Warnings).Distinct();
|
||||||
|
|
||||||
public IEnumerable<AlarmMessage> Alarms => Devices.SelectMany(d => d.Status.Alarms).Distinct();
|
public IEnumerable<AlarmMessage> Alarms => Devices.SelectMany(d => d.Status.Alarms).Distinct();
|
||||||
|
|
|
@ -5,8 +5,7 @@ import { findPower, formatPowerForGraph } from 'src/Resources/formatPower';
|
||||||
export const getChartOptions = (
|
export const getChartOptions = (
|
||||||
chartInfo: chartInfoInterface,
|
chartInfo: chartInfoInterface,
|
||||||
type: string,
|
type: string,
|
||||||
dateList: string[],
|
dateList: string[]
|
||||||
stacked: Boolean
|
|
||||||
): ApexOptions => {
|
): ApexOptions => {
|
||||||
return type.includes('daily')
|
return type.includes('daily')
|
||||||
? {
|
? {
|
||||||
|
@ -216,8 +215,7 @@ export const getChartOptions = (
|
||||||
bar: {
|
bar: {
|
||||||
//If min<0 and max>0, then we have 2 stacked bars, one with positive and one with negative values, so each one of them should have border radius. \
|
//If min<0 and max>0, then we have 2 stacked bars, one with positive and one with negative values, so each one of them should have border radius. \
|
||||||
//Otherwise, we have a single bar or two stacked bars either with positive or negative values.
|
//Otherwise, we have a single bar or two stacked bars either with positive or negative values.
|
||||||
borderRadius:
|
borderRadius: chartInfo.min <= 0 && chartInfo.max > 0 ? [10] : 10,
|
||||||
stacked && chartInfo.min <= 0 && chartInfo.max > 0 ? [10] : 10,
|
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
position: 'top'
|
position: 'top'
|
||||||
}
|
}
|
||||||
|
@ -261,13 +259,9 @@ export const getChartOptions = (
|
||||||
? Math.ceil(chartInfo.min / findPower(chartInfo.min).value) *
|
? Math.ceil(chartInfo.min / findPower(chartInfo.min).value) *
|
||||||
findPower(chartInfo.min).value
|
findPower(chartInfo.min).value
|
||||||
: Math.abs(chartInfo.min) < 1
|
: Math.abs(chartInfo.min) < 1
|
||||||
? -Math.max(
|
? +(
|
||||||
Math.abs(
|
|
||||||
Math.ceil(chartInfo.min / findPower(chartInfo.min).value) *
|
Math.ceil(chartInfo.min / findPower(chartInfo.min).value) *
|
||||||
findPower(chartInfo.min).value
|
findPower(chartInfo.min).value
|
||||||
),
|
|
||||||
Math.ceil(chartInfo.max / findPower(chartInfo.max).value) *
|
|
||||||
findPower(chartInfo.max).value
|
|
||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
: undefined,
|
: undefined,
|
||||||
max:
|
max:
|
||||||
|
@ -279,11 +273,7 @@ export const getChartOptions = (
|
||||||
: chartInfo.max <= 0
|
: chartInfo.max <= 0
|
||||||
? 0
|
? 0
|
||||||
: Math.abs(chartInfo.min) < 1
|
: Math.abs(chartInfo.min) < 1
|
||||||
? +Math.max(
|
? +(
|
||||||
Math.abs(
|
|
||||||
Math.ceil(chartInfo.min / findPower(chartInfo.min).value) *
|
|
||||||
findPower(chartInfo.min).value
|
|
||||||
),
|
|
||||||
Math.ceil(chartInfo.max / findPower(chartInfo.max).value) *
|
Math.ceil(chartInfo.max / findPower(chartInfo.max).value) *
|
||||||
findPower(chartInfo.max).value
|
findPower(chartInfo.max).value
|
||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
|
|
|
@ -584,8 +584,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
dailyDataArray[chartState].chartOverview.overview,
|
dailyDataArray[chartState].chartOverview.overview,
|
||||||
'dailyoverview',
|
'dailyoverview',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -665,8 +664,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
weeklyDataArray.chartOverview.overview,
|
weeklyDataArray.chartOverview.overview,
|
||||||
'overview',
|
'overview',
|
||||||
weeklyDateList,
|
weeklyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -703,8 +701,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
monthlyDataArray.chartOverview.overview,
|
monthlyDataArray.chartOverview.overview,
|
||||||
'overview',
|
'overview',
|
||||||
monthlyDateList,
|
monthlyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -785,8 +782,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
dailyDataArray[chartState].chartOverview.soc,
|
dailyDataArray[chartState].chartOverview.soc,
|
||||||
'daily',
|
'daily',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -811,8 +807,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
weeklyDataArray.chartOverview.soc,
|
weeklyDataArray.chartOverview.soc,
|
||||||
'weekly',
|
'weekly',
|
||||||
weeklyDateList,
|
weeklyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -836,8 +831,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
monthlyDataArray.chartOverview.soc,
|
monthlyDataArray.chartOverview.soc,
|
||||||
'monthly',
|
'monthly',
|
||||||
monthlyDateList,
|
monthlyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -897,8 +891,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
dailyDataArray[chartState].chartOverview.dcPower,
|
dailyDataArray[chartState].chartOverview.dcPower,
|
||||||
'daily',
|
'daily',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -923,8 +916,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
weeklyDataArray.chartOverview.dcPower,
|
weeklyDataArray.chartOverview.dcPower,
|
||||||
'weekly',
|
'weekly',
|
||||||
weeklyDateList,
|
weeklyDateList
|
||||||
false
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -934,7 +926,7 @@ function Overview(props: OverviewProps) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.heatingPower,
|
...weeklyDataArray.chartData.heatingPower,
|
||||||
color: '#ff9900'
|
color: '#000000'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.dcDischargingPower,
|
...weeklyDataArray.chartData.dcDischargingPower,
|
||||||
|
@ -952,8 +944,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
monthlyDataArray.chartOverview.dcPower,
|
monthlyDataArray.chartOverview.dcPower,
|
||||||
'monthly',
|
'monthly',
|
||||||
monthlyDateList,
|
monthlyDateList
|
||||||
false
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -961,10 +952,6 @@ function Overview(props: OverviewProps) {
|
||||||
...monthlyDataArray.chartData.dcChargingPower,
|
...monthlyDataArray.chartData.dcChargingPower,
|
||||||
color: '#69d2e7'
|
color: '#69d2e7'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
...weeklyDataArray.chartData.heatingPower,
|
|
||||||
color: '#ff9900'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.dcDischargingPower,
|
...monthlyDataArray.chartData.dcDischargingPower,
|
||||||
color: '#008FFB'
|
color: '#008FFB'
|
||||||
|
@ -1024,8 +1011,7 @@ function Overview(props: OverviewProps) {
|
||||||
dailyDataArray[chartState].chartOverview
|
dailyDataArray[chartState].chartOverview
|
||||||
.temperature,
|
.temperature,
|
||||||
'daily',
|
'daily',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -1082,8 +1068,7 @@ function Overview(props: OverviewProps) {
|
||||||
dailyDataArray[chartState].chartOverview
|
dailyDataArray[chartState].chartOverview
|
||||||
.dcBusVoltage,
|
.dcBusVoltage,
|
||||||
'daily',
|
'daily',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -1154,8 +1139,7 @@ function Overview(props: OverviewProps) {
|
||||||
dailyDataArray[chartState].chartOverview
|
dailyDataArray[chartState].chartOverview
|
||||||
.pvProduction,
|
.pvProduction,
|
||||||
'daily',
|
'daily',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -1181,8 +1165,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
weeklyDataArray.chartOverview.pvProduction,
|
weeklyDataArray.chartOverview.pvProduction,
|
||||||
'weekly',
|
'weekly',
|
||||||
weeklyDateList,
|
weeklyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -1202,8 +1185,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
monthlyDataArray.chartOverview.pvProduction,
|
monthlyDataArray.chartOverview.pvProduction,
|
||||||
'monthly',
|
'monthly',
|
||||||
monthlyDateList,
|
monthlyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -1259,8 +1241,7 @@ function Overview(props: OverviewProps) {
|
||||||
dailyDataArray[chartState].chartOverview
|
dailyDataArray[chartState].chartOverview
|
||||||
.gridPower,
|
.gridPower,
|
||||||
'daily',
|
'daily',
|
||||||
[],
|
[]
|
||||||
true
|
|
||||||
),
|
),
|
||||||
chart: {
|
chart: {
|
||||||
events: {
|
events: {
|
||||||
|
@ -1284,8 +1265,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
weeklyDataArray.chartOverview.gridPower,
|
weeklyDataArray.chartOverview.gridPower,
|
||||||
'weekly',
|
'weekly',
|
||||||
weeklyDateList,
|
weeklyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
@ -1310,8 +1290,7 @@ function Overview(props: OverviewProps) {
|
||||||
...getChartOptions(
|
...getChartOptions(
|
||||||
monthlyDataArray.chartOverview.gridPower,
|
monthlyDataArray.chartOverview.gridPower,
|
||||||
'monthly',
|
'monthly',
|
||||||
monthlyDateList,
|
monthlyDateList
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
|
|
|
@ -108,7 +108,7 @@ export const transformInputToDailyData = async (
|
||||||
while (startUnixTime < endTimestamp) {
|
while (startUnixTime < endTimestamp) {
|
||||||
timestampPromises.push(fetchData(startUnixTime, s3Credentials));
|
timestampPromises.push(fetchData(startUnixTime, s3Credentials));
|
||||||
|
|
||||||
startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + diff / 200);
|
startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + diff / 100);
|
||||||
if (startUnixTime.ticks % 2 !== 0) {
|
if (startUnixTime.ticks % 2 !== 0) {
|
||||||
startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + 1);
|
startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue