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