-
Notifications
You must be signed in to change notification settings - Fork 0
/
handy.yml
2987 lines (2987 loc) · 111 KB
/
handy.yml
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
openapi: 3.0.3
info:
description: 'API to interact with the ''TheHandy''. <p> <b>IMPORTANT</b>: This API is compatible with devices running firmware version 3 (v3) only. See note below on how to deal with firmware version 2 (v2) devices with this API. <p> <h3>Join the community</h3> Send us a mail or add us on discord for a more technical chat - **Handy#8756**<br> Follow us on Reddit for updates and announcements: https://www.reddit.com/r/theHandy/ <p> <h3>Server selection</h3> When using the API make sure you connect to the server environment that the device you are trying to interact with is connected to.<br> For most users this will be the production environment API server: <b>https://www.handyfeeling.com/api/handy/v2</b><br> If you have been given special access to firmware that connects to the staging environment, you should use the staging environment API server: <b>https://staging.handyfeeling.com/api/handy/v2</b><br> <p> <h3>Handling firmware v2 devices</h3> Users with firmware v2 devices are required to update their device to firmware v3 before the device can be fully used with this API.<br> To ease this process, two of the endpoints in this API can be used with firmware v2 devices:<br> <ul> <li><code>/connected</code> - Check online status of a device.</li> <li><code>/info</code> - Get general information about the device.</li> </ul> All other endpoints will always return a ''Machine not connected'' error if you try to use them with a firmware v2 device.<br><br> For v2 devices it''s important to handle the fwStatus returned from the <code>/info</code> endpoint properly.<br> v2 devices will always have fwStatus = UPDATE_REQUIRED(2). See <code>/info</code> documentation for more details.<br><br> When using the API with a device, you should always start by verifying that the device have a firmware that is compatible with the API you are using in your service.<br> An example flow could look like this: <ol> <li>Check if device is conncted with <code>/connected</code></li> <li>Check device firmware status with <code>/info</code></li> <li>If a firmware update is required, forward the user to <a href="https://www.handfyfeeling.com">https://www.handfyfeeling.com</a> so they can easily update the device firmware.</li> <li>Continue your service when the firmware status returned in <code>/info</code> is UP_TO_DATE(0).</li> </ol> <p> <h3>Mode specific operations</h3> Operations in <b>BASE</b>, <b>SLIDE</b>, <b>TIMESYNC</b> and <b>HSTP</b> are mode independent and available at any time.<br> Other operations are only available in a specific mode (eg. <b>HAMP</b>, <b>HDSP</b>, <b>HSSP</b>).<br> To access these operations, the device have to first be put in the specific mode (see <code>/mode</code>).<br> If you execute an operation not available in the current mode of the device, you will receive a ''No such method'' error response. <!--See live samples of use cases here: ''https://www.handyfeeling.com/api/handy/v2/demo/ -->'
version: 2.0.0-beta-3
title: Handy API v2.0.0
contact:
email: [email protected]
servers:
- url: 'https://www.handyfeeling.com/api/handy/v2'
description: Production API server
- url: 'https://staging.handyfeeling.com/api/handy/v2'
description: Staging API server
- url: '{protocol}://{ip}:{port}/api/handy/v2'
description: Local API server
variables:
ip:
default: 127.0.0.1
port:
default: '3035'
protocol:
default: http
enum:
- http
tags:
- name: BASE
description: BASE operations and information. Available in all modes.
- name: HAMP
description: Handy Alternate Motion Protocol (HAMP) operations.<p>The machine must first be put in HAMP mode for these operations to be available.
- name: HDSP
description: Handy Direct Streaming Protocol (HDSP) operations.<p>The machine must first be put in HDSP mode for these operations to be available.
- name: HSSP
description: Handy Synced Stream Protocol (HSSP) operations.<p>The machine must first be put in HSSP mode for these operations to be available.
- name: HSTP
description: HSTP (Handy Simple Timing Protocol) operations and information. Available in all modes. Only available in firmware >= 3.2.x
- name: MAINTENANCE
description: 'MAINTENANCE operations and information. The machine must first be put in MAINTENANCE mode for these operations to be available.<br/> <b>NOTE:</b>The maintenance operations will be removed from the public API in the future. You should not use these in your application if you are a third party developer.'
- name: OTA
description: 'OTA (over-the-air) information.<br> <b>NOTE:</b>The ota operations will be removed from the public API in the future. You should not use these in your application if you are a third party developer.'
- name: SLIDE
description: Slide operations and information. Available in all modes.
- name: TIMESYNC
description: Utilities for time syncronization.
components:
headers:
X-RateLimit-Limit:
schema:
type: integer
minimum: 0
example: 240
description: Request limit per minute window.
X-RateLimit-Remaining:
schema:
type: integer
minimum: 0
example: 100
description: The number of requests left in the current window.
X-RateLimit-Reset:
schema:
type: integer
minimum: 0
example: 6205
description: Milliseconds until next window reset.
responses:
'400':
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
description: Bad request.
'403':
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
description: Forbidden
'404':
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
description: Resource not found.
'408':
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
description: Request timeout.
'502':
description: Machine not connected.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'504':
description: Machine timeout.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
parameters:
ConnectionKey:
name: X-Connection-Key
in: header
required: true
description: Device connection key.
schema:
$ref: '#/components/schemas/ConnectionKey'
ChannelOrKey:
name: X-Connection-Key
in: header
required: true
description: Device connection key or a channel reference.
schema:
type: string
minLength: 5
maxLength: 64
pattern: '^(cid:?:)?[a-zA-Z0-9/+]{5,64}$'
example: 'cid:09Amdosdidsa/mdsa'
schemas:
Timestamp:
type: integer
minimum: 0
example: 1619080355381
ConnectionKey:
type: string
minLength: 5
maxLength: 64
pattern: '^[a-zA-Z0-9]{5,64}$'
example: x82m0S
FirmwareVersion:
description: Firmware version
type: string
example: '2.13'
HardwareVersion:
type: integer
format: int32
description: Hardware version
example: 1
Model:
description: Device model
type: string
enum:
- H01
x-enum-varnames:
- H01
x-enum-descriptions:
- H01
Branch:
type: string
description: Firmware branch
enum:
- master
- master-staging
x-enum-varnames:
- MASTER
- STAGING
x-enum-descriptions:
- MASTER
- STAGING
Mode:
description: Available device modes.<ul><li>HAMP(0)<li>HSSP(1)</li><li>HDSP(2)</li><li>MAINTENANCE(3)</li><li>HBSP(4)</li></ul>
type: number
enum:
- 0
- 1
- 2
- 3
- 4
x-enum-varnames:
- HAMP
- HSSP
- HDSP
- MAINTENANCE
- HBSP
x-enum-descriptions:
- HAMP
- HSSP
- HDSP
- MAINTENANCE
- HBSP
example: 1
ModeUpdate:
description: Mode update payload
type: object
properties:
mode:
$ref: '#/components/schemas/Mode'
required:
- mode
ModeUpdateResponse:
type: object
allOf:
- type: object
properties:
result:
description: 'Possible result codes from a set mode operation. <ul><li>ERROR(-1) - Failed setting mode.</li><li>SUCCESS_NEW_MODE(0) - Success, another mode was previously set.</li><li>SUCCESS_SAME_MODE(1) - Success, the same mode was previously set.</li>'
type: number
enum:
- -1
- 0
- 1
x-enum-varnames:
- ERROR
- SUCCESS_NEW_MODE
- SUCCESS_SAME_MODE
x-enum-descriptions:
- ERROR
- SUCCESS_NEW_MODE
- SUCCESS_SAME_MODE
required:
- result
Offset:
type: number
format: int32
PercentValue:
type: number
format: double
maximum: 100
minimum: 0
example: 10.5
RPCResult:
description: Generic response
type: object
properties:
result:
$ref: '#/components/schemas/GenericResult'
required:
- result
StateResult:
description: Possible result codes returned from a HAMP start/stop operation.<ul><li>ERROR(-1) - Failed stop/starting motion.</li><li>SUCCESS_NEW_STATE(0) - Started/stopped motion.</li><li>SUCCESS_SAME_STATE(1) - Already started/stopped.</li></ul>
type: number
enum:
- -1
- 0
- 1
x-enum-varnames:
- ERROR
- SUCCESS_NEW_STATE
- SUCCESS_SAME_STATE
x-enum-descriptions:
- ERROR
- SUCCESS_NEW_STATE
- SUCCESS_SAME_STATE
VelocityAbsolute:
description: 'Absolute velocity in millimeter per millisecond (mm/ms). The sign indicates the direction of the movement. Negative: moving towards the bottom. Positive: moving towards the top.'
type: number
format: int32
example: 200
PositionAbsolute:
description: Absolute position in millimeter (mm). 0 = absolute bottom position.
type: number
format: double
Duration:
type: integer
minimum: 0
description: Duration in milliseconds (ms)
HAMPState:
description: 'Possible HAMP states: <ul> <li>STOPPED(1) - The device slide is not moving.</li> <li>MOVING(2) - The device slide is moving</li> </ul>'
type: number
enum:
- 1
- 2
x-enum-varnames:
- STOPPED
- MOVING
x-enum-descriptions:
- STOPPED
- MOVING
HAMPStartResponse:
type: object
allOf:
- type: object
properties:
result:
$ref: '#/components/schemas/StateResult'
required:
- result
HAMPStopResponse:
type: object
allOf:
- type: object
properties:
result:
$ref: '#/components/schemas/StateResult'
required:
- result
HAMPVelocityPercentResponse:
type: object
allOf:
- $ref: '#/components/schemas/RPCResult'
- type: object
properties:
velocity:
$ref: '#/components/schemas/PercentValue'
required:
- velocity
HAMPVelocityPercent:
type: object
properties:
velocity:
$ref: '#/components/schemas/PercentValue'
required:
- velocity
HSSPState:
description: 'Possible HSSP states: <ul> <li>NEED_SYNC(1) - The device need to synchronize with the server. Only returned from devices with firmware version <= 3.1.x</li> <li>NEED_SETUP(2) - No script have yet been setup on the device.</li> <li>STOPPED(3) - The script execution is stopped.</li> <li>PLAYING(4) - The device is executing the script.</li> </ul>'
type: number
enum:
- 1
- 2
- 3
- 4
x-enum-varnames:
- NEED_SYNC
- NEED_SETUP
- STOPPED
- PLAYING
x-enum-descriptions:
- NEED_SYNC
- NEED_SETUP
- STOPPED
- PLAYING
HSSPPlay:
type: object
properties:
estimatedServerTime:
description: The client side estimated server time in milliseconds (Unix Epoch).
type: integer
minimum: 0
example: 1619080355381
startTime:
description: The time index to start playing from in milliseconds.
type: integer
minimum: 0
example: 5000
required:
- estimatedServerTime
- startTime
HSSPPlayResult:
description: Possible HSSP play result codes. <ul><li>SUCCESS(0) - Script is playing.</li><li>ERROR(-1) - Script is not playing.</li></ul>
type: integer
enum:
- 0
- -1
x-enum-varnames:
- SUCCESS
- ERROR
x-enum-descriptions:
- Success. Script is playing.
- Error. Script is not playing.
HSSPPlayResponse:
description: The response returned from a hssp/play operation.
type: object
allOf:
- type: object
properties:
result:
$ref: '#/components/schemas/HSSPPlayResult'
required:
- result
Url:
type: string
example: 'http://www.example.org/dataset.csv'
Sha256:
type: string
example: cc8c4129276cd80bb6cbfe7f968b22708240a8afcac9c7c0cbcce7f6c6064927
Setup:
type: object
properties:
url:
$ref: '#/components/schemas/Url'
sha256:
$ref: '#/components/schemas/Sha256'
required:
- url
HSSPSetupResult:
description: Possible HSSP setup result codes. <ul><li>USING_CACHED(0) - Script already present on the device.</li><li>DOWNLOADED(1) - Script downloaded successfully.</li></ul>
type: integer
enum:
- 0
- 1
x-enum-varnames:
- USING_CACHED
- DOWNLOADED
x-enum-descriptions:
- USING_CACHED
- DOWNLOADED
Looping:
type: boolean
LoopSettingResponse:
type: object
allOf:
- $ref: '#/components/schemas/RPCResult'
- type: object
properties:
activated:
$ref: '#/components/schemas/Looping'
required:
- activated
LoopSettingUpdate:
type: object
properties:
activated:
$ref: '#/components/schemas/Looping'
required:
- activated
SyncCount:
type: integer
format: int32
minimum: 15
default: 30
maximum: 40
Outliers:
type: integer
format: int32
minimum: 0
default: 6
maximum: 10
SyncResponse:
type: object
allOf:
- $ref: '#/components/schemas/RPCResult'
- type: object
properties:
dtserver:
$ref: '#/components/schemas/Timestamp'
required:
- dtserver
OffsetUpdate:
type: object
properties:
offset:
$ref: '#/components/schemas/Offset'
OffsetResponse:
type: object
allOf:
- $ref: '#/components/schemas/RPCResult'
- type: object
properties:
offset:
$ref: '#/components/schemas/Offset'
required:
- offset
HDSPRequest:
type: object
properties:
stopOnTarget:
description: Flag to indicate whether or not the movement of the slide should stop when the specified target position have been reached. Setting this value to <code>false</code> should in most cases give a smoother movement when sending a stream HDSP commands continuously to the device.
type: boolean
default: false
immediateResponse:
type: boolean
description: Flag to indicate if the server should return a response immediately upon receinving the command from the client or wait for a response from the device before returning a response to the client.
default: false
NextXAVA:
type: object
allOf:
- $ref: '#/components/schemas/HDSPRequest'
- type: object
properties:
position:
$ref: '#/components/schemas/PositionAbsolute'
velocity:
$ref: '#/components/schemas/VelocityAbsolute'
required:
- position
- velocity
NextXPVP:
type: object
allOf:
- $ref: '#/components/schemas/HDSPRequest'
- type: object
properties:
position:
$ref: '#/components/schemas/PercentValue'
velocity:
$ref: '#/components/schemas/PercentValue'
required:
- position
- velocity
NextXPVA:
type: object
allOf:
- $ref: '#/components/schemas/HDSPRequest'
- type: object
properties:
position:
$ref: '#/components/schemas/PercentValue'
velocity:
$ref: '#/components/schemas/VelocityAbsolute'
required:
- position
- velocity
HDSPTimeRequest:
type: object
allOf:
- $ref: '#/components/schemas/HDSPRequest'
- type: object
properties:
duration:
$ref: '#/components/schemas/Duration'
required:
- duration
NextXPT:
type: object
allOf:
- $ref: '#/components/schemas/HDSPTimeRequest'
- type: object
properties:
position:
$ref: '#/components/schemas/PercentValue'
required:
- position
NextXAT:
type: object
allOf:
- $ref: '#/components/schemas/HDSPTimeRequest'
- type: object
properties:
position:
$ref: '#/components/schemas/PositionAbsolute'
required:
- position
HDSPResult:
description: Possible HDSP result codes. <ul><li>ERROR(-3) - Device failed processing the command.</li><li>SUCCESS_POSITION_REACHED(0)</li><li>SUCCESS_POSITION_NOT_REACHED(1)</li><li>SUCCES_ALREADY_AT_POSITION(2)</li><li>SUCCESS_INTERRTUPTED(3)</li></ul>
type: integer
enum:
- -3
- 0
- 1
- 2
- 3
x-enum-varnames:
- ERROR
- SUCCESS_POSITION_REACHED
- SUCCESS_POSITION_NOT_REACHED
- SUCCES_ALREADY_AT_POSITION
- SUCCESS_INTERRTUPTED
x-enum-descriptions:
- ERROR
- SUCCESS_POSITION_REACHED
- SUCCESS_POSITION_NOT_REACHED
- SUCCES_ALREADY_AT_POSITION
- SUCCESS_INTERRTUPTED
HDSPResponse:
type: object
properties:
result:
$ref: '#/components/schemas/HDSPResult'
required:
- result
FixedPos:
description: Flag to indicate if the slide operation is fixed. A fixed operation moves the active slider area (min-max) offset to the new min or max value.
type: boolean
default: false
ErrorResponse:
type: object
properties:
error:
type: object
properties:
connected:
type: boolean
name:
type: string
message:
type: string
code:
oneOf:
- description: The different possible general error codes.<p> <ul> <li>ERROR(1000) - Unspecified error</li> <li>DEVICE_TIMEOUT(1001) - A response from the device was not received within the maximum timeout.</li> <li>DEVICE_NOT_CONNECTED(1002) - The device is not connected.</li> </ul>
type: number
minimum: 1000
maximum: 1999
enum:
- 1000
- 1001
- 1002
x-enum-varnames:
- ERROR
- DEVICE_TIMEOUT
- DEVICE_NOT_CONNECTED
x-enum-descriptions:
- Unspecified error
- A response from the device was not received within the maximum timeout.
- The device is not connected.
- $ref: '#/components/schemas/BASEModeErrors'
- $ref: '#/components/schemas/HAMPModeErrors'
- $ref: '#/components/schemas/HSSPModeErrors'
- $ref: '#/components/schemas/HDSPModeErrors'
- $ref: '#/components/schemas/MAINTENANCEModeErrors'
data:
type: object
required:
- connected
- code
- name
- message
PositionAbsoluteResponse:
type: object
allOf:
- $ref: '#/components/schemas/RPCResult'
- type: object
properties:
position:
$ref: '#/components/schemas/PositionAbsolute'
required:
- position
GenericResult:
description: Generic result values.<ul><li>SUCCESS(0)</li><li>ERROR(-1)</li></ul>
type: number
enum:
- 0
- -1
x-enum-varnames:
- SUCCESS
- ERROR
x-enum-descriptions:
- SUCCESS
- ERROR
SlideResult:
description: 'Possible slide operation result codes. <ul> <li>ACCEPTED(0) - Value updated.</li> <li>ACCEPTED_ROUNDED_DOWN(1) - Value updated but rounded down.</li> <li>ACCEPTED_ROUNDED_UP(2) - Value updated but rounded up.</li> </ul> '
type: number
enum:
- 0
- 1
- 2
x-enum-varnames:
- ACCEPTED
- ACCEPTED_ROUNDED_DOWN
- ACCEPTED_ROUNDED_UP
x-enum-descriptions:
- ACCEPTED
- ACCEPTED_ROUNDED_DOWN
- ACCEPTED_ROUNDED_UP
SlideUpdateResponse:
type: object
properties:
result:
$ref: '#/components/schemas/SlideResult'
required:
- result
UpdateStatusResponse:
type: object
allOf:
- $ref: '#/components/schemas/RPCResult'
- type: object
properties:
status:
description: Possible update status values.<ul><li>PENDING(0)<li>IN_PROGRESS(1)</li><li>SUCCESS(2)</li><li>FAILED(3)</li></ul>
type: number
enum:
- 0
- 1
- 2
- 3
x-enum-varnames:
- PENDING
- IN_PROGRESS
- SUCCESS
- FAILED
x-enum-descriptions:
- Update pending
- Update in progress
- Update was successful
- Update failed
example: 1
progress:
type: integer
minimum: 0
maximum: 100
required:
- progress
- status
BASEModeErrors:
description: The different possible mode independent specific error codes. <p> <ul> <li>ERROR(2000) - Unspecified error.</li> <li>INVALID_REQUEST(2001) - The request could not be processed by the device due to the request content.</li> <li>METHOD_NOT_FOUND(2002) - The requested operation is not supported by the device or the current device mode.</li> </ul>
type: number
minimum: 2000
maximum: 2999
enum:
- 2000
- 2001
- 2002
x-enum-varnames:
- ERROR
- INVALID_REQUEST
- METHOD_NOT_FOUND
x-enum-descriptions:
- Unspecified error
- The request could not be processed by the device due to the request content.
- The requested operation is not supported on the device.
HSSPModeErrors:
description: The different possible HSSP mode specific error codes. <p> <ul> <li>ERROR(4000) - Unspecified HSSP error.</li> <li>DOWNLOAD_FAILED(4001) - The device could not download the specified script.</li> <li>HASH_ERROR(4002) - Script hash validation error</li> <li>SYNC_REQUIRED(4003) - The device need to resync with the server before HSSP setup can be peformed. Only returned from devices running firmware version <= 3.1.x</li> <li>TOKEN_ERROR(4004) - Unspecified token error. Check error response data property for chained error info.</li> <li>MAX_SCRIPT_SIZE_ERROR(4005) - The script is too large for the device. The maximum supported CSV file size is 524288 bytes.</li> <li>DEVICE_STORAGE_FULL_ERROR(4006) - The setup failed because the device storage is full.</li> <li>DEVICE_STORAGE_FREE_ERROR(4007) - The setup failed. Not enough space left to store the script on the device.</li> <li>DEVICE_STORAGE_CLEAN_ERROR(4008) - The setup failed. An attempt to free up device space failed.</li> </ul>
type: number
minimum: 4000
maximum: 4999
enum:
- 4000
- 4001
- 4002
- 4003
- 4004
- 4005
- 4006
- 4007
- 4008
x-enum-varnames:
- ERROR
- DOWNLOAD_FAILED
- HASH_ERROR
- SYNC_REQUIRED
- TOKEN_ERROR
- MAX_SCRIPT_SIZE_ERROR
- DEVICE_STORAGE_FULL_ERROR
- DEVICE_STORAGE_FREE_ERROR
- DEVICE_STORAGE_CLEAN_ERROR
x-enum-descriptions:
- Unspecified HSSP error.
- The device could not download the specified script.
- The validation of the script hash failed.
- The device need to resync with the server before the setup can be peformed.
- Generic token error.
- The script is too large for the device.
- The device storage is full.
- The device storage does not have enough free space to store the script.
- An attempt to free up device storage space failed.
HAMPModeErrors:
description: The different possible HAMP mode specific error codes. <p> <ul> <li>ERROR(3000) - Unspecified HAMP error</li> </ul>
type: number
minimum: 3000
maximum: 3999
enum:
- 3000
x-enum-varnames:
- ERROR
x-enum-descriptions:
- Unspecified HAMP error
HDSPModeErrors:
description: The different possible HDSP mode specific error codes. <p> <ul> <li>ERROR(5000) - Unspecified HDSP error</li> </ul>
type: number
minimum: 5000
maximum: 5999
enum:
- 5000
x-enum-varnames:
- ERROR
x-enum-descriptions:
- Unspecified HSDP error
MAINTENANCEModeErrors:
description: The different possible MAINTENANCE mode specific error codes. <p> <ul> <li>ERROR(6000) - Unspecified MAINTENANCE error</li> <li>OPERATION_FAILED(6001) - The device failed to complete the MAINTENANCE operation successfully.</li> </ul>
type: number
minimum: 6000
maximum: 6999
enum:
- 6000
- 6001
x-enum-varnames:
- ERROR
- RESTART_FAILED
- UPDATE_START_FAILED
- STATUS_GET_FAILED
x-enum-descriptions:
- Unspecified MAINTENANCE error
- Failed to restart the device.
- Failed to start the update process.
- Failed getting the update process status.
SessionId:
description: Device session id. Unique per connected session.
type: string
example: 01FZZR1H25CWF77Q5T26YSJMBY
Connected:
description: Machine connected status
type: boolean
example: true
ConnectedResponse:
description: Connected response
type: object
properties:
connected:
$ref: '#/components/schemas/Connected'
required:
- connected
FirmwareStatus:
description: Possible device firmware status. <p> <ul> <li>0 - UP_TO_DATE - The firmware is up-tp-date (latest version).</li> <li>1 - UPDATE_REQUIRED - A critical update is available.</li> <li>2 - UPDATE_AVAILABLE - An non critical update to the firmware is available.</li> </ul>
type: number
enum:
- 0
- 1
- 2
x-enum-varnames:
- UP_TO_DATE
- UPDATE_REQUIRED
- UPDATE_AVAILABLE
x-enum-descriptions:
- The firmware is up-tp-date (latest version).
- A critical update is available.
- An non critical update to the firmware is available.
InfoResponse:
type: object
properties:
fwVersion:
$ref: '#/components/schemas/FirmwareVersion'
fwStatus:
$ref: '#/components/schemas/FirmwareStatus'
hwVersion:
$ref: '#/components/schemas/HardwareVersion'
model:
$ref: '#/components/schemas/Model'
branch:
$ref: '#/components/schemas/Branch'
sessionId:
$ref: '#/components/schemas/SessionId'
required:
- fwVersion
- fwStatus
- hwVersion
- model
- branch
- sessionId
SettingsResponse:
type: object
properties:
slideMin:
$ref: '#/components/schemas/PercentValue'
slideMax:
$ref: '#/components/schemas/PercentValue'
required:
- slideMin
- slideMax
- offset
- velocity
OtaLatest:
type: object
properties:
model:
$ref: '#/components/schemas/Model'
branch:
$ref: '#/components/schemas/Branch'
required:
- model
- branch
OtaLatestResponse:
type: object
properties:
fwVersion:
$ref: '#/components/schemas/FirmwareVersion'
required:
- fwVersion
StatusResponse:
type: object
description: Machine status
properties:
mode:
$ref: '#/components/schemas/Mode'
state:
oneOf:
- $ref: '#/components/schemas/HSSPState'
- $ref: '#/components/schemas/HAMPState'
required:
- mode
ServerTimeResponse:
type: object
required:
- serverTime
properties:
serverTime:
$ref: '#/components/schemas/Timestamp'
GenericError:
type: object
description: Error result
properties:
code:
type: integer
message:
type: string
data:
type: object
SlideResultResponse:
type: object
properties:
result:
$ref: '#/components/schemas/SlideResult'
GenericResultResponse:
type: object
properties:
result:
$ref: '#/components/schemas/GenericResult'
required:
- result
SliderMaxResponse:
type: object
properties:
max:
$ref: '#/components/schemas/PercentValue'
required:
- max
SliderMinResponse:
type: object
properties:
min:
$ref: '#/components/schemas/PercentValue'
required:
- min
SlideResponse:
type: object
allOf:
- $ref: '#/components/schemas/SliderMinResponse'
- $ref: '#/components/schemas/SliderMaxResponse'
SlideSettings:
anyOf:
- type: object
properties:
min:
$ref: '#/components/schemas/PercentValue'
max:
$ref: '#/components/schemas/PercentValue'
required:
- min
- max
example:
min: 10
max: 30
- type: object
properties:
min:
$ref: '#/components/schemas/PercentValue'
fixed:
$ref: '#/components/schemas/FixedPos'
required:
- min
example:
min: 50
fixed: true
- type: object
properties:
max:
$ref: '#/components/schemas/PercentValue'
fixed:
$ref: '#/components/schemas/FixedPos'
required:
- max
example:
max: 100
fixed: false
HSSPResponse:
type: object
properties:
state:
$ref: '#/components/schemas/HSSPState'
slideMax:
$ref: '#/components/schemas/PercentValue'
slideMin:
$ref: '#/components/schemas/PercentValue'
offset:
$ref: '#/components/schemas/Offset'
required:
- slideMin
- slideMax
- offset
- state
HAMPResponse:
type: object
properties:
state:
$ref: '#/components/schemas/HAMPState'
slideMax:
$ref: '#/components/schemas/PercentValue'
slideMin:
$ref: '#/components/schemas/PercentValue'
velocity:
$ref: '#/components/schemas/PercentValue'
required:
- slideMin
- slideMax
- offset
- state