forked from dupondje/nrgkick-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnrgcp.proto
1520 lines (1463 loc) · 45.5 KB
/
nrgcp.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
syntax = "proto3";
package nrgkick;
option go_package = "github.com/dupondje/nrgkick/protobuf/nrgcp";
// Base Messages
message Nrgcp {
message Header {
enum Type {
UNKNOWN_TYPE = 0;
GET = 1;
UPDATE = 2;
NOTIFY = 3;
DELETE = 4;
ADD = 5;
}
enum Status {
UNKNOWN_STATUS = 0;
ACCEPTED = 1;
REJECTED = 2;
}
enum Service {
UNKNOWN_SERVICE = 0;
CHARGE_CONTROL = 1;
WIFI = 2;
DEVICE_CONTROL = 3;
NRGDP = 4;
OCPP = 5;
TIMEBASEDCHARGING = 6;
SOLAR_CHARGING = 7;
LICENSE_SERVICE = 8;
STATISTICS = 9;
}
enum Property {
UNKNOWN_PROPERTY = 0;
DYNAMIC_VALUES = 1;
SETTINGS = 2;
INFO = 3;
NAME = 4;
PASSWORD = 5;
CONNECT = 6;
SCAN = 7;
STATUS = 8;
APP_SETTINGS = 9;
DATA = 10;
CHARGE_VALUES = 11;
SELF_TESTS = 12;
CALIBRATION = 13;
INFO_EXTENDED = 14;
TEMPERATURES = 15;
CHARGE_RECORDS = 16;
CONFIGURATION = 17;
ACTIVATION = 18;
TIMEBASEDCHARGING_SETTINGS = 19;
RESET = 20;
CHARGE_RECORD = 21;
STATE = 22;
LOCATION = 23;
SOLARINVERTER_SCAN = 24;
PROFILES = 25;
PROFILE = 26;
DIAGNOSTIC_DATA = 27;
SYSTEM = 28;
ENERGY_METER_SCAN = 29;
LICENSE_SERVICES_TIME_LEFT_H = 30;
DEVICE_PING = 31;
SMART_LOAD_SCAN = 32;
SOLARBATTERY_SCAN = 33;
SOLAR_STATISTICS_DATA = 34;
SOLAR_STATISTICS_INFO = 35;
SOLAR_FULLSCAN = 36;
}
Type type = 1;
Status status = 2;
Service service = 3;
Property property = 4;
string uuid = 5;
}
message Metadata {
string requestId = 1;
}
message Payload {
NrgcpRequestRejectedPayload ERROR = 1;
NrgcpChargecontrolChargevaluesGetPayload CHARGECONTROL_CHARGEVALUES_GET = 6;
NrgcpChargecontrolSelftestsGetPayload CHARGECONTROL_SELFTESTS_GET = 7;
NrgcpChargecontrolCalibrationvaluesGetPayload CHARGECONTROL_CALIBRATIONVALUES_GET = 8;
NrgcpChargecontrolTemperaturesGetPayload CHARGECONTROL_TEMPERATURES_GET = 17;
NrgcpChargecontrolChargerecordsGetPayload CHARGECONTROL_CHARGERECORDS_GET = 18;
NrgcpChargecontrolDynamicvaluesGetPayload CHARGECONTROL_DYNAMICVALUES_GET = 2;
NrgcpChargecontrolSettingsGetPayload CHARGECONTROL_SETTINGS_GET = 3;
NrgcpChargecontrolSettingsUpdatePayload CHARGECONTROL_SETTINGS_UPDATE = 4;
NrgcpDevicecontrolInfoextendedGetPayload DEVICECONTROL_INFOEXTENDED_GET = 16;
NrgcpDevicecontrolInfoGetPayload DEVICECONTROL_INFO_GET = 5;
NrgcpDevicecontrolInfoUpdatePayload DEVICECONTROL_INFO_UPDATE = 10;
NrgcpWifiConnectUpdatePayload WIFI_CONNECT_UPDATE = 9;
NrgcpWifiScanGetPayload WIFI_SCAN_GET = 11;
NrgcpWifiStatusGetPayload WIFI_STATUS_GET = 12;
NrgcpNrgdpDataGetPayload NRGDP_DATA_GET = 13;
NrgcpDevicecontrolAppsettingsGetPayload DEVICECONTROL_APPSETTINGS_GET = 14;
NrgcpDevicecontrolAppsettingsUpdatePayload DEVICECONTROL_APPSETTINGS_UPDATE = 15;
NrgcpDevicecontrolActivationGetPayload DEVICECONTROL_ACTIVATION_GET = 19;
NrgcpTimebasedchargingChargingEventsGetPayload TIMEBASEDCHARGING_CHARGING_EVENTS_GET = 20;
NrgcpTimebasedchargingChargingEventsUpdatePayload TIMEBASEDCHARGING_CHARGING_EVENTS_UPDATE = 21;
NrgcpDevicecontrolResetUpdatePayload DEVICECONTROL_RESET_UPDATE = 22;
NrgcpChargecontrolChargerecordGetPayload CHARGECONTROL_CHARGERECORD_GET = 23;
NrgcpChargecontrolChargerecordGetPayloadRequest CHARGECONTROL_CHARGERECORD_GET_REQUEST = 24;
NrgcpTimebasedchargingStateGetPayload TIMEBASEDCHARGING_STATE_GET = 25;
NrgcpTimebasedchargingStateUpdatePayload TIMEBASEDCHARGING_STATE_UPDATE = 26;
NrgcpWifiLocationGetPayload WIFI_LOCATION_GET = 27;
NrgcpWifiLocationUpdatePayload WIFI_LOCATION_UPDATE = 28;
NrgcpSolarchargingSolarinverterscanGetPayload SOLARCHARGING_SOLARINVERTERSCAN_GET = 29;
NrgcpSolarchargingDataGetPayload SOLARCHARGING_DATA_GET = 30;
NrgcpSolarchargingProfilesGetPayload SOLARCHARGING_PROFILES_GET = 31;
NrgcpSolarchargingProfileUpdatePayload SOLARCHARGING_PROFILE_UPDATE = 32;
NrgcpSolarchargingProfileDeletePayload SOLARCHARGING_PROFILE_DELETE = 33;
NrgcpSolarchargingStateGetPayload SOLARCHARGING_STATE_GET = 34;
NrgcpSolarchargingStateUpdatePayload SOLARCHARGING_STATE_UPDATE = 35;
NrgcpDevicecontrolDiagnosticdataGetPayload DEVICECONTROL_DIAGNOSTIC_DATA_GET = 36;
NrgcpDevicecontrolSystemUpdatePayload DEVICECONTROL_SYSTEM_UPDATE = 37;
NrgcpSolarchargingEnergymeterscanGetPayload SOLARCHARGING_ENERGYMETERSCAN_GET = 38;
NrgcpLicenseServicesGetPayload LICENSE_SERVICES_GET = 39;
NrgcpSolarchargingDevicepingGetPayload SOLARCHARGING_DEVICEPING_GET = 40;
NrgcpSolarchargingSmartloadscanGetPayload SOLARCHARGING_SMARTLOADSCAN_GET = 41;
NrgcpSolarchargingBatteryscanGetPayload SOLARCHARGING_BATTERYSCAN_GET = 42;
NrgcpStatisticsSolarstatisticsdataGetPayload STATISTICS_SOLARSTATISTICSDATA_GET = 43;
NrgcpStatisticsSolarstatisticsinfoGetPayload STATISTICS_SOLARSTATISTICSINFO_GET = 44;
NrgcpSolarchargingFullscanGetPayload SOLARCHARGING_FULLSCAN_GET = 45;
}
Header header = 1;
Metadata metadata = 2;
Payload payload = 3;
}
// Payloads
// NrgcpRequestRejectedPayload
message NrgcpRequestRejectedPayload {
int32 code = 2;
string name = 1;;
}
// NrgcpChargecontrolChargevaluesGetPayload
message NrgcpChargecontrolChargevaluesGetPayload {
message Phase {
float aPEnergy = 1;
float iRms = 9;
float pFMean = 5;
float pMeanF = 6;
float pMean = 2;
float qMean = 3;
float sMean = 4;
float uRms = 8;
}
optional Phase phaseA = 1;
optional Phase phaseB = 2;
optional Phase phaseC = 3;
optional Phase phaseTotal = 4;
float pMeanTMax = 5;
float gridFrequency = 6;
float iRmsN = 8;
bool evDiode = 9;
int32 ifidc = 12;
float chargedEnergy = 13;
int32 ifiac = 14;
}
// NrgcpChargecontrolSelftestsGetPayload
message NrgcpChargecontrolSelftestsGetPayload {
bool fi = 1;
int32 peR = 13;
bool pe = 3;
bool relaisWeld = 2;
int32 relayState = 12;
}
// NrgcpChargecontrolCalibrationvaluesGetPayload
message NrgcpChargecontrolCalibrationvaluesGetPayload {
int32 uCalibrateGainA = 1;
int32 uCalibrateGainB = 2;
int32 uCalibrateGainC = 3;
int32 uCalibrateOffsetA = 4;
int32 uCalibrateOffsetB = 5;
int32 uCalibrateOffsetC = 6;
}
// NrgcpChargecontrolTemperaturesGetPayload
message NrgcpChargecontrolTemperaturesGetPayload {
float tempMainEm = 50;
float tempMainPcb = 48;
float tempMainPic = 49;
float tempSchuko1 = 55;
float tempSchuko2 = 56;
float tempSchuko3 = 57;
float tempStarPic = 54;
float tempStarSens1 = 51;
float tempStarSens2 = 52;
float tempStarSens3 = 53;
}
// NrgcpChargecontrolChargerecordsGetPayload
message NrgcpChargecontrolChargerecordsGetPayload {
double totalChargedEnergyOverall = 1;
}
// NrgcpChargecontrolDynamicvaluesGetPayload
message NrgcpChargecontrolDynamicvaluesGetPayload {
message ChargingData {
message Phase {
float current = 4;
float power = 1;
float voltage = 3;
}
float chargedEnergy = 14;
float chargingPower = 13;
float chargingRate = 11;
float chargingVoltage = 12;
float costs = 1;
float gridFrequency = 3;
float nCurrent = 4;
float peakPower = 5;
optional Phase phaseA = 6;
optional Phase phaseB = 7;
optional Phase phaseC = 8;
float remainKm = 9;
float totalChargedEnergy = 10;
}
message Temperatures {
float main1 = 1;
float smart1 = 4;
float star1 = 2;
float touch1 = 3;
}
optional ChargingData chargingData = 1;
optional Temperatures temperatures = 2;
}
// NrgcpChargecontrolSettingsGetPayload
message NrgcpChargecontrolSettingsGetPayload {
message ChargeCurrent {
float maxAdapter = 5;
int32 max = 3;
int32 min = 2;
float type2Current = 6;
float userSet = 4;
int32 value =1;
}
message ChargingState {
NrgcpTypes.ChargingState value = 1;
}
message EnergyLimit {
NrgcpTypes.EnergyLimitMode limited = 4;
float max = 3;
float min = 2;
float value = 1;
}
message PhaseSwitch {
enum PhaseSwitchSelection {
STATE_UNKNOWN = 0;
STATE_1PHASE = 1;
STATE_2PHASE = 2;
STATE_3PHASE = 3;
}
PhaseSwitchSelection selection = 1;
}
optional ChargeCurrent chargeCurrent = 1;
int32 chargingCycle = 14;
optional ChargingState chargingState = 3;
bool cpPwmActive = 5;
NrgcpTypes.CpStatus cpStatus = 4;
optional EnergyLimit energyLimit = 2;
int32 errorCode = 10;
int32 latestRecordNumber = 8;
optional PhaseSwitch phaseSwitch = 15;
int32 warningCode = 13;
}
// NrgcpChargecontrolSettingsUpdatePayload
message NrgcpChargecontrolSettingsUpdatePayload {
message ChargeCurrent {
float userSet = 2;
int32 value = 1;
}
message ChargingState {
NrgcpTypes.ChargingState value = 1;
}
message EnergyLimit {
NrgcpTypes.EnergyLimitMode limited = 2;
float value = 1;
}
message PhaseSwitch {
enum PhaseSelection {
STATE_UNKNOWN = 0;
STATE_1PHASE = 1;
STATE_2PHASE = 2;
STATE_3PHASE = 3;
}
PhaseSelection selection = 1;
}
optional ChargeCurrent chargeCurrent = 1;
optional ChargingState chargingState = 3;
optional EnergyLimit energyLimit = 2;
optional PhaseSwitch phaseSwitch = 4;
}
// NrgcpDevicecontrolInfoextendedGetPayload
message NrgcpDevicecontrolInfoextendedGetPayload {
message Adapter {
message Type2 {
float chargingCurrent = 5;
float dutycycle = 3;
float frequency = 4;
int32 states = 1;
int32 version = 2;
}
int64 chargedEnergy = 7;
int32 connectionCycle = 6;
int32 countryCode = 3;
float maxCurrent = 2;
int32 phases = 5;
bytes serial = 1;
int32 tagPcbType = 4;
optional Type2 type2 = 8;
}
message MainController {
string hardwareVersion = 2;
string softwareVersion = 1;
}
message Star {
string hardwareVersion = 2;
string softwareVersion = 1;
}
message Touch {
string hardwareVersion = 2;
string softwareVersion = 1;
}
optional Adapter adapter = 8;
optional MainController mainController = 1;
int32 smCurRstReason = 9;
int32 smRstDeepsleeps = 12;
int32 smRstPanics = 10;
int32 smRstUnknown = 13;
int32 smRstWatchdogs = 11;
int32 smUptime = 14;
optional Star star = 2;
optional Touch touch = 3;
}
// NrgcpDevicecontrolInfoGetPayload
message NrgcpDevicecontrolInfoGetPayload {
message ConfigMode {
enum ConfigModeState {
STATE_CONFIG_UNKNOWN = 0;
STATE_CONFIG_DISABLED = 1;
STATE_CONFIG_ENABLED = 2;
}
ConfigModeState state = 1;
}
message DeviceName {
int32 max = 3;
int32 min = 2;
string value = 1;
}
message DevicePassword {
int32 max = 3;
int32 min = 2;
}
message DevicePin {
int32 max = 16;
int32 min = 6;
}
message PhaseSwitch {
enum PhaseSwitchState {
STATE_PHASE_SWITCH_UNKNOWN = 0;
STATE_PHASE_SWITCH_DISABLED = 1;
STATE_PHASE_SWITCH_ENABLED = 2;
}
PhaseSwitchState state = 1;
}
optional NrgcpTypes.Cellular cellular = 11;
NrgcpTypes.CellularMode cellularMode = 12;
int32 chargeRecordsItemStorage = 15;
int32 chargeRecordsUnsynced = 14;
optional ConfigMode configState = 18;
NrgcpTypes.ConnectionInterface connectionInterface = 13;
optional DeviceName deviceName = 5;
optional DevicePassword devicePassword = 6;
optional DevicePin devicePin = 9;
optional NrgcpTypes.GPS gps = 10;
string hardwareRevision = 3;
NrgcpTypes.InitialSetupState initialSetup = 16;
optional PhaseSwitch phaseSwitch = 19;
NrgcpTypes.ProductType productType = 7;
string serialNumber = 1;
string softwareVersion = 4;
int32 statisticVersion = 17;
int32 utcTimestamp = 8;
string verificationCode = 2;
}
// NrgcpDevicecontrolInfoUpdatePayload
message NrgcpDevicecontrolInfoUpdatePayload {
message ConfigMode {
enum ConfigModeState {
STATE_CONFIG_UNKNOWN = 0;
STATE_CONFIG_DISABLED = 1;
STATE_CONFIG_ENABLED = 2;
}
ConfigModeState state = 1;
}
message DeviceName {
string value = 1;
}
message DevicePin {
NrgcpTypes.AccessControlState accessControlState = 3;
string pin = 1;
string uuid = 2;
}
message DevicePassword {
string value = 1;
}
message PhaseSwitch {
enum PhaseSwitchState {
STATE_PHASE_SWITCH_UNKNOWN = 0;
STATE_PHASE_SWITCH_DISABLED = 1;
STATE_PHASE_SWITCH_ENABLED = 2;
}
PhaseSwitchState state = 1;
}
optional ConfigMode configMode = 6;
optional DeviceName deviceName = 1;
optional DevicePin devicePin = 4;
NrgcpTypes.InitialSetupState initialSetup = 5;
optional DevicePassword password = 2;
optional PhaseSwitch phaseSwitch = 7;
int32 utcTimestamp = 3;
}
// NrgcpWifiConnectUpdatePayload
message NrgcpWifiConnectUpdatePayload {
string bssid = 3;
string key = 2;
string ssid = 1;
}
// NrgcpWifiScanGetPayload
message NrgcpWifiScanGetPayload {
repeated NrgcpWifiTypes.WifiApRecordProto scanResults = 1;
}
// NrgcpWifiStatusGetPayload
message NrgcpWifiStatusGetPayload {
optional NrgcpWifiTypes.WifiApRecordProto ap = 1;
repeated NrgcpWifiTypes.WifiApRecordProto aps = 2;
}
// NrgcpNrgdpDataGetPayload
message NrgcpNrgdpDataGetPayload {
message Adapter {
message Type2 {
float chargingCurrent = 5;
float dutycycle = 3;
float frequency = 4;
int32 states = 1;
int32 version = 2;
}
int64 chargedEnergy = 7;
int32 connectionCycle = 6;
int32 countryCode = 3;
float maxCurrent = 2;
int32 phases = 5;
int32 schukoVersionId = 9;
bytes serial = 1;
int32 tagPcbType = 4;
optional Type2 type2 = 8;
}
message ChargingInfo {
int32 chargeDurationS = 8;
int32 chargingCycle = 1;
int32 currentEnergyCounter = 2;
int64 globalEnergyCounter = 3;
int32 latestRecordNumber = 6;
NrgcpTypes.MeasurementMode measurementMode = 4;
NrgcpTypes.SchukoState schukoState = 5;
int32 vehicleConnectTimeCounter = 7;
}
message CpData {
int32 cpNegVal = 2;
int32 cpPosVal = 1;
NrgcpTypes.PwmState cpPwmState = 3;
}
message DeviceSettings {
message ChargingLimit {
NrgcpTypes.EnergyLimitMode energyLimitMode = 2;
float limit = 1;
}
message Consumption {
NrgcpTypes.ConsumptionMode consumptionMode = 2;
float value = 1;
}
message NetworkSetting {
bytes ssid = 1;
optional NrgcpTypes.WifiLocation wifiLocation = 2;
}
message Services {
NrgcpTypes.ConfigurationStatus soc = 2;
NrgcpTypes.ConfigurationStatus tbc = 1;
}
float capacity = 6;
optional ChargingLimit chargingLimit = 8;
bytes cloudAccount = 10;
optional Consumption consumption = 7;
bytes currency = 5;
float energyCosts = 4;
repeated NetworkSetting networkSettings = 3;
optional Services services = 9;
NrgcpTypes.Timezone timezone = 2;
NrgcpTypes.UnitSystem unitSystem = 1;
}
message EnergyMeter {
message ActivePowerPhases {
float pL1 = 1;
float pL2 = 2;
float pL3 = 3;
float pSUM = 4;
}
message ApparentPowerPhases {
float sL1 = 1;
float sL2 = 2;
float sL3 = 3;
float sSUM = 4;
}
message CurrentPhases {
float iL1 = 1;
float iL2 = 2;
float iL3 = 3;
float iN = 4;
}
message PowerFactorPhases {
float phiL1 = 1;
float phiL2 = 2;
float phiL3 = 3;
float phiSUM = 4;
}
message ReactivePowerPhases {
float qL1 = 1;
float qL2 = 2;
float qL3 = 3;
float qSUM = 4;
}
optional ActivePowerPhases activePowerPhases = 2;
optional ApparentPowerPhases apparentPowerPhases = 4;
optional CurrentPhases currentPhases = 1;
float gridFrequency = 6;
optional PowerFactorPhases powerFactorPhases = 5;
optional ReactivePowerPhases reactivePowerPhases = 3;
}
message SoftwareHardwareVersion {
bytes hardwareVersion = 2;
bytes softwareVersion = 1;
}
message ModuleInitStates {
int32 nrgactivation = 1;
int32 nrgauthentication = 2;
int32 nrgawsiot = 3;
int32 nrgble = 4;
int32 nrgbootlinecommunicator = 5;
int32 nrgbootloader = 6;
int32 nrgdeviceinfo = 7;
int32 nrgi2C = 8;
int32 nrgreset = 9;
int32 nrgstatistics = 10;
int32 nrgsystem = 11;
int32 nrgtimebasedcharging = 12;
int32 nrgtimecontroller = 13;
int32 nrgupdater = 14;
int32 nrgwifi = 15;
int32 nrgwsserver = 16;
}
message SelfTestStatus {
int32 connectedPowerPhases = 12;
NrgcpTypes.ErrorCode errorCode = 5;
NrgcpTypes.SelfTest evDiode = 4;
NrgcpTypes.SelfTest fI = 1;
bytes nrgkickDebug1 = 13;
int32 pER = 6;
NrgcpTypes.SelfTest pE = 2;
int32 powerGridFreq = 14;
int32 powerGridVoltage = 11;
NrgcpTypes.RcdTrigger rcdTrigger = 7;
NrgcpTypes.SelfTest relais = 3;
NrgcpTypes.RelayState relayState = 9;
NrgcpTypes.WarningCode warningCode = 8;
}
message Temperatures {
float tempMainEm = 3;
float tempMainPcb = 1;
float tempMainPic = 2;
float tempSchuko1 = 8;
float tempSchuko2 = 9;
float tempSchuko3 = 10;
float tempStarPic = 7;
float tempStarSens1 = 4;
float tempStarSens2 = 5;
float tempStarSens3 = 6;
}
message VoltagePhases {
float phase1 = 1;
float phase2 = 2;
float phase3 = 3;
}
optional Adapter adapter = 27;
NrgcpTypes.CellularMode cellularMode = 20;
optional NrgcpTypes.Cellular cellular = 19;
NrgcpTypes.ChargeSocket chargeSocket = 4;
int32 chargingCurrent = 3;
optional ChargingInfo chargingInfo = 28;
bool cloudConnected = 17;
NrgcpTypes.ConnectionInterface connectionInterface = 21;
optional CpData cpData = 24;
NrgcpTypes.CpStatus cpStatus = 5;
bytes deviceName = 1;
int32 deviceOptionsConfig = 33;
optional DeviceSettings deviceSettings = 30;
optional EnergyMeter energyMeter = 26;
optional NrgcpTypes.GPS gps = 18;
optional SoftwareHardwareVersion mainController = 7;
optional ModuleInitStates moduleInitStates = 29;
int32 numConfiguredWifis = 32;
int32 numScannedWifis = 31;
int32 phaseSwitchControl = 34;
NrgcpTypes.ProductType productType = 2;
int32 rssiWifi = 22;
optional SelfTestStatus selfTestStatus = 23;
bytes serialNumber = 6;
optional SoftwareHardwareVersion smartModule = 10;
optional SoftwareHardwareVersion star = 9;
optional Temperatures temperatures = 25;
int32 timestamp = 16;
optional SoftwareHardwareVersion touch = 8;
int32 uptime = 15;
float voltagePcb = 14;
optional VoltagePhases voltagePhases = 12;
}
// NrgcpDevicecontrolAppsettingsGetPayload
message NrgcpDevicecontrolAppsettingsGetPayload {
optional NrgcpTypes.BatteryCapacity batteryCapacity = 6;
NrgcpTypes.ConsumptionMode consumptionMode = 5;
optional NrgcpTypes.Consumption consumption = 2;
optional NrgcpTypes.Currency currency = 4;
optional NrgcpTypes.Efficacy efficacy = 1;
optional NrgcpTypes.PricePerKwh pricePerKwh = 3;
NrgcpTypes.Timezone timezone = 8;
NrgcpTypes.UnitSystem unitSystem = 7;
}
// NrgcpDevicecontrolAppsettingsUpdatePayload
message NrgcpDevicecontrolAppsettingsUpdatePayload {
optional NrgcpTypes.BatteryCapacity batteryCapacity = 6;
NrgcpTypes.ConsumptionMode consumptionMode = 5;
optional NrgcpTypes.Consumption consumption = 2;
optional NrgcpTypes.Currency currency = 4;
optional NrgcpTypes.Efficacy efficacy = 1;
optional NrgcpTypes.PricePerKwh pricePerKwh = 3;
NrgcpTypes.Timezone timezone = 8;
NrgcpTypes.UnitSystem unitSystem = 7;
}
// NrgcpDevicecontrolActivationGetPayload
message NrgcpDevicecontrolActivationGetPayload {
string activationCode = 1;
}
// NrgcpTimebasedchargingChargingEventsGetPayload
message NrgcpTimebasedchargingChargingEventsGetPayload {
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventFriday = 5;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventMonday = 1;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventSaturday = 6;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventSunday = 7;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventThursday = 4;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventTuesday = 2;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventWednesday = 3;
}
// NrgcpTimebasedchargingChargingEventsUpdatePayload
message NrgcpTimebasedchargingChargingEventsUpdatePayload {
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventFriday = 5;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventMonday = 1;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventSaturday = 6;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventSunday = 7;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventThursday = 4;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventTuesday = 2;
repeated NrgcpTypes.TimeBasedChargingEvent chargingEventWednesday = 3;
}
// NrgcpDevicecontrolResetUpdatePayload
message NrgcpDevicecontrolResetUpdatePayload {
NrgcpTypes.ResetType resetType = 1;
}
// NrgcpChargecontrolChargerecordGetPayload
message NrgcpChargecontrolChargerecordGetPayload {
int32 chargeDurationS = 22;
int32 chargedEnergy = 4;
int32 chargingMode = 7;
int32 connectionInterface = 32;
string currency = 11;
int32 errorCode = 26;
int64 globalChargedEnergyCounterBegin = 2;
int64 globalChargedEnergyCounterEnd = 3;
bool isTimeSyncedAtStart = 30;
float latitude = 8;
float longitude = 9;
bool messSwapEn = 21;
float pricePerKwh = 10;
int32 recordNumber = 1;
int32 status = 25;
string tagSerialNumber = 13;
int32 tagType = 14;
int32 timeSource = 33;
int64 timestampBeginVehicleConnect = 24;
int64 timestampChargingEnd = 23;
int32 timestampEndOffset = 28;
int64 timestampEnd = 6;
int32 timestampStartOffset = 27;
int64 timestampStart = 5;
bool triedToSyncTime = 31;
int32 vehicleConnectCount = 29;
optional NrgcpTypes.WifiLocation wifiLocation = 12;
}
// NrgcpChargecontrolChargerecordGetPayloadRequest
message NrgcpChargecontrolChargerecordGetPayloadRequest {
int32 recordNumber = 1;
}
// NrgcpTimebasedchargingStateGetPayload
message NrgcpTimebasedchargingStateGetPayload {
message TimeBasedChargingState {
NrgcpTypes.TimeBasedChargingState value = 1;
}
optional NrgcpTypes.TimeBasedChargingEvent currentChargingEvent = 2;
optional TimeBasedChargingState timeBasedChargingState = 1;
}
// NrgcpTimebasedchargingStateUpdatePayload
message NrgcpTimebasedchargingStateUpdatePayload {
message TimeBasedChargingState {
NrgcpTypes.TimeBasedChargingState value = 1;
}
optional TimeBasedChargingState timeBasedChargingState = 1;
}
// NrgcpWifiLocationGetPayload
message NrgcpWifiLocationGetPayload {
repeated NrgcpTypes.WifiLocation locations = 1;
}
// NrgcpWifiLocationUpdatePayload
message NrgcpWifiLocationUpdatePayload {
optional NrgcpTypes.WifiLocation location = 2;
string ssid = 1;
}
// NrgcpSolarchargingSolarinverterscanGetPayload
message NrgcpSolarchargingSolarinverterscanGetPayload {
optional NrgcpSolarchargingTypes.SolarInverterInfo inverters = 1;
}
// NrgcpSolarchargingDataGetPayload
message NrgcpSolarchargingDataGetPayload {
int32 batteryChargeWh = 12;
repeated NrgcpSolarchargingTypes.SolarBatteryData batteryData = 25;
int32 batteryDischargeWh = 11;
int32 chargedEnergyWh = 5;
int32 chargedFromExtSrcWh = 17;
int32 chargingState = 19;
int32 combBatPowerW = 7;
int32 combGridPowerW = 3;
int32 combLoadPowerW = 4;
int32 combPvEnergyWhDay = 2;
int32 combPvPowerW = 1;
int32 combSlLoadW = 8;
int32 dischargeToExtSinkWh = 18;
repeated NrgcpSolarchargingTypes.EnergyMeterData energyMeterData = 24;
int32 generateEnergyWh = 14;
int32 gridConsumptionWh = 9;
int32 gridFeedWh = 10;
repeated NrgcpSolarchargingTypes.SolarInverterData inverterData = 23;
int32 loadEnergyWh = 13;
int32 mainToEv = 22;
int32 producedSolarEnergyWh = 15;
int32 recChargingPowerW = 6;
int32 smState = 20;
int32 smToMainW = 21;
repeated NrgcpSolarchargingTypes.SmartLoadData smartLoadData = 26;
int32 smartLoadEnergyWh = 16;
}
// NrgcpSolarchargingProfilesGetPayload
message NrgcpSolarchargingProfilesGetPayload {
int32 activeProfileIdx = 2;
optional NrgcpSolarchargingTypes.SolarProfile profiles = 1;
}
// NrgcpSolarchargingProfileUpdatePayload
message NrgcpSolarchargingProfileUpdatePayload {
bool enabled = 3;
int32 idx = 1;
optional NrgcpSolarchargingTypes.SolarProfile profile = 2;
}
// NrgcpSolarchargingProfileDeletePayload
message NrgcpSolarchargingProfileDeletePayload {
int32 idx = 1;
}
// NrgcpSolarchargingStateGetPayload
message NrgcpSolarchargingStateGetPayload {
int32 activeProfile = 2;
optional NrgcpSolarchargingTypes.DeviceFailInfo deviceInfo = 3;
NrgcpSolarchargingTypes.SolarChargingState state = 1;
}
// NrgcpSolarchargingStateUpdatePayload
message NrgcpSolarchargingStateUpdatePayload {
int32 activeProfile = 2;
NrgcpSolarchargingTypes.SolarChargingState state = 1;
}
// NrgcpDevicecontrolDiagnosticdataGetPayload
message NrgcpDevicecontrolDiagnosticdataGetPayload {
message CpData {
NrgcpTypes.CpStatus code = 1;
int32 cpNegVal = 3;
int32 cpPosVal = 2;
}
int32 bleRssi = 8;
optional CpData cpData = 2;
int32 errorCode = 1;
int64 nrgkickDebug1 = 7;
int32 rcdTrigger = 3;
int32 relayState = 5;
int32 selfTestPeR = 6;
int32 warningCode = 4;
}
// NrgcpDevicecontrolSystemUpdatePayload
message NrgcpDevicecontrolSystemUpdatePayload {
NrgcpTypes.RestartMode restartMode = 1;
}
// NrgcpSolarchargingEnergymeterscanGetPayload
message NrgcpSolarchargingEnergymeterscanGetPayload {
optional NrgcpSolarchargingTypes.EnergyMeterInfo energyMeters = 1;
}
// NrgcpLicenseServicesGetPayload
message NrgcpLicenseServicesGetPayload {
optional NrgcpLicenseServicesTypes.LicenseServices services = 1;
}
// NrgcpSolarchargingDevicepingGetPayload
message NrgcpSolarchargingDevicepingGetPayload {
optional NrgcpSolarchargingTypes.DevicePing devicePing = 1;
}
// NrgcpSolarchargingSmartloadscanGetPayload
message NrgcpSolarchargingSmartloadscanGetPayload {
optional NrgcpSolarchargingTypes.SmartLoadInfo smartLoads = 1;
}
// NrgcpSolarchargingBatteryscanGetPayload
message NrgcpSolarchargingBatteryscanGetPayload {
optional NrgcpSolarchargingTypes.BatteryInfo batteryInfo = 1;
}
// NrgcpStatisticsSolarstatisticsdataGetPayload
message NrgcpStatisticsSolarstatisticsdataGetPayload {
optional NrgcpStatisticsTypes.RequestInfo requestInfo = 1;
repeated NrgcpStatisticsTypes.SolarChargingStatistics solarStatistics = 2;
}
// NrgcpStatisticsSolarstatisticsinfoGetPayload
message NrgcpStatisticsSolarstatisticsinfoGetPayload {
int32 newestTs = 3;
int32 numDataPoints = 1;
int32 oldestTs = 2;
}
// NrgcpSolarchargingFullscanGetPayload
message NrgcpSolarchargingFullscanGetPayload {
optional NrgcpSolarchargingTypes.FullScanInfo fullScanInfo = 1;
}
// Types
message NrgcpTypes {
enum AccessControlState {
UNKNOWN_ACCESS_CONTROL_STATE = 0;
CHANGE_PIN = 1;
AUTHORIZE_CLIENT = 2;
}
message BatteryCapacity {
float max = 3;
float min = 2;
float value = 1;
}
message Cellular {
bytes imei = 2;
bytes imsi = 3;
bytes oper = 6;
int32 rssi = 7;
int32 signalStrength = 5;
bytes swRev = 4;
}
enum CellularMode {
CELLULAR_MODE_UNKNOWN = 0;
CELLULAR_MODE_GPRS = 1;
CELLULAR_MODE_NB_IOT = 2;
CELLULAR_MODE_CAT_M = 3;
}
enum ChargeSocket {
UNKNOWN_CHARGE_SOCKET = 0;
SOCKET_NONE = 1;
SOCKET_SCHUCKO = 2;
SOCKET_16A = 3;
SOCKET_32A = 4;
SOCKET_T2 = 5;
}
enum ChargingState {
UNKNOWN_CHARGING_STATE = 0;
CHARGING = 1;
PAUSE_CHARGING = 2;
NO_CHARGING = 3;
}
enum ConfigurationStatus {
UNKNOWN_CONFIGURATION_STATUS = 0;
ENABLED = 1;
DISABLED = 2;
}
enum ConnectionInterface {
CONNECTION_INTERFACE_UNKNOWN = 0;
CONNECTION_INTERFACE_WIFI = 1;
CONNECTION_INTERFACE_CELLULAR = 2;
}
message Consumption {
float max = 3;
float min = 2;
float value = 1;
}
enum ConsumptionMode {
UNKNOWN_CONSUMPTION_MODE = 0;
KWH_PER_100KM = 1;
KM_PER_KWH = 2;
}
enum CpStatus {
UNKNOWN_CP_STATUS = 0;
NRG_CP_A_STANDBY = 1;
NRG_CP_B_CONNECTED = 2;
NRG_CP_C_CHARGE_ACTIVE = 3;
NRG_CP_D_CHARGE_ACTIVE_VENTILATION = 4;
NRG_CP_E_NO_POWER = 5;
NRG_CP_F_ERROR = 6;
NRG_CP_E_WAKEUP = 7;
}
message Currency {
int32 max = 3;
int32 min = 2;
string value = 1;
}
message Efficacy {
float max = 3;
float min = 2;
float value = 1;
}
enum EnergyLimitMode {
ENERGY_LIMIT_MODE_UNKNOWN = 0;
ENERGY_LIMIT_MODE_LIMITED = 1;
ENERGY_LIMIT_MODE_UNLIMITED = 2;
}
enum ErrorCode {
UNKNOWN_ERROR_CODE = 0;
SYS_ERROR_CODE_NO_ERROR = 1;
SYS_ERROR_CODE_GENERAL_ERROR = 2;
SYS_ERROR_CODE_RCD = 3;
SYS_ERROR_CODE_CPSG_ERROR_UNKNOWN = 4;
SYS_ERROR_CODE_CPSG_ERROR_TRANSMISSION = 5;
SYS_ERROR_CODE_CPSG_ERROR_DIODE = 6;
SYS_ERROR_CODE_CPSG_ERROR_EV_6V = 7;
SYS_ERROR_CODE_CPSG_ERROR_EV_3V = 8;
SYS_ERROR_CODE_SELFTEST_PE_FAIL_ACKNOWLEDGED = 9;
SYS_ERROR_CODE_SELFTEST_PE_WAIT_FOR_ACKNOWLEDGE = 10;
SYS_ERROR_CODE_SELFTEST_PE_RAM = 11;
SYS_ERROR_CODE_SELFTEST_PE_RCD = 12;
SYS_ERROR_CODE_SELFTEST_RAM = 13;
SYS_ERROR_CODE_SELFTEST_RAM_RCD = 14;