|
| 1 | +using Newtonsoft.Json; |
| 2 | +using System; |
| 3 | +using System.Collections.Generic; |
| 4 | +using System.Text; |
| 5 | + |
| 6 | +namespace FroniusSolarClient.Entities.SolarAPI.V1.PowerFlowRealtimeData |
| 7 | +{ |
| 8 | + public class PowerFlowRealtimeData |
| 9 | + { |
| 10 | + public Dictionary<string, Inverters> Inverters { get; set; } |
| 11 | + public Site Site { get; set; } |
| 12 | + |
| 13 | + /// <summary> |
| 14 | + /// Describes the available fields for this request (PowerFlowVersion) |
| 15 | + /// </summary> |
| 16 | + public string Version { get; set; } |
| 17 | + } |
| 18 | + |
| 19 | + public class Inverters |
| 20 | + { |
| 21 | + /// <summary> |
| 22 | + /// Device type of inverter |
| 23 | + /// </summary> |
| 24 | + [JsonProperty("DT")] |
| 25 | + public int DT { get; set; } |
| 26 | + |
| 27 | + /// <summary> |
| 28 | + /// Energy [Wh] this day, null if no inverter is connected |
| 29 | + /// </summary> |
| 30 | + [JsonProperty("E_Day")] |
| 31 | + public decimal EDay { get; set; } |
| 32 | + |
| 33 | + /// <summary> |
| 34 | + /// Energy [Wh] ever since, null if no inverter is connected |
| 35 | + /// </summary> |
| 36 | + [JsonProperty("E_Total")] |
| 37 | + public decimal ETotal { get; set; } |
| 38 | + |
| 39 | + /// <summary> |
| 40 | + /// Energy [Wh] this year, null if no inverter is connected |
| 41 | + /// </summary> |
| 42 | + [JsonProperty("E_Year")] |
| 43 | + public decimal EYear { get; set; } |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// Current state of charge in % ( 0 - 100% ) |
| 47 | + /// </summary> |
| 48 | + [JsonProperty("SOC")] |
| 49 | + public decimal SOC { get; set; } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Current power in Watt, null if not running |
| 53 | + /// </summary> |
| 54 | + [JsonProperty("P")] |
| 55 | + public int P { get; set; } |
| 56 | + |
| 57 | + /// <summary> |
| 58 | + /// "disabled", "normal", "service", "charge boost", |
| 59 | + /// "nearly depleted", "suspended", "calibrate", |
| 60 | + /// "grid support", "deplete recovery", "non operable (voltage)", |
| 61 | + /// "non operable (temperature)", "preheating" or "startup" |
| 62 | + /// </summary> |
| 63 | + [JsonProperty("Battery_Mode")] |
| 64 | + public string BatteryMode { get; set; } |
| 65 | + } |
| 66 | + public class Site |
| 67 | + { |
| 68 | + /// <summary> |
| 69 | + /// Energy [Wh] this day, null if no inverter is connected |
| 70 | + /// </summary> |
| 71 | + [JsonProperty("E_Day")] |
| 72 | + public decimal EDay { get; set; } |
| 73 | + |
| 74 | + /// <summary> |
| 75 | + /// Energy [Wh] ever since, null if no inverter is connected |
| 76 | + /// </summary> |
| 77 | + [JsonProperty("E_Total")] |
| 78 | + public decimal ETotal { get; set; } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Energy [Wh] this year, null if no inverter is connected |
| 82 | + /// </summary> |
| 83 | + [JsonProperty("E_Year")] |
| 84 | + public decimal EYear { get; set; } |
| 85 | + |
| 86 | + /// <summary> |
| 87 | + /// "load", "grid" or "unknown" (during backup power) |
| 88 | + /// </summary> |
| 89 | + [JsonProperty("Meter_Location")] |
| 90 | + public string MeterLocation { get; set; } |
| 91 | + |
| 92 | + /// <summary> |
| 93 | + /// "produce-only", "meter", "vague-meter", "bidirectional" or "ac-coupled" |
| 94 | + /// </summary> |
| 95 | + public string Mode { get; set; } |
| 96 | + |
| 97 | + /// <summary> |
| 98 | + /// This value is null if no battery is active ( + charge, - discharge ) |
| 99 | + /// </summary> |
| 100 | + [JsonProperty("P_Akku")] |
| 101 | + public int PAkku { get; set; } |
| 102 | + |
| 103 | + /// <summary> |
| 104 | + /// This value is null if no meter is enabled ( + from grid, - to grid ) |
| 105 | + /// </summary> |
| 106 | + [JsonProperty("P_Grid")] |
| 107 | + public int PGrid { get; set; } |
| 108 | + |
| 109 | + /// <summary> |
| 110 | + /// This value is null if no meter is enabled ( + generator, - consumer ) |
| 111 | + /// </summary> |
| 112 | + [JsonProperty("P_Load")] |
| 113 | + public int PLoad { get; set; } |
| 114 | + |
| 115 | + /// <summary> |
| 116 | + /// This value is null if inverter is not running ( + production ( default ) ) |
| 117 | + /// </summary> |
| 118 | + [JsonProperty("P_PV")] |
| 119 | + public int PPV { get; set; } |
| 120 | + |
| 121 | + /// <summary> |
| 122 | + /// Current relative autonomy in %, null if no smart meter is connected |
| 123 | + /// </summary> |
| 124 | + [JsonProperty("rel_Autonomy")] |
| 125 | + public int RelAutonomy { get; set; } |
| 126 | + |
| 127 | + /// <summary> |
| 128 | + /// Current relative self consumption in %, null if no smart meter is connected |
| 129 | + /// </summary> |
| 130 | + [JsonProperty("rel_SelfConsumption")] |
| 131 | + public int RelSelfConsumption { get; set; } |
| 132 | + |
| 133 | + /// <summary> |
| 134 | + /// Field is available if configured (false) or active (true) |
| 135 | + /// If not available, mandatory config is not set |
| 136 | + /// </summary> |
| 137 | + [JsonProperty("BackupMode")] |
| 138 | + public int BackupMode { get; set; } |
| 139 | + |
| 140 | + /// <summary> |
| 141 | + /// True when battery is in standby |
| 142 | + /// </summary> |
| 143 | + [JsonProperty("BatteryStandby")] |
| 144 | + public int BatteryStandby { get; set; } |
| 145 | + } |
| 146 | +} |
0 commit comments