Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
エアコンの操作についての話
Search
Yukimitsu Izawa
August 21, 2021
How-to & DIY
0
660
エアコンの操作についての話
ダイキンエアコンのリモート操作Appの仕様が2021年6月28日に変更になったのを受けて、自分で直接エアコン操作ができるようにした話
Yukimitsu Izawa
August 21, 2021
Tweet
Share
More Decks by Yukimitsu Izawa
See All by Yukimitsu Izawa
RubyでXDPプログラミング
izawa
0
3
軽くて強い素材を求めて(DCFのススメ)
izawa
1
90
指紋認証でsshログイン
izawa
0
290
展示会に出展してみた
izawa
0
160
SlackにZoomの使用状況を表示したい
izawa
0
190
Kindleページめくり君 Ver.2
izawa
0
210
災害グッズとして見たときのキャンプ用品
izawa
0
280
アレクサがカメラ女子になった日
izawa
0
290
2019年上半期のキャンプお買い物ベスト8
izawa
0
310
Other Decks in How-to & DIY
See All in How-to & DIY
GPT-4oに遅刻理由を考えてもらうボタン #gpt_4o #iotlt #chatgpt
n0bisuke2
0
280
新婚19年目から学ぶ夫婦円満の正しい歩き方 / Life is beautiful
soudai
11
4.2k
[너구리랑! 회고 밋업 2023] GTD & PARA -머릿속이 복잡하던 일상에 적용한 정리법 // 토르 님
develop_neoguri
1
420
AWS Community Day 2024: Using AWS to build a launchable knowledge rocket 👉 Organize knowledge, accelerate learning and understand AI in the process
dwchiang
0
160
生成AIとミニ四駆で学ぶ! MATLAB/Simulink
covao
1
190
우분투한국커뮤니티를 세무서에 단체 등록한 이유 (2023. 12. 10.)
sukso96100
0
140
JAWS-UGから学んだコミュニティの成功要因 (Success Factors)
awsjcpm
4
370
コロナ後の世界メイカーフェア事情 高須正和@Nico-Tech Shenzhen #KMMF2024 #KariyaMMF2024
takasumasakazu
0
280
ITエンジニアにおすすめのゲームFactorio御紹介
zembutsu
PRO
1
1.3k
音に負けない!子どもが騒いでいる脇でも快適オンラインMTGの秘伝
kaitou
0
330
How to Hire a Driver for Long Distance Travel?
greaterservice
0
140
グローバルAWSユーザー コミュニティとJAWS-UG - JAWS FESTA 2024 in Hiroshima
awsjcpm
0
4.4k
Featured
See All Featured
Scaling GitHub
holman
459
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Invisible Side of Design
smashingmag
299
50k
Adopting Sorbet at Scale
ufuk
74
9.2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
A designer walks into a library…
pauljervisheath
205
24k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
How GitHub (no longer) Works
holman
312
140k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Transcript
ΤΞίϯͷ ૢ࡞ʹ͍ͭͯͷ ҪᖒΏ͖Έͭ 20218݄21 Kanazawa.rb meetup #108
ࣗݾհ ➤ YouTuber ➤ My Outdoor Life (https://kanazawa.camp/) ➤ ത࢜(ใՊֶ)
➤ ΠϯλʔωοτΛͬͨૄ݁߹ࢄγεςϜͷݚڀΛ͍ͯ͠·͢ ➤ גࣜձࣾΫϧΟοτ औకCOO ݉ ࢧࣾ ➤ Code for Kanazawa ཧࣄ ➤ ిࢠ࡞ͱφΠϑΛࣗ࡞͢Δͷ͕झຯͰ͢
৸ࣨͷΤΞίϯ ग़య: https://www.daikinaircon.com/roomaircon/products/r_series/index.html#spec?tab=18 ΑΓ
εϚϗ͔Βૢ࡞Ͱ͖Δศརػೳ͖ ग़య: https://www.daikinaircon.com/roomaircon/products/r_series/index.html#spec?tab=18 ΑΓ
൵ܶಥવʹ
ηΩϡϦςΟରԠ……ʁ
ωοτͰ൵໐͕͕͋Δ
զ͕ՈͷηΩϡϦςΟϙϦγతʹΞτ ➤ ͷIoTػثΠϯλʔωοτଆ͔ΒϦʔνϟϒϧʹ͠ͳ͍ ➤ DAIKINΫϥυ͕ؕམͨ͠Βզ͕ՈͷΤΞίϯͷૢ࡞ݖ͕ୣऔ͞ΕΔϦεΫ ➤ ΤΞίϯͷૢ࡞ਓʹةΛՃ͑ΔखஈͱͳΓ͑Δ(தͳͲɺಛʹਓ) ίϯτϩʔϥʔ͙Β͍؆୯ʹ࡞ΕΔͬ͠ΐ
άάΔͱ͍Ζ͍Ζͱใ͕ग़ͯ͘Δ ➤ port 80 Ͱ Web API͕ޱΛ։͚͍ͯΔ ➤ GET ϝιουͰશ෦݁Ͱ͖ͦ͏
➤ ΤϯυϙΠϯτͷURLάάΔͱग़͖ͯͨ ➤ ͭ·ΓcurlఔͰ݁ͦ͠͏͡ΌͶʁ
API END POINT ➤ /common/basic_info جຊతͳใ ➤ /aircon/get_sensor_info ηϯαใ ➤
/aircon/get_control_info ઃఆऔಘ ➤ /aircon/set_control_info ઃఆมߋ
/COMMON/BASIC_INFO % curl http://192.168.100.9/common/basic_info ret=OK,type=aircon,reg=jp,dst=1,ver=3_5_3,pow=0,err=0,location=0, name=%e5%af%9d%e5%ae%a4,icon=0,method=home only,port=30050,id=,pw=, lpw_flag=0,adp_kind=2,pv=3.01,cpv=3,cpv_minor=01,led=1,en_setzone=0, mac=60F189B45044,adp_mode=run,en_hol=0,enlver=1.00,grp_name=,en_grp=0
/AIRCON/GET_SENSOR_INFO % curl http://192.168.100.9/aircon/get_sensor_info ret=OK,htemp=26.0,hhum=85,otemp=28.0,err=0,cmpfreq=0,mompow=1
/AIRCON/GET_CONTROL_INFO % curl http://192.168.100.9/aircon/get_control_info ret=OK,pow=0,mode=0,adv=,stemp=M,shum=AUTO_L,dt1=M,dt2=M,dt3=25.0,dt4=25. 0,dt5=25.0,dt7=M,dh1=AUTO_L,dh2=55,dh3=0,dh4=0,dh5=0,dh7=AUTO_L,dhh=50,b_ mode=0,b_stemp=M,b_shum=AUTO_L,alert=16,stemp_a=0,dt1_a=0,dt7_a=0,b_stemp _a=0 pow: ిݯঢ়ଶ:
(0→ఀࢭ, 1→Քಇத) mode: ӡసϞʔυ: (0,1,7→ࣗಈ, 2→আ࣪, 3→ྫྷ, 4→ஆ, 6→ૹ෩) stemp: target ͱ͢ΔԹ shum: targetͱ͢Δ࣪
/AIRCON/SET_CONTROL_INFO % curl http://192.168.100.9/aircon/set_control_info pow=1,mode=0,adv=,stemp=M,shum=AUTO_L,dt1=M,dt2=M,dt3=25.0,dt4=25.0,dt5=2 5.0,dt7=M,dh1=AUTO_L,dh2=55,dh3=0,dh4=0,dh5=0,dh7=AUTO_L,dhh=50,b_mode=0, b_stemp=M,b_shum=AUTO_L,alert=16,stemp_a=0,dt1_a=0,dt7_a=0,b_stemp_a=0 % curl http://192.168.100.9/aircon/set_control_info?
pow=1&mode=0&adv=&stemp=M&shum=AUTO_L&dt1=M&dt2=M&dt3=25.0&dt4=25.0&dt5=2 5.0&dt7=M&dh1=AUTO_L&dh2=55&dh3=0&dh4=0&dh5=0&dh7=AUTO_L&dhh=50&b_mode=0& b_stemp=M&b_shum=AUTO_L&alert=16&stemp_a=0&dt1_a=0&dt7_a=0&b_stemp_a=0 , を & に変換してURLパラメータ化 get_control_infoͰऔಘͨ͠ύϥϝʔλΛݩʹͯ͠Ұ෦Λॻ͖͑Δ
ղܾʂ ➤ GETϝιουͰୟ͚ΔͷͰɺͦΕͧΕͷURLΛεϚϗͷϒϥβʹbookmarkͯ͠ ྃʂ
݁ ➤ ΤΞίϯʹແઢLANΞμϓλΛ͚͓͚ͭͯ ➤ ͍͖ͳΓվѱ͞Εͯٽ͔ͣʹؤுΕͳΜͱͳ͔ͳΔ ➤ μΠΩϯɺ͓લ΄Μͱڐ͞Μ͔Βͳʂ