Upgrade to Pro — share decks privately, control downloads, hide ads and more …

育児休業のご報告と、育児グッズとしてのスマートスピーカー / Parental Leave a...

育児休業のご報告と、育児グッズとしてのスマートスピーカー / Parental Leave and SmartSpeaker

レトリバセミナー 2018/05/16
Movie: https://www.youtube.com/watch?v=sC9Svn8Yc7c

Kei Shiratsuchi

May 16, 2018
Tweet

More Decks by Kei Shiratsuchi

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • ന౔ɹܛʢγϥπνɹέΠʣ • גࣜձࣾϨτϦό • 2016೥4݄ೖࣾ • Ruby on

    Rails / JavaScript / Python / Elixir (new!) • ϑϩϯτΤϯυଆͷ։ൃ • େֶ࣌୅͸ෳࡶωοτϫʔΫՊֶͷݚڀ
  2. ࢠͷ஀ੜ • 2018/01/25 • ୈҰࢠ(່)͕஀ੜ • 2018/03/05 • ҭࣇٳۀऔಘ •

    2018/05/07 • ҭࣇٳۀ͔Β෮ؼ • ·Δ·Δ2ϲ݄ͷҭࣇٳۀΛऔಘ
  3. εϚʔτεϐʔΧʔΛͲ͏࢖͏ʁ • ʮԻ੠ʯ͸ͱͯ΋༗༻ • Ի੠Ͱૢ࡞͢Δ • ՈిΛίϯτϩʔϧ͢Δ • Ի੠Ͱه࿥͢Δ •

    ͓Ήͭସ͑Λه࿥͢Δ • Ի੠Ͱ௨஌͢Δ • σδΧϝͷࣗಈΞοϓϩʔυΛ஌ΒͤΔ
  4. ͓Ήͭସ͑Λه࿥͢Δ • PC Ͱ Burp Suite ىಈɺϓϩΩγϙʔτ൪߸ઃఆ • iPhone Ͱ

    PC ͷ IP, Port ʹϒϥ΢βΞΫηεɺূ໌ॻΠϯε τʔϧ • iPhone ͷ Wi-fi ઃఆͰɺ PC ͷ IP, Port ΛϓϩΩγઃఆ • ʮઃఆ>Ұൠ>৘ใ>ূ໌ॻ৴པઃఆʯͰɺΠϯετʔϧ ͨ͠ূ໌ॻΛʮશ໘తʹ৴པ͢ΔʯʹνΣοΫ
  5. ͓Ήͭସ͑Λه࿥͢Δ • ৭ʑࢼͯ͠ڍಈΛ֬ೝ • PC ͔Β JSON ϦΫΤετΛ͍ͬͯ͡ૹ৴ɺਖ਼ৗʹडཧ͞ ΕΔ·Ͱࢼߦࡨޡ •

    (ར༻ن໿ΛಡΜͰࣗ෼ͷσʔλͳΒ໰୊ͳ͠ͱ֬ೝ) • Node.js ͰεΫϦϓτ࡞੒
  6. ͓Ήͭସ͑Λه࿥͢Δ • IFTTT ͱ Google Home Λ࿈ܞ • ಛఆͷϑϨʔζΛ࿩ͨ࣌͠ʹΞΫγϣϯ͢Δ •

    ऴྃ࣌ʹൃ࿩͢ΔϝοηʔδΛొ࿥͢Δ • Google Cloud Functions ͰɺεΫϦϓτ࣮ߦͰ͖ΔΑ͏ʹ͢Δ • Node.js ͷεΫϦϓτΛ࣮ߦͰ͖Δ • IFTTT ͷ Webhook ΞΫγϣϯͰɺCloud Functions ͷΤϯυϙΠϯτΛ ୟ͘Α͏ʹ͢Δ
  7. σδΧϝͷࣗಈΞοϓϩʔυ • औΓࠐΈΛۃྗϥΫʹ͍ͨ͠ • ͦͷੲ Eye-fi ͱ͍͏੡඼͕͕͋ͬͨɺEOL… • FlashAir -

    ແઢLANػೳ͖ͭSDΧʔυ • ىಈ or ϑΝΠϧॻ͖ࠐΈͨ͠ࡍʹɺઃఆͨ͠ Wi-fi ʹ઀ ଓͯ͠ HTTP ϦΫΤετΛ౤͛Δ͜ͱ͕Ͱ͖Δ • Lua εΫϦϓτΛอଘͯ͠ɺ࣮ߦͰ͖Δ
  8. σδΧϝͷࣗಈΞοϓϩʔυ • FlashAir ͷઃఆ֓ཁ • ӈͷΑ͏ͳϑΝΠϧΛ
 /SD_WLAN/CONFIG ʹஔ͘ • ىಈ࣌ʹ

    /bootstrap.lua ͕
 ࣮ߦ͞ΕΔ [Vendor] CIPATH=/DCIM/100__TSB/FA000001.JPG APPMODE=5 APPNAME=myflashair APPSSID=FOOSSID APPNETWORKKEY=password0123 VERSION=FA9CAW3AW3.00.00 CID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PRODUCT=FlashAir VENDOR=TOSHIBA LUA_RUN_SCRIPT=/bootstrap.lua
  9. σδΧϝͷࣗಈΞοϓϩʔυ • FlashAir Λ࢖ͬͯɺσδΧϝ͔Β Google Photos ΁ࣗಈͰΞο ϓϩʔυ͢Δ • Lua

    εΫϦϓτͰඞཁͳࣸਅϑΝΠϧΛ૸ࠪɺ
 ͦΕͧΕҰ౓αʔόʹΞοϓϩʔυɺ
 αʔό͔Β Google Photos ͷ API ͰࣸਅΛ௥Ճ͢Δ • αʔό͸ Sinatra Ͱॻ͍ͨ
  10. σδΧϝͷࣗಈΞοϓϩʔυ • FlashAir ͷ᠘ • Lua εΫϦϓτͰϑΝΠϧΛॻ͖ࠐΈ͢ΔͱɺϗετଆʢσδΧϝʣ͔Β ͷॻ͖ࠐΈͱিಥͯ͠ FAT ෆ੔߹ͰϘϦϡʔϜ͕յΕΔ

    • Ξοϓϩʔυཤྺ͸αʔόαΠυͰ࣋ͭ • ىಈ͙࣌͢ʹ͸ Wi-fi ઀ଓཱ͕֬͞Ε͍ͯͳ͍ • Lua εΫϦϓτͰɺWi-fi ઀ଓཱ͕֬͢Δ·Ͱ sleep ͢Δ • Google Photos ͷ᠘ • Google Photo API ͸ଘࡏͤͣɺʢջ͔͠ͷʣPicasa API ͕·ͩಈ͍͍ͯΔ
  11. Ի੠Ͱ௨஌ • Google Home ʹ஻ΒͤΔ • https://github.com/noelportugal/google-home-notifier • Node.js ͷϓϩάϥϜ

    • LAN ಺ͷ Google Home Λࢦఆͯ͠ɺ೚ҙͷจࣈྻΛ஻ΒͤΔ • Google Text-to-speech API Λ࢖ͬͯԻ੠ͷ URL ΛऔಘɺChrome Cast ϓϩτίϧͰσόΠεʹ URL Λ࠶ੜ͍ͤͯ͞Δ
  12. Ի੠Ͱ௨஌ • google-home-notifier Λ࢖ͬͨ௨஌αʔόΛ४උ • FlashAir ͷ Lua εΫϦϓτͰɺΞοϓϩʔυ։࢝࣌ɺऴྃ ࣌ʹ௨஌αʔόʹϦΫΤετΛ౤͛Δ

    • ։࢝࣌ʹʮΧϝϥ͔ΒͷΞοϓϩʔυΛ։࢝͠·͢ʯ • ऴྃ࣌ʹʮΧϝϥ͔ΒͷΞοϓϩʔυ͕ऴྃ͠·͠ ͨʯ
  13. Ի੠Ͱ௨஌ • ΊͬͪΌศར • σδΧϝͰࣸਅΛࡱΔͷ͕ۤ͡Όͳ͘ͳͬͨ • Google Photo ͱΧϝϥΛݟൺ΂ͯɺશ্͕͔ͯͬͨ֬ೝ͠ͳ͘ ͍͍ͯ

    • FlashAir ͱࣗ୐ϧʔλͷ૬ੑ͕ѱ͍ͬΆͯ࣌͘ʑಈ࡞͠ͳ͍… • σόοά࣌ؒऔΕͯͳ͍…