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

IoTLTの管理をIoT化っぽくしている話 #iotlt

n0bisuke
October 19, 2017

IoTLTの管理をIoT化っぽくしている話 #iotlt

IoTLT vol32 の発表です。 connpassの更新をHeadless Chrome制御のpuppeteerを使ってやってます。

https://iotlt.connpass.com/event/66838/

n0bisuke

October 19, 2017
Tweet

More Decks by n0bisuke

Other Decks in Technology

Transcript

  1. IoTLTͷ؅ཧΛIoTԽͬΆ͍ͯ͘͠Δ࿩
    #iotlt vol32 2017/10/19
    @n0bisuke

    View full-size slide

  2. ੁݪͷͼ͚͢
    !OCJTVLF
    EPUTUVEJPגࣜձࣾ୅දऔక໾
    ɾ8FCΤϯδχΞ
    ɾ*P5%FW3FMͷίϯαϧͳͲ
    ɾ*P5-5/PEF#PUTͷओ࠵
    ɾ.JDSPTPGU.71 /PEFKT
    ʹͳͬͨʂ
    ࣗ ݾ ঺ հ
    ॻ੶
    ɾݱ৔ͷϓϩ͕ڭ͑Δ8FCσβΠϯ
    ɾ+BWB4DSJQUͰΠϯλϥΫςΟϒ%ίϯςϯπΛ࡞Ζ͏
    ɾϑϩϯτΤϯυΤϯδχΞͷͨΊͷݱࡏͱ͜Ε͔Βͷඞਢ஌ࣝ

    View full-size slide

  3. ʮϞϊ࡞ΓͰ͖ΔਓΛ૿΍͍ͨ͠ʯ
    dotstudio
    ձ ࣾ ঺ հ

    View full-size slide

  4. ͜ Μ ͳ ͜ ͱ ΍ ͬ ͯ · ͢

    View full-size slide

  5. ࠓճ͸IoTLTཪ࿩

    View full-size slide

  6. LTܥΠϕϯτͷਏ͞(௨ৗ)

    View full-size slide

  7. ൃදऀूΊ
    LTܥΠϕϯτͷਏ͞(௨ৗ)

    View full-size slide

  8. IoTLTͷొஃऀ͸ׂͱຒ·Δ

    View full-size slide

  9. IoTLTͷΠϕϯτ؅ཧͷਏ͞

    View full-size slide

  10. IoTLTͷΠϕϯτ؅ཧͷਏ͞
    ొஃऀ͔Βͷൃද৘ใͷߋ৽࡞ۀ

    View full-size slide

  11. IoTLTͷొஃऀืूϑϩʔ
    FBάϧʔϓͰืू
    ίϝϯτΛืΔ

    View full-size slide

  12. IoTLTͷొஃऀืूϑϩʔ(ੲ)
    ίϝϯτΛݩʹ connpassΛखಈ
    Ξοϓσʔτ

    View full-size slide

  13. ͜Ε͕͚ͬ͜͏໘౗
    ʮ΍ͬͺΓ͜ͷλΠτϧͰʂʯʮൃදॱ൪͸…?ʯ
    ʮॴଐม͑ͯཉ͍͠ʯͳͲͳͲ / ߋ৽λΠϛϯά͕Ήͣ

    View full-size slide

  14. ࠷ۙ͸
    ίϝϯτ΋ΒͬͨਓΛϝοηϯδϟʔάϧʔϓʹট଴

    View full-size slide

  15. ࠷ۙ͸
    εϓϨοτγʔτΛ༻ҙͯ͠ॻ͍ͯ΋Βͬͯ·͢
    ॱ൪͸ۭؾಡΜͰɺλΠτϧ΋ॴଐ΋͜͜ʹ͋Δ
    ΍ͭΛͦͷ··ࡌͤ·͢ɻ

    View full-size slide

  16. ͍ͩͿָʹͳ͖ͬͯͨ

    View full-size slide

  17. ͚Ͳ·ͩ·ͩ໘౗
    εϓϨοτγʔτ -> connpass(MD)ม׵
    ݁ہͲ͔͜ͷλΠϛϯάͰ࠶౓ߋ৽͕ඞཁ

    View full-size slide

  18. ݁ՌԿ͕ى͜Δ͔

    View full-size slide

  19. ։࠵1िؒલ͘Β͍

    View full-size slide

  20. ։࠵1िؒલ͘Β͍
    ֎͔ΒݟΔͱ
    ͍ͭʹͳͬͯ΋
    ొஃऀ͕͍ͳ͍
    ҋͷLTձ

    View full-size slide

  21. ͱ͍͏͜ͱͰࣗಈԽνϟϨϯδ

    View full-size slide

  22. ΍Γ͍ͨ͜ͱΠϝʔδ
    ࣗಈߋ৽

    View full-size slide

  23. ·ͣconnpassͷ࢓༷
    ɾGETͷAPI͸͋Δ
    ɾPOSTͷAPI͕ແ͍
    ɾϩάΠϯܥͷAPI΋ແ͍

    View full-size slide

  24. ·ͣconnpassͷ࢓༷
    ɾGETͷAPI͸͋Δ
    ɾPOSTͷAPI͕ແ͍
    ɾϩάΠϯܥͷAPI΋ແ͍
    APIܦ༝ͰͷࣗಈԽ͸ݫ͍͠

    View full-size slide

  25. Google Chrome͕ver59͔ΒϔουϨεϞʔυରԠ

    View full-size slide

  26. ϔουϨεϞʔυରԠͰԿ͕Ͱ͖Δ͔
    ɾίϚϯυϥΠϯ͔Β࣮ߦͰ͖Δ
    ɾϓϩάϥϜ͔ΒChromeΛݺͼग़ͤΔ
    - εΫϨΠϐϯά
    - ϑΥʔϜ΁ͷೖྗΛΤϛϡϨʔτ
    - DOMཁૉ΁ͷΞΫηε

    View full-size slide

  27. ϥΠϒϥϦݕ౼
    ɾOnetapInc/chromy
    ɾLucianoGanga/simple-headless-chrome
    ɾGoogleChrome/puppeteer

    View full-size slide

  28. QVQQFUFFS
    طଘ৘ใऔಘ
    44ΞΫηε ॻ͖ࠐΈ
    444%,
    ߏ੒

    View full-size slide

  29. QVQQFUFFS
    طଘ৘ใऔಘ
    44ΞΫηε ॻ͖ࠐΈ
    444%,
    ߏ੒
    τϦΨʔม͑Ε͹ͳΜͰ΋0,

    View full-size slide

  30. ΞϛʔϘ(NFC)
    LINE

    View full-size slide

  31. ɾSSΞΫηε
    ɾpuppeteer
    ɾRaspi NFC
    ɾLINE BOT
    Node.js޿ൣғΧόʔޮ཰తͰΠΠϤ
    ͪͳΈʹɺશ෦Node.jsͰ΍Ε·͢

    View full-size slide

  32. ͜ΕͰະఆΛ
    ๷͛Δ…!

    View full-size slide

  33. ͜ΕͰະఆΛ
    ๷͛Δ…ϋζʂ

    View full-size slide

  34. DEMO
    ౔԰͞Μͷ௚લεϥΠυ

    View full-size slide

  35. DEMO
    ౔԰͞Μͷ௚લεϥΠυ
    ࣗ෼ͷλΠτϧ͍Ε·͠ΐ͏

    View full-size slide

  36. · ͱ Ί
    ɾIoTLTͷΠϕϯτϖʔδߋ৽ࣗಈԽ
    ɾNode.js / Headless Chrome / puppeteer / Azure
    ɾAPI͕ແ͍αʔϏε΋͜ΕͰແཧ΍Γܨ͛ΒΕΔ
    ɾࣗಈԽͷ࢓૊Έ࡞ͬͯ΋LTλΠτϧ௚લ·Ͱܾ·
    Βͳ͍ਓʢಛʹͷͼ͚͢ͳͲʣʹ͸ແཧͦ͏ۤস
    ɾ͜ΕͰӡӦͷखؒ͸গͳ͘ͳͬͨͷͰ
    ΈΜͳ৺ஔ͖ͳ͘ొஃر๬ग़͍ͯͩ͘͠͞ʂ

    View full-size slide