-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaikin.yaml
798 lines (798 loc) · 20.3 KB
/
daikin.yaml
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
openapi: 3.0.2
info:
version: 0.0.0
title: DAIKIN API
description: |
json 形式で記述しているが、
実際は key と value を = で繋いだコンマ区切りの形式でレスポンスが返ってくる。
どのhttpメソッドを使ってもレスポンスが返ってくる。また、パラメータはクエリパラメータとして送る必要がある。
paths:
/common/basic_info:
get:
tags:
- common
summary: 機器の基本情報を取得
responses:
'200':
description: |
機器の基本情報
content:
text/plain:
schema:
$ref: '#/components/schemas/BasicInfo'
/common/get_datetime:
get:
tags:
- common
summary: 機器の時刻を取得
responses:
'200':
description: |
機器の時刻
content:
text/plain:
schema:
$ref: '#/components/schemas/GetDatetime'
/common/get_notify:
get:
tags:
- common
summary: 通知情報を取得
responses:
'200':
description: |
通知情報
content:
text/plain:
schema:
$ref: '#/components/schemas/GetNotify'
/common/notify_date_time:
post:
tags:
- common
summary: 現在時刻の登録
parameters:
- in: query
name: date
schema:
type: string
example: 2020/01/01
- in: query
name: zone
schema:
type: string
example: GMT
- in: query
name: time
schema:
type: string
example: '12:00:00'
responses:
'200':
description: |
現在時刻のセットに成功
content:
text/plain:
schema:
$ref: '#/components/schemas/Success'
/common/get_wifi_setting:
get:
tags:
- common
summary: Wi-Fi の接続を情報を取得する
responses:
'200':
description: |
Wi-Fi の接続を情報
content:
text/plain:
schema:
$ref: '#/components/schemas/GetWifiSetting'
/common/look_adapter:
get:
tags:
- common
summary: 接続確認を開始する
responses:
'200':
description: |
接続確認を開始
content:
text/plain:
schema:
$ref: '#/components/schemas/Success'
/common/stop_look_adapter:
get:
tags:
- common
summary: 接続確認を終了する
responses:
'200':
description: |
接続確認を終了
content:
text/plain:
schema:
$ref: '#/components/schemas/Success'
/common/set_name:
post:
tags:
- common
summary: 機器の名称を変更する
parameters:
- in: query
name: name
schema:
type: string
example: Cleaner
description: |
接続機器の名称
responses:
'200':
description: |
機器の名称を変更
content:
text/plain:
schema:
$ref: '#/components/schemas/Success'
/cleaner/get_model_info:
get:
tags:
- cleaner
summary: モデルの情報を取得
responses:
'200':
description: |
モデルの情報
content:
text/plain:
schema:
$ref: '#/components/schemas/GetModelInfo'
/cleaner/get_unit_info:
get:
tags:
- cleaner
summary: ユニットの情報を取得
responses:
'200':
description: |
ユニットの情報を取得
content:
text/plain:
schema:
$ref: '#/components/schemas/GetUnitInfo'
/cleaner/get_control_info:
get:
tags:
- cleaner
summary: 空気清浄機のモードを取得
responses:
'200':
description: |
空気清浄機のモードを取得
content:
text/plain:
schema:
$ref: '#/components/schemas/GetControlInfo'
/cleaner/set_control_info:
post:
tags:
- cleaner
summary: 空気清浄機のモードを変更
parameters:
- in: query
name: pow
description: |
電源のON, OFF
0: OFF
1: ON
schema:
type: integer
enum:
- 0
- 1
example: 1
- in: query
name: mode
description: |
モード
0:
1: おまかせ(humd, airvol 無視)
2: 節電(airvol 無視)
3: 花粉(airvol 無視)
4: のど・はだ(humd, airvol 無視)
5: サーキュレーター(airvol 無視)
schema:
type: integer
enum:
- 0
- 1
- 2
- 3
- 4
- 5
example: 0
- in: query
name: humd
description: |
加湿
0: OFF
1: ひかえめ
2: 標準
3: 高め
schema:
type: integer
enum:
- 0
- 1
- 2
- 3
example: 0
- in: query
name: airvol
description: |
風量
0: 自動運転
1: しずか
2: 弱
3: 標準
5: ターボ
schema:
type: integer
enum:
- 0
- 1
- 2
- 3
- 5
example: 0
responses:
'200':
description: |
ユニット
content:
text/plain:
schema:
$ref: '#/components/schemas/Success'
/cleaner/get_sensor_info:
get:
tags:
- cleaner
summary: 空気清浄機のセンサの情報を取得
responses:
'200':
description: |
空気清浄機のセンサの情報を取得
content:
text/plain:
schema:
$ref: '#/components/schemas/GetSensorInfo'
/cleaner/get_unit_status:
get:
tags:
- cleaner
summary: 空気清浄機のユニットの状態を取得
responses:
'200':
description: |
空気清浄機のユニットの状態を取得
content:
text/plain:
schema:
$ref: '#/components/schemas/GetSensorInfo'
/cleaner/get_device_setting:
get:
tags:
- cleaner
summary: 空気清浄機のデバイス設定を取得
responses:
'200':
description: |
空気清浄機のデバイス設定を取得
content:
text/plain:
schema:
$ref: '#/components/schemas/GetDeviceSetting'
/cleaner/set_device_setting:
post:
tags:
- cleaner
summary: 空気清浄機のデバイス設定を変更
parameters:
- in: query
name: led_dsp
description: |
表示ランプの明るさ切り替え
0: 明
1: 暗
2: 切
schema:
type: integer
enum:
- 0
- 1
- 2
example: 0
responses:
'200':
description: |
空気清浄機のデバイス設定を変更
content:
text/plain:
schema:
$ref: '#/components/schemas/Success'
/cleaner/get_day_snsr_count:
get:
tags:
- cleaner
summary: 空気清浄機の1日のセンサ反応グラフの取得する
responses:
'200':
description: |
空気清浄機の1日のセンサ反応グラフの取得
content:
text/plain:
schema:
$ref: '#/components/schemas/GetDaySnsrCount'
/cleaner/get_week_snsr_count:
get:
tags:
- cleaner
summary: 空気清浄機の1週間のセンサ反応グラフの取得する
responses:
'200':
description: |
空気清浄機の1週間のセンサ反応グラフの取得する
content:
text/plain:
schema:
$ref: '#/components/schemas/GetWeekSnsrCount'
components:
schemas:
BasicInfo:
type: object
properties:
ret:
type: string
example: OK
type:
type: string
example: cleaner
reg:
type: string
example: jp
adp_kind:
type: integer
var:
type: string
example: '1_10_0'
rev:
type: string
pv:
type: integer
pow:
type: integer
err:
type: integer
location:
type: integer
name:
type: string
icon:
type: integer
method:
type: string
example: polling
port:
type: integer
id:
type: string
pw:
type: string
lpw_flag:
type: integer
led:
type: integer
dst:
type: integer
en_setzone:
type: integer
mac:
type: string
ssid:
type: string
adp_mode:
type: string
grp_name:
type: string
en_grp:
type: integer
en_hol:
type: integer
edid:
type: string
sw_id:
type: string
GetDatetime:
type: object
properties:
ret:
type: string
example: OK
sta:
type: integer
example: 1
cur:
type: string
example: '2000/1/1 12:0:0'
reg:
type: string
example: jp
dst:
type: integer
zone:
type: integer
example: 'ret=OK,sta=1,cur=2020/1/1 12:0:0,reg=jp,dst=1,zone=0'
GetNotify:
type: object
properties:
ret:
type: string
example: OK
auto_off_flg:
type: integer
auto_off_tm:
type: string
example: 'ret=OK,auto_off_flg=0,auto_off_tm=- -'
GetWifiSetting:
type: object
properties:
ret:
type: string
example: OK
ssid:
type: string
description: |
Wi-Fi の SSID
example: 1
security:
type: string
description: |
Wi-Fi のセキュリティ情報
example: mixed
key:
type: string
description: |
Wi-Fi のパスワード(平文)
example: PASSWORD
link:
type: integer
example: 1
example: 'ret=OK,ssid=SSID,security=mixed,key=PASSWORD,link=1'
GetModelInfo:
type: object
description: |
モデルの情報
properties:
ret:
type: string
example: OK
sup_mode:
type: string
sup_airvol:
type: string
sup_humd0:
type: string
sup_humd1:
type: string
sup_humd2:
type: string
sup_humd3:
type: string
sup_humd4:
type: string
sup_humd5:
type: string
sup_sensor:
type: string
sup_devset:
type: string
en_scdltmr:
type: string
en_OpeOpt:
type: string
en_aclink:
type: string
streamer_type:
type: string
en_dust_filter:
type: string
GetUnitInfo:
type: object
description: |
モデルの情報
properties:
ret:
type: string
example: OK
ctrl_info:
type: object
description: |
URL エンコードされたテキストで情報が来る
example: pow%3d1%2cmode%3d1%2cairvol%3d0%2chumd%3d4
properties:
pow:
type: integer
example: 1
mode:
type: integer
example: 1
airvol:
type: integer
example: 0
humd:
type: integer
example: 4
sensor_info:
type: object
description: |
センサの成功が URL エンコードされたテキストで来る
example: htemp%3d30.0%2chhum%3d50%2cpm25%3d0%2cdust%3d0%2codor%3d0
properties:
htemp:
type: integer
description: |
気温(摂氏)
example: 30
hhum:
type: integer
description: |
湿度
example: 50
pm25:
type: integer
description: |
pm2.5(0の時アプリでは1と表示される)
example: 0
dust:
type: integer
description: |
ほこり(0の時アプリでは1と表示される)
example: 0
odor:
type: integer
description: |
におい(0の時アプリでは1と表示される)
example: 0
unit_status:
type: object
description: |
URL エンコードされたテキストで情報が来る
example: filter%3d0%2cstrmr_cln%3d0%2cwater_supply%3d0%2cunit_err%3d0000
properties:
filter:
type: integer
example: 0
strmr_cln:
type: integer
example: 0
water_supply:
type: integer
example: 0
unit_err:
type: integer
example: 0
dev_setting:
type: object
description: |
URL エンコードされたテキストで情報が来る
example: led_dsp%3d1%2cd_sns%3d0%2cc_lock%3d0%2cstreamer%3d0%2cact_ion%3d1%2cbuzzer%3d1%2cturbo%3d-%2ceco_moni%3d1
properties:
led_dsp:
type: integer
example: 0
d_sns:
type: integer
example: 0
c_lock:
type: integer
example: 0
streamer:
type: integer
example: 0
act_ion:
type: integer
example: 1
buzzer:
type: integer
example: 1
turbo:
type: string
example: '-'
eco_moni:
type: integer
example: 1
GetControlInfo:
type: object
properties:
ret:
type: string
example: OK
pow:
type: integer
mode:
type: string
airvol:
type: string
humd:
type: string
example: |
ret=OK,pow=1,mode=1,airvol=0,humd=4
GetSensorInfo:
type: object
description: |
空気清浄機のセンサの情報
properties:
ret:
type: string
example: OK
htemp:
type: integer
description: |
気温(摂氏)
example: 30
hhum:
type: integer
description: |
湿度
example: 50
pm25:
type: integer
description: |
pm2.5(0の時アプリでは1と表示される)
example: 0
dust:
type: integer
description: |
ほこり(0の時アプリでは1と表示される)
example: 0
odor:
type: integer
description: |
におい(0の時アプリでは1と表示される)
example: 0
GetUnitStatus:
type: object
description: |
空気清浄機のユニットの状態
properties:
ret:
type: string
example: OK
filter:
type: integer
example: 0
strmr_cln:
type: integer
example: 0
water_supply:
type: integer
example: 0
unit_err:
type: integer
example: 0
GetDeviceSetting:
type: object
description: |
空気清浄機のデバイス設定
properties:
ret:
type: string
example: OK
led_dsp:
description: 表示ランプの明るさ
type: integer
example: 0
d_sns:
type: integer
example: 0
c_lock:
type: integer
example: 0
streamer:
type: integer
example: 0
act_ion:
type: integer
example: 1
buzzer:
type: integer
example: 1
turbo:
type: string
example: '-'
eco_moni:
type: integer
example: 1
GetDaySnsrCount:
type: object
description: |
空気清浄機のセンサの情報
properties:
ret:
type: string
example: OK
curr_pm25:
type: string
description: |
今日の pm2.5 の反応回数が '/' 区切りで1時間単位で返ってくる
アプリ内では 2時間の合計値が表示される
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
prev_pm25:
type: string
description: |
昨日の pm2.5 の反応回数が '/' 区切りで1時間単位で返ってくる
アプリ内では 2時間の合計値が表示される
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
curr_dust:
type: string
description: |
今日の ホコリセンサ の反応回数が '/' 区切りで1時間単位で返ってくる
アプリ内では 2時間の合計値が表示される
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
prev_dust:
type: string
description: |
昨日の ホコリセンサ の反応回数が '/' 区切りで1時間単位で返ってくる
アプリ内では 2時間の合計値が表示される
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
curr_odor:
type: string
description: |
今日の においセンサ の反応回数が '/' 区切りで1時間単位で返ってくる
アプリ内では 2時間の合計値が表示される
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
prev_odor:
type: string
description: |
昨日の においセンサ の反応回数が '/' 区切りで1時間単位で返ってくる
アプリ内では 2時間の合計値が表示される
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
GetWeekSnsrCount:
type: object
description: |
空気清浄機のセンサの情報
properties:
ret:
type: string
example: OK
s_dayw:
type: integer
example: 1
week_pm25:
type: string
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0
week_dust:
type: string
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0
week_odor:
type: string
example: 0/0/0/0/0/0/0/0/0/0/0/0/0/0
Success:
type: object
description: |
更新に成功
失敗時は'ret=PARAM NG'
properties:
ret:
type: string
enum:
- OK
- PARAM NG
example: OK
example: ret=OK
tags:
- name: common
description: 機器に関する情報の取得、登録の API 群
- name: cleaner
description: 空気清浄機に関する情報の取得、登録の API 群