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

kosodate_engineer_meetup_2

Takumi KANZAKI
April 03, 2018
5.2k

 kosodate_engineer_meetup_2

Takumi KANZAKI

April 03, 2018
Tweet

Transcript

  1. ͘͘͢͢ʂࢠҭͯΤϯδχΞ
    Meetup #2
    ࢠҭͯΛ͸͡Ίͯ2.5೥ͷৼΓฦΓ
    ~ ςΫϊϩδʔͱ૑ҙ޻෉ͰՈఉͱࢠҭͯΛϋοΫ͍ͨ͠ ~
    @tknzk

    View full-size slide

  2. Me & Family
    • @tknzk (Takumi Kanzaki)
    • SmartHR ͰόοΫΤϯυΑΓͷιϑτ΢ΣΞΤϯδχΞ
    • ࠺
    • σδλϧίϯςϯπͷϓϩσϡʔαʔ / WebσΟϨΫλʔ
    • ່
    • ver 2.5.x / อҭԂ3೥໨

    View full-size slide

  3. ϒϩά
    • ՈఉΛࢧ͑Δٕज़
    • 2014 ~ 2017
    • ࢠҭͯΤϯδχΞɾΫϦΤΠλʔ
    • 2016 ~ 2017

    View full-size slide

  4. ࢠҭͯ։࢝
    2015೥ळ

    View full-size slide

  5. ࢠҭͯʹؔ͢Δ෉්ؒͷڞ௨ೝࣝ
    લఏ
    • ࢲͷ࣮Ո
    • छࢠౡ
    !
    • ࠺ͷ࣮Ո
    • ࣄۀΛӦΜͰ͓Γݱ໾όϦόϦ..!

    View full-size slide

  6. ࢠҭͯʹؔ͢Δ෉්ؒͷڞ௨ೝࣝ
    લఏ
    • ෉්Ͱ΍͍͔ͬͯ͘͠ͳ͍ʂ

    View full-size slide

  7. ࢠҭͯʹؔ͢Δ෉්ؒͷڞ௨ೝࣝ
    ํ਑
    • ͪΐͬͱͨ͠ετϨε͸ ػցͱ Ͱղܾ

    View full-size slide

  8. ࢠҭͯʹؔ͢Δ෉්ؒͷڞ௨ೝࣝ
    • ϋʔυ: ৯ચػ, ϧϯό, ચ୕ס૩ػ
    • ιϑτ: GoogleCalendar, Slack, Github
    • ৘ใΛΦʔϓϯʹ͠ඞཁͳͱ͖ʹඞཁͳ৘ใʹͦΕͧΕΞΫη
    εͰ͖ΔΑ͏͓ͯ͘͠

    View full-size slide

  9. ଞʹಋೖͨ͠΋ͷ
    • ιʔγϟϧωʔϜ
    • ່ͷຊ໊ΛSNSʹ࿐ग़ͨ͘͠ͳ͍..
    • ༑ਓͨͪ΋ؾܰʹSNSʹ౤ߘͰ͖ͯศར

    View full-size slide

  10. ՈఉͱࢠҭͯΛϋοΫ
    ίϯηϓτ
    • ϋοΫΛ໨తʹ͠ͳ͍Α͏ʹ
    • ੡඼Խ͞Εͨ΋ͷΛ૊Έ߹Θͤͯ
    • ͪΐͬͱͨ͠ετϨεΛͳ͘͢

    View full-size slide

  11. ՈఉͱࢠҭͯΛϋοΫ
    • ۩ମྫ
    • GoogleHome (w/ NatureRemo, SwitchBot)
    • ϊϯετοϓө૾ίϯςϯπମ੍

    View full-size slide

  12. GoogleHome
    • VUIศར
    • ࢠڙͷ૬खΛ͍ͯͯ྆͠ख͕࠹͕͍ͬͯΔͱ͖
    • ৸͔͚ͭ͠தͰಈ͘ͱ΍͹͍ͱ͖

    View full-size slide

  13. GoogleHome
    • ςϨϏΛ͚ͭͨΓ (w/ NatureRemo)
    • র໌Λফͨ͠Γ (w/ NatureRemo)
    • চஆΛ͚ͭͨΓ (w/ SwitchBot)
    • ͓෩࿊Λڅ౬ͨ͠Γ (w/ SwitchBot)
    • ఱؾ༧ใΛฉ͍ͨΓ
    • ϥδΦΛฉ͍ͨΓ

    View full-size slide

  14. GoogleHome
    • ࠺΋هࣄΛॻ͍ͯ·͢(Yahoo!͓ՈϚΨδϯ)
    • ࢠҭ͕ͯϥΫʹͳΔ!?Google HomeΛ࢖ͬͯΈͨ
    • https:/
    /realestate.yahoo.co.jp/magazine/fuufumanzai/
    20171108-00009795

    View full-size slide

  15. GoogleHome ͷ࿈ܞ
    • جຊతʹ IFTTT Λܦ༝
    • ෳ਺ͷॲཧΛҰ౓ʹ͍ͨ͠৔߹
    • Google Cloud Function ܦ༝ͯ͠ IFTTT Λୟ͘

    View full-size slide

  16. ࠓճͷൃදͰΤϯδχΞతͳ
    ཁૉ͚ͩ͜͜Ͱ͢

    View full-size slide

  17. GoogleHome
    ෳ਺࿈ܞͷ࢓૊Έ
    1. GoogleAssistantͷϑϨʔζͰIFTTTͷWebhookΛىಈ
    2. WebhookΛ GCF Λࢦఆ
    3. GCF ͕ IFTTT Maker Webhook Λෳ਺ୟ͘
    4. IFTTT ͕ͦΕͧΕΛॲཧ

    View full-size slide

  18. GCF
    'use strict';
    var request = require('request');
    var config = require('config');
    var iftttKey = config.IFTTT.key;
    var requestToken = config.IFTTT.request_token;
    exports.callIFTTTWebhook = (req, res) => {
    if (req.body.secret != requestToken) return;
    var triggers = req.body.triggers;
    for( var i in triggers) {
    var url = 'https://maker.ifttt.com/trigger/' + triggers[i] + '/with/key/' + iftttKey;
    var options = {
    url: url,
    method: 'POST',
    headers: {
    'Content-Type':'application/json'
    }
    };
    request(options, callback);
    }
    function callback(error, response, body) {
    if (error == true) {
    console.log(body);
    }
    }
    // send status
    res.status(200).send('ok');
    };

    View full-size slide

  19. ࣮ࡍʹՔಇ͍ͤͯ͞Δ΋ͷ
    • র໌ͷશ఺౮/ফ౮
    • Remo Ͱ؅ཧͯ͠Δී௨ͷর໌
    • Hue

    View full-size slide

  20. GoogleHome
    • ່͕ ʮ͓ʔ͚ʔ ͙Δ͙ΔʯΛ֮͑ͨʂ
    • ίϚϯυΛ࣮ߦ͢Δͷ΋ؒ΋ͳ͘..!
    • νϟϯωϧݖ૪͍͕..!

    View full-size slide

  21. GoogleHome ࠓޙ
    • GoogleHomeΛ஻Β່ͤͯͷఆظ࣮ߦΛଅ͢࢓૊ΈΛೖΕ͍ͨ
    • ࣃຏ͖ͱ͔τΠϨͱ͔
    • ேͷ਎ࢧ౓ͱ͔

    View full-size slide

  22. ө૾ίϯςϯπϊϯετοϓମ੍
    • ࣗ୐ͷࢸΔॴͰө૾ΛݟͤΒΕΔΑ͏ʹ੔උ

    View full-size slide

  23. ө૾ίϯςϯπϊϯετοϓମ੍
    • ϦϏϯά: ςϨϏ
    • ৸ࣨ: ϓϩδΣΫλ
    • ෩࿊: FireλϒϨοτ (δοϓϩοΫศརʂ)

    View full-size slide

  24. ө૾ίϯςϯπϊϯετοϓମ੍

    View full-size slide

  25. ө૾ίϯςϯπϊϯετοϓମ੍
    • ͳͥ͜͜·Ͱ͔ͭͬͨ͘?

    View full-size slide

  26. ө૾ίϯςϯπϊϯετοϓମ੍
    • ΠϠΠϠظೖ່ͬͨ
    • ͓෩࿊ɺ৸ࣨʹߦ͔ͳ͘ͳͬͯ͠·ͬͨ..
    • ່͕εΩͳಈըͰ௼ΓͭͭɺҠಈͤ͞Δ

    View full-size slide

  27. ө૾ίϯςϯπϊϯετοϓମ੍
    • ΋ͪΖΜɺө૾ίϯςϯπΛͲ͜·Ͱݟ͍͍ͤͯͷ͔೰Ή
    • ͋Δఔ౓ ਌ͷΤΰͰݟͤΔίϯςϯπ͸ߜΔ
    • δΣϯμʔతʹΈ͖͍ͯͭͷ΋͋ͬͨΓ͠·͢͠..

    View full-size slide

  28. ө૾ίϯςϯπϊϯετοϓମ੍
    • Super Simple Songs (YouTube)
    • ӳޠͷՎΛֶ͹ͤΔͱ͍͏ςΠ

    View full-size slide

  29. ө૾ίϯςϯπϊϯετοϓମ੍
    • ͙ʔͪΐ͖ͺʔͯ͌ʔ(Hulu)
    • ͏ͨͱμϯεΛֶ͹ͤΔͱ͍͏ςΠ

    View full-size slide

  30. ୈೋࢠ
    • 4݄຤σϓϩΠ༧ఆ
    • ૣੜ·ΕΛ໔Εͨʂ
    • ͳΜͳΒ΋͏ੜ·Εͦ͏..!

    View full-size slide

  31. ୈೋࢠ
    • 2ਓͷҭࣇ͸ผ࣍ݩͷ͖͕ͭ͋͞Γͦ͏
    • ະ஌ͷྖҬ

    View full-size slide

  32. σʔλ؅ཧ
    • ͓Ήͭ/ϛϧΫ ͷه࿥
    • લճେձ(່ͷͱ͖) ͸खॻ͖ͰϩάΛͱ͍ͬͯͨ
    • ϛϧΫͷ࣌ؒΛݻఆͨ͠Γ
    • ӡ༻্ͷ޻෉

    View full-size slide

  33. σʔλ؅ཧ
    • ΋ͬͱखܰʹσʔλΛͱΔ޻෉Λ͍ͨ͠
    • GoogleHome ͰԻ੠ input
    • ͏Μ͜Ϙλϯ
    !

    View full-size slide

  34. ͓ΘΓ
    • ςΫϊϩδʔͱ૑ҙ޻෉ͰՈఉͱࢠҭͯΛϋοΫ͍͖ͯͨ͠
    ͍ʂ
    • ෳ਺ͷࢠڙΛҭࣇ͍ͯ͠Δํͷ஌ݟ͕ཉ͍͠Ͱ͢ʂ

    View full-size slide

  35. ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ

    View full-size slide