stekker_zaptec 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91b9631174d32dc32bd0844c8fa0d96bf6b484a39c9318cf25b31fc8f76956a8
4
- data.tar.gz: ab0ac00f5cc38aca2e70a8a4ad2f954e31e4796a30dac919c8a849862d471bda
3
+ metadata.gz: 79ebcf2348c8f571a18e9ece5b7289f0453080b32c52800695b0df329a992407
4
+ data.tar.gz: 250ac2bab2c789254168da736996c419d6676c2867455522c6cd364be5c1b1b5
5
5
  SHA512:
6
- metadata.gz: 16c452cd49022e999f5e3250804a75359296088a573de565fcc7b8d2e27358c5308fba53eed8d3859efcee0dd0d5202c0224a52f0ea01f2c272d14a439425b9a
7
- data.tar.gz: 5ef016998af407c8edf1fb1364af5e7a88e0cf2ceea241f4f8e9228308ec63e874a547991ebd3feb4caa8fff46144f72058accde785abba8a3d84902d129d308
6
+ metadata.gz: 3c5550b2528c1cdcb6da900910f19307458717d87834132b8eda4292ed17817de98cd7ce86d2ba8ad569cd24ccfe2e54b0f06e7e00427d1ea2220b79e46b2062
7
+ data.tar.gz: 636cca9efe6774c47bf1864a43bf11f2227ebe180b536e1949000b41c1e92192782464c32b4d87212f9fb69abd2f4eef8865a0a483f5dc3a14a0f1fe1fb43b11
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ day: "monday"
7
+ interval: weekly
8
+ time: "09:00"
9
+ timezone: "Europe/Amsterdam"
10
+ open-pull-requests-limit: 999
11
+ allow:
12
+ - dependency-type: direct
13
+ - package-ecosystem: github-actions
14
+ directory: "/"
15
+ schedule:
16
+ day: "monday"
17
+ interval: weekly
18
+ time: "09:00"
19
+ timezone: "Europe/Amsterdam"
20
+ open-pull-requests-limit: 999
21
+ allow:
22
+ - dependency-type: direct
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ require:
3
3
 
4
4
  AllCops:
5
5
  NewCops: enable
6
+ TargetRubyVersion: "3.2.1"
6
7
 
7
8
  Layout/BeginEndAlignment:
8
9
  Enabled: true
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in zaptec.gemspec
4
4
  gemspec
5
5
 
6
+ gem "byebug"
6
7
  gem "gem-release", "~> 2.2"
7
8
  gem "jwt", "~> 2.6"
8
9
  gem "rake", "~> 13.0"
data/Gemfile.lock CHANGED
@@ -1,121 +1,118 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stekker_zaptec (1.2.1)
4
+ stekker_zaptec (1.2.2)
5
5
  activemodel
6
6
  activesupport
7
7
  faraday
8
- faraday_middleware
9
8
 
10
9
  GEM
11
10
  remote: https://rubygems.org/
12
11
  specs:
13
- activemodel (7.0.8)
14
- activesupport (= 7.0.8)
15
- activesupport (7.0.8)
12
+ activemodel (7.1.3.2)
13
+ activesupport (= 7.1.3.2)
14
+ activesupport (7.1.3.2)
15
+ base64
16
+ bigdecimal
16
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ connection_pool (>= 2.2.5)
19
+ drb
17
20
  i18n (>= 1.6, < 2)
18
21
  minitest (>= 5.1)
22
+ mutex_m
19
23
  tzinfo (~> 2.0)
20
- addressable (2.8.5)
24
+ addressable (2.8.6)
21
25
  public_suffix (>= 2.0.2, < 6.0)
22
26
  ast (2.4.2)
23
- base64 (0.1.1)
24
- concurrent-ruby (1.2.2)
25
- crack (0.4.5)
27
+ base64 (0.2.0)
28
+ bigdecimal (3.1.7)
29
+ byebug (11.1.3)
30
+ concurrent-ruby (1.2.3)
31
+ connection_pool (2.4.1)
32
+ crack (1.0.0)
33
+ bigdecimal
26
34
  rexml
27
- diff-lcs (1.5.0)
28
- faraday (1.10.3)
29
- faraday-em_http (~> 1.0)
30
- faraday-em_synchrony (~> 1.0)
31
- faraday-excon (~> 1.1)
32
- faraday-httpclient (~> 1.0)
33
- faraday-multipart (~> 1.0)
34
- faraday-net_http (~> 1.0)
35
- faraday-net_http_persistent (~> 1.0)
36
- faraday-patron (~> 1.0)
37
- faraday-rack (~> 1.0)
38
- faraday-retry (~> 1.0)
39
- ruby2_keywords (>= 0.0.4)
40
- faraday-em_http (1.0.0)
41
- faraday-em_synchrony (1.0.0)
42
- faraday-excon (1.1.0)
43
- faraday-httpclient (1.0.1)
44
- faraday-multipart (1.0.4)
45
- multipart-post (~> 2)
46
- faraday-net_http (1.0.1)
47
- faraday-net_http_persistent (1.2.0)
48
- faraday-patron (1.0.0)
49
- faraday-rack (1.0.0)
50
- faraday-retry (1.0.3)
51
- faraday_middleware (1.2.0)
52
- faraday (~> 1.0)
35
+ diff-lcs (1.5.1)
36
+ drb (2.2.1)
37
+ faraday (2.12.0)
38
+ faraday-net_http (>= 2.0, < 3.4)
39
+ json
40
+ logger
41
+ faraday-net_http (3.3.0)
42
+ net-http
53
43
  gem-release (2.2.2)
54
- hashdiff (1.0.1)
55
- i18n (1.14.1)
44
+ hashdiff (1.1.0)
45
+ i18n (1.14.4)
56
46
  concurrent-ruby (~> 1.0)
57
- json (2.6.3)
58
- jwt (2.7.1)
47
+ json (2.7.1)
48
+ jwt (2.8.1)
49
+ base64
59
50
  language_server-protocol (3.17.0.3)
60
- minitest (5.20.0)
61
- multipart-post (2.3.0)
62
- parallel (1.23.0)
63
- parser (3.2.2.3)
51
+ logger (1.6.1)
52
+ minitest (5.22.3)
53
+ mutex_m (0.2.0)
54
+ net-http (0.4.1)
55
+ uri
56
+ parallel (1.24.0)
57
+ parser (3.3.0.5)
64
58
  ast (~> 2.4.1)
65
59
  racc
66
- public_suffix (5.0.3)
67
- racc (1.7.1)
68
- rack (3.0.8)
60
+ public_suffix (5.0.5)
61
+ racc (1.7.3)
62
+ rack (3.0.10)
69
63
  rainbow (3.1.1)
70
- rake (13.0.6)
71
- regexp_parser (2.8.1)
72
- rexml (3.2.6)
73
- rspec (3.12.0)
74
- rspec-core (~> 3.12.0)
75
- rspec-expectations (~> 3.12.0)
76
- rspec-mocks (~> 3.12.0)
77
- rspec-core (3.12.2)
78
- rspec-support (~> 3.12.0)
79
- rspec-expectations (3.12.3)
64
+ rake (13.2.0)
65
+ regexp_parser (2.9.0)
66
+ rexml (3.3.9)
67
+ rspec (3.13.0)
68
+ rspec-core (~> 3.13.0)
69
+ rspec-expectations (~> 3.13.0)
70
+ rspec-mocks (~> 3.13.0)
71
+ rspec-core (3.13.0)
72
+ rspec-support (~> 3.13.0)
73
+ rspec-expectations (3.13.0)
80
74
  diff-lcs (>= 1.2.0, < 2.0)
81
- rspec-support (~> 3.12.0)
82
- rspec-mocks (3.12.6)
75
+ rspec-support (~> 3.13.0)
76
+ rspec-mocks (3.13.0)
83
77
  diff-lcs (>= 1.2.0, < 2.0)
84
- rspec-support (~> 3.12.0)
85
- rspec-support (3.12.1)
86
- rubocop (1.56.3)
87
- base64 (~> 0.1.1)
78
+ rspec-support (~> 3.13.0)
79
+ rspec-support (3.13.1)
80
+ rubocop (1.62.1)
88
81
  json (~> 2.3)
89
82
  language_server-protocol (>= 3.17.0)
90
83
  parallel (~> 1.10)
91
- parser (>= 3.2.2.3)
84
+ parser (>= 3.3.0.2)
92
85
  rainbow (>= 2.2.2, < 4.0)
93
86
  regexp_parser (>= 1.8, < 3.0)
94
87
  rexml (>= 3.2.5, < 4.0)
95
- rubocop-ast (>= 1.28.1, < 2.0)
88
+ rubocop-ast (>= 1.31.1, < 2.0)
96
89
  ruby-progressbar (~> 1.7)
97
90
  unicode-display_width (>= 2.4.0, < 3.0)
98
- rubocop-ast (1.29.0)
99
- parser (>= 3.2.1.0)
100
- rubocop-capybara (2.18.0)
91
+ rubocop-ast (1.31.2)
92
+ parser (>= 3.3.0.4)
93
+ rubocop-capybara (2.20.0)
101
94
  rubocop (~> 1.41)
102
- rubocop-factory_bot (2.23.1)
103
- rubocop (~> 1.33)
104
- rubocop-rails (2.21.0)
95
+ rubocop-factory_bot (2.25.1)
96
+ rubocop (~> 1.41)
97
+ rubocop-rails (2.24.1)
105
98
  activesupport (>= 4.2.0)
106
99
  rack (>= 1.1)
107
100
  rubocop (>= 1.33.0, < 2.0)
108
- rubocop-rspec (2.24.0)
109
- rubocop (~> 1.33)
101
+ rubocop-ast (>= 1.31.1, < 2.0)
102
+ rubocop-rspec (2.28.0)
103
+ rubocop (~> 1.40)
110
104
  rubocop-capybara (~> 2.17)
111
105
  rubocop-factory_bot (~> 2.22)
106
+ rubocop-rspec_rails (~> 2.28)
107
+ rubocop-rspec_rails (2.28.2)
108
+ rubocop (~> 1.40)
112
109
  ruby-progressbar (1.13.0)
113
- ruby2_keywords (0.0.5)
114
110
  timecop (0.9.8)
115
111
  tzinfo (2.0.6)
116
112
  concurrent-ruby (~> 1.0)
117
- unicode-display_width (2.4.2)
118
- webmock (3.19.1)
113
+ unicode-display_width (2.5.0)
114
+ uri (0.13.1)
115
+ webmock (3.23.0)
119
116
  addressable (>= 2.8.0)
120
117
  crack (>= 0.3.2)
121
118
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -124,10 +121,12 @@ PLATFORMS
124
121
  arm64-darwin-20
125
122
  arm64-darwin-21
126
123
  arm64-darwin-22
124
+ arm64-darwin-23
127
125
  x86_64-darwin-21
128
126
  x86_64-linux
129
127
 
130
128
  DEPENDENCIES
129
+ byebug
131
130
  gem-release (~> 2.2)
132
131
  jwt (~> 2.6)
133
132
  rake (~> 13.0)
data/bin/release CHANGED
@@ -7,7 +7,7 @@ set -vx
7
7
  version="$1"
8
8
 
9
9
  # Do a pretend version bump to determine what the new version should be
10
- bumped_version=$(gem bump "$version" --pretend --no-commit | awk '{ print $4 }' | tr -d '[:space:]')
10
+ bumped_version=$(gem bump --version "$version" --pretend --no-commit | awk '{ print $4 }' | tr -d '[:space:]')
11
11
 
12
12
  # Use ruby to get the root level directory name
13
13
  gem_name=$(ruby -e "puts File.basename(Dir.pwd)")
data/data/constants.json CHANGED
@@ -1,5 +1,9 @@
1
1
  {
2
2
  "Languages": [
3
+ {
4
+ "Key": "dk",
5
+ "Name": "Danish"
6
+ },
3
7
  {
4
8
  "Key": "nl",
5
9
  "Name": "Dutch"
@@ -50,11 +54,11 @@
50
54
  }
51
55
  ],
52
56
  "Countries": {
53
- "d6267571-6cf4-4061-92d8-f9d55a4f3a40": {
54
- "Id": "d6267571-6cf4-4061-92d8-f9d55a4f3a40",
57
+ "d475da45-5b86-42ed-86e5-f30035e16da1": {
58
+ "Id": "d475da45-5b86-42ed-86e5-f30035e16da1",
55
59
  "Code": "AUT",
56
60
  "Name": "Austria",
57
- "TimeZoneName": "(UTC+01:00) Central European Time (Berlin)"
61
+ "TimeZoneName": "(UTC+01:00) Central European Time (Vienna)"
58
62
  },
59
63
  "3073c0bd-9f5c-4f18-80dd-a7b163beb3fe": {
60
64
  "Id": "3073c0bd-9f5c-4f18-80dd-a7b163beb3fe",
@@ -68,12 +72,24 @@
68
72
  "Name": "Croatia",
69
73
  "TimeZoneName": "(UTC+01:00) Central European Time (Warsaw)"
70
74
  },
75
+ "06c1cbd3-66d3-48e3-8ca1-9d427400689c": {
76
+ "Id": "06c1cbd3-66d3-48e3-8ca1-9d427400689c",
77
+ "Code": "CZE",
78
+ "Name": "Czech Republic",
79
+ "TimeZoneName": "(UTC+01:00) Central European Time (Prague)"
80
+ },
71
81
  "52f1e37e-f314-4d48-8a6a-82c74e4830a1": {
72
82
  "Id": "52f1e37e-f314-4d48-8a6a-82c74e4830a1",
73
83
  "Code": "DNK",
74
84
  "Name": "Denmark",
75
85
  "TimeZoneName": "(UTC+01:00) Central European Time (Berlin)"
76
86
  },
87
+ "0047a9bd-adea-4272-9708-3354dee0bd8c": {
88
+ "Id": "0047a9bd-adea-4272-9708-3354dee0bd8c",
89
+ "Code": "EST",
90
+ "Name": "Estonia",
91
+ "TimeZoneName": "(UTC+02:00) Eastern European Time (Tallinn)"
92
+ },
77
93
  "42ec863c-edb5-46b0-afeb-36f66fa7eebf": {
78
94
  "Id": "42ec863c-edb5-46b0-afeb-36f66fa7eebf",
79
95
  "Code": "FIN",
@@ -92,6 +108,18 @@
92
108
  "Name": "Germany",
93
109
  "TimeZoneName": "(UTC+01:00) Central European Time (Berlin)"
94
110
  },
111
+ "24c5afbe-2446-482e-b78d-a9494f8118d5": {
112
+ "Id": "24c5afbe-2446-482e-b78d-a9494f8118d5",
113
+ "Code": "GRC",
114
+ "Name": "Greece",
115
+ "TimeZoneName": "(UTC+02:00) Eastern European Time (Athens)"
116
+ },
117
+ "1aef14ea-054d-45f7-91c5-9e1b19762a95": {
118
+ "Id": "1aef14ea-054d-45f7-91c5-9e1b19762a95",
119
+ "Code": "HUN",
120
+ "Name": "Hungary",
121
+ "TimeZoneName": "(UTC+01:00) Central European Time (Budapest)"
122
+ },
95
123
  "a0e21e29-474f-466a-9a2f-3a17458465d8": {
96
124
  "Id": "a0e21e29-474f-466a-9a2f-3a17458465d8",
97
125
  "Code": "ISL",
@@ -110,6 +138,24 @@
110
138
  "Name": "Italy",
111
139
  "TimeZoneName": "(UTC+01:00) Central European Time (Berlin)"
112
140
  },
141
+ "51f14b70-8cfb-4f43-b389-a4966e225ddd": {
142
+ "Id": "51f14b70-8cfb-4f43-b389-a4966e225ddd",
143
+ "Code": "LVA",
144
+ "Name": "Latvia",
145
+ "TimeZoneName": "(UTC+02:00) Eastern European Time (Riga)"
146
+ },
147
+ "8022f9e8-d2a7-4446-a248-bcb25ce6d0e2": {
148
+ "Id": "8022f9e8-d2a7-4446-a248-bcb25ce6d0e2",
149
+ "Code": "LTU",
150
+ "Name": "Lithuania",
151
+ "TimeZoneName": "(UTC+02:00) Eastern European Time (Vilnius)"
152
+ },
153
+ "d7158bfc-ab96-4b85-88fb-26740ab8f17c": {
154
+ "Id": "d7158bfc-ab96-4b85-88fb-26740ab8f17c",
155
+ "Code": "LUX",
156
+ "Name": "Luxembourg",
157
+ "TimeZoneName": "(UTC+01:00) Central European Time (Warsaw)"
158
+ },
113
159
  "bda681ab-adcb-4f67-bac5-5cbf28d42cc7": {
114
160
  "Id": "bda681ab-adcb-4f67-bac5-5cbf28d42cc7",
115
161
  "Code": "NLD",
@@ -134,6 +180,24 @@
134
180
  "Name": "Portugal",
135
181
  "TimeZoneName": "(UTC+00:00) United Kingdom Time"
136
182
  },
183
+ "0b252d8d-18bc-4dbb-9eca-953371586455": {
184
+ "Id": "0b252d8d-18bc-4dbb-9eca-953371586455",
185
+ "Code": "ROU",
186
+ "Name": "Romania",
187
+ "TimeZoneName": "(UTC+02:00) Eastern European Time (Bucharest)"
188
+ },
189
+ "2d3debcc-17e9-4e12-8802-4cd04e778655": {
190
+ "Id": "2d3debcc-17e9-4e12-8802-4cd04e778655",
191
+ "Code": "SVK",
192
+ "Name": "Slovakia",
193
+ "TimeZoneName": "(UTC+01:00) Central European Time (Bratislava)"
194
+ },
195
+ "514f0414-a993-4759-a3e8-db7b83633bfa": {
196
+ "Id": "514f0414-a993-4759-a3e8-db7b83633bfa",
197
+ "Code": "SVN",
198
+ "Name": "Slovenia",
199
+ "TimeZoneName": "(UTC+01:00) Central European Time (Ljubljana)"
200
+ },
137
201
  "5456f813-850b-418f-9eef-1225e66302d2": {
138
202
  "Id": "5456f813-850b-418f-9eef-1225e66302d2",
139
203
  "Code": "ESP",
@@ -158,6 +222,12 @@
158
222
  "Name": "Thailand",
159
223
  "TimeZoneName": "(UTC+07:00) Indochina Time (Bangkok)"
160
224
  },
225
+ "d251fa3a-078a-4c98-a254-0d65cdecc578": {
226
+ "Id": "d251fa3a-078a-4c98-a254-0d65cdecc578",
227
+ "Code": "TUR",
228
+ "Name": "Turkey",
229
+ "TimeZoneName": "(UTC+03:00) Türkiye Time"
230
+ },
161
231
  "f743b0d4-1f38-43e8-a95d-cf18fe1c3ede": {
162
232
  "Id": "f743b0d4-1f38-43e8-a95d-cf18fe1c3ede",
163
233
  "Code": "GBR",
@@ -198,6 +268,13 @@
198
268
  "MaxChargers": 3,
199
269
  "DefaultFeatures": 471,
200
270
  "DefaultRoute": "default"
271
+ },
272
+ "OcppNative": {
273
+ "Id": 2,
274
+ "Name": "OcppNative",
275
+ "MaxChargers": 3,
276
+ "DefaultFeatures": 577,
277
+ "DefaultRoute": "default"
201
278
  }
202
279
  },
203
280
  "UserRoles": {
@@ -312,7 +389,8 @@
312
389
  "OperationFailedDueToChargerState": 538,
313
390
  "InstallationConstraintViolation": 539,
314
391
  "UnknownInstallationId": 540,
315
- "UnknownEnergySensorId": 541
392
+ "UnknownEnergySensorId": 541,
393
+ "UnauthorizedToPerformOcppNativeChanges": 542
316
394
  },
317
395
  "Settings": {
318
396
  "AuthenticationRequired": 120,
@@ -345,7 +423,8 @@
345
423
  "DiagnosticsMode": 805,
346
424
  "DisableBLEChargePointName": 806,
347
425
  "InternalDiagnosticsLog": 807,
348
- "UnconditionalNfcDetectionIndication": 855
426
+ "UnconditionalNfcDetectionIndication": 855,
427
+ "EnableLteDetailedSignalStrength": 856
349
428
  },
350
429
  "Commands": {
351
430
  "Unknown": 0,
@@ -377,6 +456,7 @@
377
456
  "ShowGranted": 601,
378
457
  "ShowDenied": 602,
379
458
  "IndicateAppConnect": 603,
459
+ "RequestSignedMIDEventLog": 700,
380
460
  "ConfirmChargeCardAdded": 750,
381
461
  "SetAuthenticationList": 751,
382
462
  "Debug": 800,
@@ -396,6 +476,9 @@
396
476
  "Observations": {
397
477
  "Unknown": 0,
398
478
  "OfflineMode": 1,
479
+ "Capabilities": 100,
480
+ "ProductName": 110,
481
+ "ArenaId": 111,
399
482
  "AuthenticationRequired": 120,
400
483
  "PaymentActive": 130,
401
484
  "PaymentCurrency": 131,
@@ -415,8 +498,10 @@
415
498
  "TemperatureInternal5": 201,
416
499
  "TemperatureInternal6": 202,
417
500
  "TemperatureInternalLimit": 203,
501
+ "TemperaturePowerBoard": 205,
418
502
  "TemperatureInternalMaxLimit": 241,
419
503
  "Humidity": 270,
504
+ "TamperCover": 280,
420
505
  "VoltagePhase1": 501,
421
506
  "VoltagePhase2": 502,
422
507
  "VoltagePhase3": 503,
@@ -436,6 +521,7 @@
436
521
  "ChargerOfflineCurrent": 523,
437
522
  "RcdCalibration": 540,
438
523
  "RcdCalibrationNoise": 541,
524
+ "ManualRcdTest": 542,
439
525
  "TotalChargePowerSession": 553,
440
526
  "SignedMeterValue": 554,
441
527
  "SignedMeterValueInterval": 555,
@@ -463,6 +549,7 @@
463
549
  "SessionIdentifier": 721,
464
550
  "ChargerCurrentUserUuid": 722,
465
551
  "CompletedSession": 723,
552
+ "PlugAndChargeAuthorizeRequest": 724,
466
553
  "NewChargeCard": 750,
467
554
  "AuthenticationListVersion": 751,
468
555
  "EnabledNfcTechnologies": 752,
@@ -487,12 +574,15 @@
487
574
  "VarisciteToMcuPacketErrors": 814,
488
575
  "UptimeVariscite": 820,
489
576
  "UptimeMCU": 821,
577
+ "CertificateVersion": 823,
578
+ "SecurityLog": 830,
490
579
  "CarSessionLog": 850,
491
580
  "CommunicationModeConfigurationInconsistency": 851,
492
581
  "RawPilotMonitor": 852,
493
582
  "IT3PhaseDiagnosticsLog": 853,
494
583
  "PilotTestResults": 854,
495
584
  "UnconditionalNfcDetectionIndication": 855,
585
+ "EnableLteDetailedSignalStrength": 856,
496
586
  "EmcTestCounter": 899,
497
587
  "ProductionTestResults": 900,
498
588
  "PostProductionTestResults": 901,
@@ -501,6 +591,7 @@
501
591
  "SmartComputerSoftwareApplicationVersion": 911,
502
592
  "SmartComputerSoftwareBootloaderVersion": 912,
503
593
  "SmartComputerHardwareVersion": 913,
594
+ "MIDLegallyRelevantSoftwareIdentifier": 914,
504
595
  "MacMain": 950,
505
596
  "MacPlcModuleGrid": 951,
506
597
  "MacWiFi": 952,
@@ -509,8 +600,12 @@
509
600
  "LteMsisdn": 961,
510
601
  "LteIccid": 962,
511
602
  "LteImei": 963,
603
+ "LteVersion": 964,
604
+ "LteDetailedSignalStrength": 965,
512
605
  "ProductionTestStationNumber": 970,
513
606
  "MIDCalibration": 980,
607
+ "MIDPublicKey": 981,
608
+ "MIDCalibrationID": 982,
514
609
  "IsOcppConnected": -3,
515
610
  "IsOnline": -2,
516
611
  "Pulse": -1
@@ -521,6 +616,9 @@
521
616
  "ObservationIds": {
522
617
  "Unknown": 0,
523
618
  "OfflineMode": 1,
619
+ "Capabilities": 100,
620
+ "ProductName": 110,
621
+ "ArenaId": 111,
524
622
  "AuthenticationRequired": 120,
525
623
  "PaymentActive": 130,
526
624
  "PaymentCurrency": 131,
@@ -540,8 +638,10 @@
540
638
  "TemperatureInternal5": 201,
541
639
  "TemperatureInternal6": 202,
542
640
  "TemperatureInternalLimit": 203,
641
+ "TemperaturePowerBoard": 205,
543
642
  "TemperatureInternalMaxLimit": 241,
544
643
  "Humidity": 270,
644
+ "TamperCover": 280,
545
645
  "VoltagePhase1": 501,
546
646
  "VoltagePhase2": 502,
547
647
  "VoltagePhase3": 503,
@@ -561,6 +661,7 @@
561
661
  "ChargerOfflineCurrent": 523,
562
662
  "RcdCalibration": 540,
563
663
  "RcdCalibrationNoise": 541,
664
+ "ManualRcdTest": 542,
564
665
  "TotalChargePowerSession": 553,
565
666
  "SignedMeterValue": 554,
566
667
  "SignedMeterValueInterval": 555,
@@ -588,6 +689,7 @@
588
689
  "SessionIdentifier": 721,
589
690
  "ChargerCurrentUserUuid": 722,
590
691
  "CompletedSession": 723,
692
+ "PlugAndChargeAuthorizeRequest": 724,
591
693
  "NewChargeCard": 750,
592
694
  "AuthenticationListVersion": 751,
593
695
  "EnabledNfcTechnologies": 752,
@@ -612,12 +714,15 @@
612
714
  "VarisciteToMcuPacketErrors": 814,
613
715
  "UptimeVariscite": 820,
614
716
  "UptimeMCU": 821,
717
+ "CertificateVersion": 823,
718
+ "SecurityLog": 830,
615
719
  "CarSessionLog": 850,
616
720
  "CommunicationModeConfigurationInconsistency": 851,
617
721
  "RawPilotMonitor": 852,
618
722
  "IT3PhaseDiagnosticsLog": 853,
619
723
  "PilotTestResults": 854,
620
724
  "UnconditionalNfcDetectionIndication": 855,
725
+ "EnableLteDetailedSignalStrength": 856,
621
726
  "EmcTestCounter": 899,
622
727
  "ProductionTestResults": 900,
623
728
  "PostProductionTestResults": 901,
@@ -626,6 +731,7 @@
626
731
  "SmartComputerSoftwareApplicationVersion": 911,
627
732
  "SmartComputerSoftwareBootloaderVersion": 912,
628
733
  "SmartComputerHardwareVersion": 913,
734
+ "MIDLegallyRelevantSoftwareIdentifier": 914,
629
735
  "MacMain": 950,
630
736
  "MacPlcModuleGrid": 951,
631
737
  "MacWiFi": 952,
@@ -634,8 +740,12 @@
634
740
  "LteMsisdn": 961,
635
741
  "LteIccid": 962,
636
742
  "LteImei": 963,
743
+ "LteVersion": 964,
744
+ "LteDetailedSignalStrength": 965,
637
745
  "ProductionTestStationNumber": 970,
638
746
  "MIDCalibration": 980,
747
+ "MIDPublicKey": 981,
748
+ "MIDCalibrationID": 982,
639
749
  "IsOcppConnected": -3,
640
750
  "IsOnline": -2,
641
751
  "Pulse": -1
@@ -670,6 +780,7 @@
670
780
  "ShowGranted": 601,
671
781
  "ShowDenied": 602,
672
782
  "IndicateAppConnect": 603,
783
+ "RequestSignedMIDEventLog": 700,
673
784
  "ConfirmChargeCardAdded": 750,
674
785
  "SetAuthenticationList": 751,
675
786
  "Debug": 800,
@@ -717,7 +828,8 @@
717
828
  "DiagnosticsMode": 805,
718
829
  "DisableBLEChargePointName": 806,
719
830
  "InternalDiagnosticsLog": 807,
720
- "UnconditionalNfcDetectionIndication": 855
831
+ "UnconditionalNfcDetectionIndication": 855,
832
+ "EnableLteDetailedSignalStrength": 856
721
833
  },
722
834
  "Warnings": {
723
835
  "None": 0,
@@ -755,13 +867,15 @@
755
867
  "VARISCITE": 2147483648,
756
868
  "MCU_BOOTLOADER": 4294967296,
757
869
  "FPGA_INIT_FAILED": 8589934592,
758
- "ILLEGAL_PHASE": 17179869184
870
+ "ILLEGAL_PHASE": 17179869184,
871
+ "MID_STORAGE_ERROR": 34359738368
759
872
  }
760
873
  },
761
874
  "Apollo": {
762
875
  "DeviceType": 4,
763
876
  "ObservationIds": {
764
877
  "Unknown": 0,
878
+ "Capabilities": 100,
765
879
  "AuthenticationRequired": 120,
766
880
  "PaymentActive": 130,
767
881
  "PaymentCurrency": 131,
@@ -784,6 +898,7 @@
784
898
  "TemperatureTM2": 207,
785
899
  "TemperatureInternalMaxLimit": 241,
786
900
  "Humidity": 270,
901
+ "TamperCover": 280,
787
902
  "VoltagePhase1": 501,
788
903
  "VoltagePhase2": 502,
789
904
  "VoltagePhase3": 503,
@@ -860,10 +975,18 @@
860
975
  "UptimeMCU": 821,
861
976
  "DataUsage": 822,
862
977
  "CertificateVersion": 823,
978
+ "SecurityLog": 830,
863
979
  "CarSessionLog": 850,
864
980
  "CommunicationModeConfigurationInconsistency": 851,
865
981
  "RawPilotMonitor": 852,
866
982
  "IT3PhaseDiagnosticsLog": 853,
983
+ "SessionController": 860,
984
+ "OcppNativeUrl": 861,
985
+ "OcppNativeCbId": 862,
986
+ "OcppNativeAuthorizationKey": 863,
987
+ "OcppNativeAuthorizationKeyFromZaptec": 864,
988
+ "OcppNativeSecurityProfile": 865,
989
+ "OcppNativeConnected": 866,
867
990
  "ProductionTestResults": 900,
868
991
  "PostProductionTestResults": 901,
869
992
  "SmartMainboardSoftwareApplicationVersion": 908,
@@ -940,7 +1063,12 @@
940
1063
  "ChargePointName": 802,
941
1064
  "DiagnosticsMode": 805,
942
1065
  "DisableBLEChargePointName": 806,
943
- "InternalDiagnosticsLog": 807
1066
+ "InternalDiagnosticsLog": 807,
1067
+ "SessionController": 860,
1068
+ "OcppNativeUrl": 861,
1069
+ "OcppNativeCbId": 862,
1070
+ "OcppNativeAuthorizationKey": 863,
1071
+ "OcppNativeAuthorizationKeyFromZaptec": 864
944
1072
  },
945
1073
  "Warnings": {
946
1074
  "None": 0,
@@ -1066,7 +1194,7 @@
1066
1194
  "InvitedUser": 7,
1067
1195
  "Country": 8
1068
1196
  },
1069
- "Version": "6.5.8.75738733",
1197
+ "Version": "6.5.8.0",
1070
1198
  "SmartWarnings": {
1071
1199
  "WARNING_OK": 0,
1072
1200
  "WARNING_HUMIDITY": 1,
@@ -1180,6 +1308,7 @@
1180
1308
  "Connectivity_4G": 64,
1181
1309
  "Authentication_Ocpp": 128,
1182
1310
  "PowerManagement_Apm_Tariff_PowerLimit": 256,
1311
+ "Authentication_OcppNative": 512,
1183
1312
  "LoadBalacing": 32768
1184
1313
  },
1185
1314
  "InstallationTypeConstraints": {
@@ -1198,7 +1327,8 @@
1198
1327
  "StoppedByRFID": 8,
1199
1328
  "Signed": 16,
1200
1329
  "Void": 32,
1201
- "Aborted": 64
1330
+ "Aborted": 64,
1331
+ "OcppNative": 128
1202
1332
  },
1203
1333
  "InstallationUpdateStatusCodes": {
1204
1334
  "Ok": 0,
@@ -1238,7 +1368,9 @@
1238
1368
  "SE4": 9,
1239
1369
  "DK1": 10,
1240
1370
  "DK2": 11,
1241
- "FI": 12
1371
+ "FI": 12,
1372
+ "NL": 13,
1373
+ "BE": 14
1242
1374
  },
1243
1375
  "PriceUnit": {
1244
1376
  "Unsupported": 0,
@@ -1247,9 +1379,12 @@
1247
1379
  "CountryDeliveryAreas": {
1248
1380
  "53215e81-d4a1-48ab-bfa3-001934b71734": [],
1249
1381
  "8e2a76e1-2f43-46bc-9319-0a77b12182e6": [],
1382
+ "d251fa3a-078a-4c98-a254-0d65cdecc578": [],
1250
1383
  "5456f813-850b-418f-9eef-1225e66302d2": [],
1251
1384
  "04918e62-f761-4ef2-8923-1483fa9fdd05": [],
1252
1385
  "758c174f-d840-4b80-a408-1d46ce2b7e05": [],
1386
+ "d7158bfc-ab96-4b85-88fb-26740ab8f17c": [],
1387
+ "0047a9bd-adea-4272-9708-3354dee0bd8c": [],
1253
1388
  "42ec863c-edb5-46b0-afeb-36f66fa7eebf": [
1254
1389
  12
1255
1390
  ],
@@ -1262,14 +1397,25 @@
1262
1397
  "a0e21e29-474f-466a-9a2f-3a17458465d8": [],
1263
1398
  "c66b0918-9e65-4dd4-9b6c-47f989538e6d": [],
1264
1399
  "a33ba41a-16e4-4b00-a2a1-4934d89c3a1c": [],
1265
- "bda681ab-adcb-4f67-bac5-5cbf28d42cc7": [],
1400
+ "2d3debcc-17e9-4e12-8802-4cd04e778655": [],
1401
+ "bda681ab-adcb-4f67-bac5-5cbf28d42cc7": [
1402
+ 13
1403
+ ],
1266
1404
  "52f1e37e-f314-4d48-8a6a-82c74e4830a1": [
1267
1405
  10,
1268
1406
  11
1269
1407
  ],
1270
1408
  "fb894235-7a19-4fe0-b6a1-8b9c9ceb9e4e": [],
1271
- "3073c0bd-9f5c-4f18-80dd-a7b163beb3fe": [],
1409
+ "0b252d8d-18bc-4dbb-9eca-953371586455": [],
1410
+ "06c1cbd3-66d3-48e3-8ca1-9d427400689c": [],
1411
+ "1aef14ea-054d-45f7-91c5-9e1b19762a95": [],
1412
+ "51f14b70-8cfb-4f43-b389-a4966e225ddd": [],
1413
+ "3073c0bd-9f5c-4f18-80dd-a7b163beb3fe": [
1414
+ 14
1415
+ ],
1416
+ "24c5afbe-2446-482e-b78d-a9494f8118d5": [],
1272
1417
  "3705d443-31df-4633-8bf4-b8379c82a5cb": [],
1418
+ "8022f9e8-d2a7-4446-a248-bcb25ce6d0e2": [],
1273
1419
  "83bffdb1-0a92-4574-bb7b-bd0d17387c17": [
1274
1420
  1,
1275
1421
  2,
@@ -1278,12 +1424,15 @@
1278
1424
  5
1279
1425
  ],
1280
1426
  "f743b0d4-1f38-43e8-a95d-cf18fe1c3ede": [],
1281
- "2365ed9c-8a79-44b5-9bf8-f7a2cf42fb44": [],
1282
- "d6267571-6cf4-4061-92d8-f9d55a4f3a40": []
1427
+ "514f0414-a993-4759-a3e8-db7b83633bfa": [],
1428
+ "d475da45-5b86-42ed-86e5-f30035e16da1": [],
1429
+ "2365ed9c-8a79-44b5-9bf8-f7a2cf42fb44": []
1283
1430
  }
1284
1431
  },
1285
1432
  "UserActionTypes": {
1286
- "AddSense": 1
1433
+ "None": 0,
1434
+ "AddSense": 1,
1435
+ "InviteNewUser": 2
1287
1436
  },
1288
1437
  "OcppCloudUrlVersions": {
1289
1438
  "Legacy": 0,
@@ -1,5 +1,4 @@
1
1
  require "faraday"
2
- require "faraday_middleware"
3
2
  require "active_model"
4
3
  require "active_support/all"
5
4
 
data/lib/zaptec/client.rb CHANGED
@@ -146,6 +146,8 @@ module Zaptec
146
146
 
147
147
  retry
148
148
  end
149
+ rescue Faraday::ForbiddenError => e
150
+ raise Errors::Forbidden, "Access denied to charger"
149
151
  rescue Faraday::Error => e
150
152
  raise Errors::RequestFailed.new("Request returned status #{e.response_status}", e.response)
151
153
  end
@@ -15,6 +15,13 @@ module Zaptec
15
15
  .then { |name, _mode| name }
16
16
  end
17
17
 
18
+ def charger_operation_mode_name_to_mode(operation_mode_name)
19
+ constants
20
+ .fetch("ChargerOperationModes")
21
+ .detect { |name, _mode| name == operation_mode_name.to_s }
22
+ .then { |_name, mode| mode }
23
+ end
24
+
18
25
  def command_to_command_id(command)
19
26
  constants
20
27
  .fetch("Commands")
data/lib/zaptec/errors.rb CHANGED
@@ -2,7 +2,7 @@ module Zaptec
2
2
  module Errors
3
3
  class Base < StandardError; end
4
4
  class ParameterMissing < Base; end
5
- class Unauthorized < Base; end
5
+ class Forbidden < Base; end
6
6
  class RequestFailed < Base
7
7
  attr_reader :response
8
8
 
@@ -1,10 +1,46 @@
1
1
  module Zaptec
2
2
  class MeterReading
3
+ GOOD = "G".freeze
4
+ KWH = "kWh".freeze
5
+ READINGS = "RD".freeze
6
+ STATUS = "ST".freeze
7
+ TIMESTAMP = "TM".freeze
8
+ UNIT = "RU".freeze
9
+ VALUE = "RV".freeze
10
+ WH = "Wh".freeze
11
+
12
+ # https://github.com/SAFE-eV/OCMF-Open-Charge-Metering-Format/blob/master/OCMF-de.md#json-basiertes-ocmf-format
3
13
  attr_reader :reading_kwh, :timestamp
4
14
 
5
15
  def initialize(reading_kwh:, timestamp:)
6
16
  @reading_kwh = reading_kwh
7
17
  @timestamp = timestamp
8
18
  end
19
+
20
+ class << self
21
+ def parse(ocmf_meter_reading)
22
+ _prefix, json_payload, _signature = ocmf_meter_reading.split("|")
23
+
24
+ data = JSON.parse(json_payload)
25
+
26
+ meter_reading = data.fetch(READINGS).detect do |reading|
27
+ reading.fetch(STATUS) == GOOD && reading[UNIT].in?([WH, KWH])
28
+ end
29
+
30
+ return if meter_reading.blank?
31
+
32
+ timestamp = Time.zone.parse(meter_reading.fetch(TIMESTAMP).split.first)
33
+
34
+ kwh_magnitude =
35
+ case meter_reading.fetch(UNIT)
36
+ when KWH then 1
37
+ when WH then 1000.0
38
+ end
39
+
40
+ reading_kwh = meter_reading.fetch(VALUE) / kwh_magnitude
41
+
42
+ new(reading_kwh:, timestamp:)
43
+ end
44
+ end
9
45
  end
10
46
  end
data/lib/zaptec/state.rb CHANGED
@@ -1,7 +1,9 @@
1
1
  module Zaptec
2
2
  class State
3
- CHARGING_MODES = %w[Connected_Requesting Connected_Charging].freeze
3
+ CONNECTED_REQUESTING = "Connected_Requesting".freeze
4
+ CONNECTED_CHARGING = "Connected_Charging".freeze
4
5
  DISCONNECTED = "Disconnected".freeze
6
+ CHARGING_MODES = [CONNECTED_CHARGING, CONNECTED_REQUESTING].freeze
5
7
 
6
8
  def initialize(data)
7
9
  @data = data
@@ -20,7 +22,7 @@ module Zaptec
20
22
  def online? = @data.fetch(:IsOnline).to_i.positive?
21
23
 
22
24
  def meter_reading
23
- @meter_reading ||= MeterReading.new(reading_kwh: total_charge_power, timestamp: Time.zone.now)
25
+ @meter_reading ||= MeterReading.parse(@data.fetch(:SignedMeterValue))
24
26
  end
25
27
 
26
28
  private
@@ -1,3 +1,3 @@
1
1
  module Zaptec
2
- VERSION = "1.2.1".freeze
2
+ VERSION = "1.2.2".freeze
3
3
  end
data/zaptec.gemspec CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
28
28
  spec.add_runtime_dependency "activemodel"
29
29
  spec.add_runtime_dependency "activesupport"
30
30
  spec.add_runtime_dependency "faraday"
31
- spec.add_runtime_dependency "faraday_middleware"
32
31
 
33
32
  spec.metadata["rubygems_mfa_required"] = "true"
34
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stekker_zaptec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Stekker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-12 00:00:00.000000000 Z
11
+ date: 2024-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: faraday_middleware
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: Zaptec connector
70
56
  email:
71
57
  - support@stekker.com
@@ -73,6 +59,7 @@ executables: []
73
59
  extensions: []
74
60
  extra_rdoc_files: []
75
61
  files:
62
+ - ".github/dependabot.yml"
76
63
  - ".github/workflows/ruby.yml"
77
64
  - ".gitignore"
78
65
  - ".rspec"
@@ -122,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
109
  - !ruby/object:Gem::Version
123
110
  version: '0'
124
111
  requirements: []
125
- rubygems_version: 3.4.18
112
+ rubygems_version: 3.4.6
126
113
  signing_key:
127
114
  specification_version: 4
128
115
  summary: Connect to your Zaptec charger