Save 37% off PRO during our Black Friday Sale! »

Node.jsで Pokemon Go おふぃすハック #iotlt

Dae1d4cc4599a65a5da6e1a1f9d96f05?s=47 n0bisuke
August 12, 2016

Node.jsで Pokemon Go おふぃすハック #iotlt

#iotlt vol18の発表です。 ( http://iotlt.connpass.com/event/35436/ )
PokemonGoで近くにポケモンがでたらでPepperが教えてくれるやつを作りました。

デモ動画はこちら https://goo.gl/photos/UQUGD71dmx8ohTH5A

イベント中に宣伝したPepperとBEAMSのハッカソンはこちら http://www.beams.co.jp/special/pepperatbj_hack/

Dae1d4cc4599a65a5da6e1a1f9d96f05?s=128

n0bisuke

August 12, 2016
Tweet

Transcript

  1. /PEFKTͰ 1PLFNPO(P͓;͌͢ϋοΫ @n0bisuke #iotlt vol18

  2. About Me • @n0bisuke • dotstudioגࣜձࣾ ୅දऔక໾ • ࠷ۙͷڵຯ: IoT

    / JavaScript Robotics • 89ੈ୅ (ฏ੒ݩ೥) • MilkcocoaΤόϯδΣϦετ • #IoTLT #NodeBots • ޷͖ͳAWS͸Route53 (ٸᬎ)
  3. IUUQTEPUTUVEJPCMPHXFTUBSUFEEPUTUVEJPJOD dotstudioגࣜձࣾ IoTͷηϨΫτγϣοϓ(EC)ɺϓϩμΫτͷ։ൃɺϓϩϞʔγϣϯͳͲ

  4. Έͳ͞Μ΍ͬͯ·͔͢ʔʁ

  5. !OCJTVLFͱ1PLFNPO(P (2016೥8݄ݱࡏ) ɾνʔϜϛεςΟοΫ ɾଟ෼೔ຊ্཮ॳ೔͔Β։࢝ ɾඇ՝ۚ੎ ɾIngress͸ͦ͜·ͰϋϚΒͳ ͔ͬͨ ɾIDʹn0bisuke͕࢖͑ͳͯ͘ ൃڰ ɾઌ೔ɺ໐ࢠԹઘ(ٶ৓ͷࢁԞ)

    ͰδϜϦʔμʔʹ
  6. ೥݄ݱࡏͷϨϕϧͱੑ֨ߟ࡯ 2016/7/22ࠒ͔ΒϓϨΠ։͍࢝ͯ͠Δਓ͸… ɾLv ~4: ͙͢๞͖ͨ ɾLv 5~9: δϜઓͰ࠳ંͯ͠๞͖ͨ ɾLv 10~19:

    ՝ۚ͸ઈରʹ͠ͳ͍த్൒୺੎ྗ ɾLv 20~25 : Ψνؾຯ͚ͩͲ՝ۚ͸ͯ͠ͳ͍ਓ ͕ଟ͍ ɾLv 26~: ΄΅՝ۚͯ͠ΔΨν੎ྗ
  7. ೥݄ݱࡏͷϨϕϧͱੑ֨ߟ࡯ 2016/7/22ࠒ͔ΒϓϨΠ։͍࢝ͯ͠Δਓ͸… ɾLv ~4: ͙͢๞͖ͨ ɾLv 5~9: δϜઓͰ࠳ંͯ͠๞͖ͨ ɾLv 10~19:

    ՝ۚ͸ઈରʹ͠ͳ͍த్൒୺੎ྗ ɾLv 20~25 : Ψνؾຯ͚ͩͲ՝ۚ͸ͯ͠ͳ͍ਓ ͕ଟ͍ ɾLv 26~: ΄΅՝ۚͯ͠ΔΨν੎ྗ ग़ۈ͔ͯ͠ΒΞϓϦΛىಈ͠ͳ͍·· ී௨ʹ਺࣌ؒܦͬͯΔ
  8. ग़ۈ͔ͯ͠ΒΞϓϦΛىಈ͠ͳ͍·· ී௨ʹ਺࣌ؒܦͬͯΔ ۙ͘ʹϙέϞϯ͕͍ͨΒ ஌Βͤͯ͘ΕΔιϦϡʔγϣϯΛʂ ΦϑΟε μʔςΟʔ ϋοΫ

  9. OQNʹQPLFNPOHP͕݁ߏ͋Δ IUUQTXXXOQNKTDPNCSPXTFLFZXPSEQPLFNPOHP

  10. OPEFW W OQNJOTUBMMQPLFNPOHPOPEFBQJ QPLFNPOHPOPEFBQJ͕ྑͦ͞͏ͩͬͨ AAABQQKT 'use strict'; const PokemonGO =

    require('./node_modules/pokemon-go-node-api/poke.io.js'); let a = new PokemonGO.Pokeio(); let location = { type: 'name', name: process.env.PGO_LOCATION || 'Taito,Tokyo/Taito-ku' //୆౦۠୆౦ }; var username = process.env.PGO_USERNAME || 'xxxxxxxxxx@gmail.com'; var password = process.env.PGO_PASSWORD || 'gmailͷύεϫʔυ'; var provider = process.env.PGO_PROVIDER || ‘google'; ɾ ɾ (লུ)
  11. ࣮ߦ͢Δͱɺۙ͘ͷϙέϞϯ͕ʂ ͔ΜͨΜʂ

  12. ʜ͜ΕΛͲ͏௨஌͢Δ͔

  13. ͨ·ͨ·͍ͨ൴ʹ͓ئ͍͠·͢ɻ

  14. ௨ৗɺ൴͸$IPSFHSBQIF 1ZIUPO ։ൃ

  15. ࠓճ͸ζϧͯ͠ϒϥ΢β͔Β IUUQLVFUTVIBSBHJUIVCJPQFQQFS$POOFDUIUNM -"/಺ͷ1FQQFSΛ੍ޚͰ͖Δ8FCΞϓϦ 1FQQFS$POSUPMMFS ޡࣈͬΆ͍ʜ

  16. /JHIUNBSFKTͰࣗಈԽ 1IBOUPN+4ͷϥούʔIUUQXXXOJHIUNBSFKTPSH

  17. ۙ͘ͷϙέϞϯΛൃݟϒϥ΢βͷࣗಈ੍ޚ Pinsir͕͍ΔΒ͍͠ͱPepper͕఻͑ͯ͘ΕΔ

  18. %&.0 IUUQTHPPHMQIPUPT626(%ENYPI5)"

  19. 1JOTJSͬͯͳΜͩ

  20. 1JOTJSΧΠϩεΒ͍͠

  21. ؾ࣋ͪѱ͍͔Β೔ຊޠԽ ௐ΂ΔͱҊͷఆ೔ຊޠԽKTPOΛެ։ͯ͠Δਓ͕

  22. ͜ΕͰ೔ຊޠͰϙέϞϯΛڭ͑ͯ͘ΕΔΑ͏ʹͳΓ·ͨ͠ʂ

  23. ແࣄʹ௨஌͕ʂ 1JOTJSΛۙ͘ʹൃݟ ΧΠϩε͕Ͱͨͧʂ ͋ʂ΍͍ͤͷΧΠϩε͕ ͱͼ͖ͩͯͨ͠ʂ ʂʂ ΦϑΟεͷதͰϦΞϧʹڭ͑ͯ͘ΕΔ

  24. ͱ͍͏͜ͱͰ Ṗ ɺࠂ஌ʂ ʹ1FQQFSͱ#&".4ͷϋοΧιϯʂ IUUQXXXCFBNTDPKQTQFDJBMQFQQFSBUCK@IBDL

  25. ·ͱΊ ɾPepper͕ۙ͘ͷϙέϞϯΛϦΞϧʹ௨஌ͯ͘͠ΕΔ ࢓૊ΈΛ࡞Γ·ͨ͠ ɾΨν੎͡Όͳ͍ͱΞϓϦىಈΛ๨Ε͕ͪͳ՝୊Λղ ܾ ɾNode.jsͰpokemon-go-node-apiύοέʔδΛ࢖͏ ͱׂͱ؆୯ʹۙ͘ͷϙέϞϯ৘ใΛऔΕ·͢ ɾPepper΋ϒϥ΢βͱJSͰ஻ΒͤͨΓ͸Ͱ͖·͢ ɾΨν੎ʹ৯Β͍͖͍ͭͨ ɾϋοΧιϯ͜ΕΔਓ͖ͯͶʂ