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

2023/07/13 NOT A HOTEL Talk #08 Smarthome

2023/07/13 NOT A HOTEL Talk #08 Smarthome

《エンジニア向け》新時代のホテル運営システム(PMS)・スマートホームのゼロイチ開発舞台裏|NOT A HOTEL TALK#08
Event URL: https://notahoteltalk8.peatix.com/

▽NOT A HOTEL のスマートホームをつくってみた話
https://note.com/wakinchan/n/n3af6dc2088f2

新時代のホーム体験:スマートホーム、PMS、メインアプリの協働:黒岩 裕輔(Software Engineer)

Yusuke Kuroiwa

July 13, 2023
Tweet

More Decks by Yusuke Kuroiwa

Other Decks in Technology

Transcript

  1. ৽࣌୅ͷϗʔϜମݧ
    εϚʔτϗʔϜɺPMSɺϝΠϯΞϓϦͷڠಇ

    View Slide

  2. - @wa_kinchan
    - 2020/12 ೖࣾ
    - ࠷ۙ͸ओʹ SmartHome
    - Backend, Infra, Network, iOS
    - KNX Partner
    2
    Yusuke KUROIWA
    ME

    View Slide

  3. εϚʔτϗʔϜͷ։ൃͷཪ࿩΍Πϯϑϥʹͭ
    ͍ͯॻ͍͍ͯ·͢ɻͥͻಡΜͰ͍ͩ͘͞ʂ
    ͖ΐ͏࿩͖͠Εͳ͍ɺ΄͔ͷ΋ιϑτ΢ΣΞ
    ؔ࿈ͷهࣄΛॻ͍͍ͯ·͢ʂ
    org https://note.com/notahotel_inc
    me https://note.com/wakinchan
    3
    ࠷ۙ note ॻ͖·ͨ͠ʂ
    ࿩͖͠Εͳ͍શ༰͸ͪ͜Β

    View Slide

  4. ओͳαʔϏεҰཡ
    4
    Main App Operation Tool Smarthome WEB3

    View Slide

  5. ओͳαʔϏεҰཡ
    5
    Main App Operation Tool Smarthome WEB3

    View Slide

  6. ओͳαʔϏεҰཡ
    6
    Main App Operation Tool Smarthome WEB3

    View Slide

  7. ฻Β͠Λͭ͘Δ

    ҆৺ɾ҆શΛͭ͘Δ
    7
    εϚʔτϗʔϜνʔϜͷ໾ׂ

    View Slide

  8. 8
    ࣨ಺ʹεΠον΍ϦϞίϯ͸ͳ͘ɺ͢΂ͯ͸
    Home Controller͔Βૢ࡞ɻ

    ੈքதɺͲ͜ͷNOT A HOTELʹߦͬͯ΋ɺ
    ·ΔͰࣗ୐ͷΑ͏ʹ໎͏͜ͱͳ͘͢΂ͯͷػ
    ثͷૢ࡞͕Ͱ͖·͢ɻ
    ϊʔεΠον

    View Slide

  9. 9
    - ͢΂ͯΛΦϯϥΠϯ੍ޚ͢Δ͜ͱͰɺܧଓ
    తͳΞοϓσʔτ͕ՄೳʹͳΔ͚ͩͰ͸ͳ
    ͘ɺՈ͕ιϑτ΢ΣΞͷΑ͏ʹਐԽ͠ଓ͚
    ·͢ɻ
    - ྫ͑͹ɺ෦԰ΛͰΔͱΤϨϕʔλ͕΍ͬͯ
    ͘Δɺى͖Δ࣌ؒʹ߹ΘͤͯࣗಈͰΧʔς
    ϯ͕։͖ɺর໌͕ͭ͘ɺ༧໿࣌ؒલʹςε
    ϥͷۭௐ͕ࣗಈͰͭ͘ɻͦΜͳମݧ͕࣮ݱ
    Ͱ͖·͢ɻ
    Φʔτϝʔγϣϯ

    View Slide

  10. Widgets
    SmarthomeͰఏڙ͢Δػೳ
    10
    Automation

    View Slide

  11. 11

    View Slide

  12. γεςϜߏ੒
    12
    εϚʔτϗʔϜ

    View Slide

  13. HomeController
    iPad / Web
    Smarthome ͷγεςϜߏ੒
    Logic Machine
    On Premise
    NOT A HOTEL Smarthome
    Cloud service
    MainApp / PMS
    iOS / Web
    13

    View Slide

  14. Ϋϥ΢υͱΦϯϓϨͷͦΕͧΕ໾ׂ
    14
    Logic Machine
    On Premise
    NOT A HOTEL Smarthome
    Cloud service
    HomeController
    iPad / Web
    Φʔτϝʔγϣϯ
    ෳ਺ίϚϯυͷϋϯυϦϯά
    MainApp / PMS
    iOS / Web
    ܯใɾҟৗͷ؂ࢹɾϋϯυϦϯά
    VPN
    ϩάͷऔಘͱอଘ
    ίϚϯυͷड৴
    ઀ଓػثͷ੍ޚ
    ϑΟʔυόοΫͷૹ৴
    ػثঢ়ଶͷऔಘ
    ϑΟʔυόοΫͷૹ৴

    View Slide

  15. UniFi Dream Machine Pro
    Router
    smarthome-app-api
    Cloud Run
    VPN
    Cloud VPN
    smarthome-reciver-apigw
    Cloud Run
    main-app-api
    Cloud Run
    Smarthome ͷγεςϜߏ੒
    15
    IPSec VPN
    Devices
    On Premise
    KNX/EIB
    Database
    Cloud Spanner
    Feedback
    Google Cloud Platform
    HomeController

    iPad / Web
    gRPC
    REST
    MainApp
    iOS / Web
    Dnsmasq
    DNS DHCP server
    Logic Macghine
    KNX server
    PMS

    Web
    smarthome-internal-api
    Cloud Run
    gRPC
    REST
    operation-app-api
    Cloud Run
    REST
    Firebase Auth
    Authentication
    Others: BigQuery / Tasks / Scheduler / Run Jobs / Logging / Error reporting
    Command

    View Slide

  16. ։ൃମ੍
    16
    εϚʔτϗʔϜ

    View Slide

  17. 17
    - PO / Design 1໊ CXO
    - PdM 1໊
    - iOS 2໊
    - Backend / Web / ઃඋ 1໊
    - Backend / Infra 1໊
    - Backend / ઃඋ / ԿͰ΋܎ 1໊ ࢲ
    ։ൃϝϯόʔ 7໊
    εϚʔτϗʔϜͷ։ൃମ੍
    εϚʔτϗʔϜνʔϜΈΜͳͰ
    KNXύʔτφʔࢿ֨Λऔಘ͓ͨ͠ॕ͍ͷֆ

    View Slide

  18. 18
    - ݈߁తʹຖே9࣌νʔϜͰேձ
    - εϓϦϯτ͸2ि
    - ຖिՐ༵೔ʹάϧʔϛϯά
    - ZenHub ͰΧϯόϯ؅ཧ
    - iOS ϦϦʔε͸ݪଇ2िʹҰճ
    - API / Infra ϦϦʔε͸దٓ ि2ճఔ౓
    εΫϥϜΆ͍։ൃ
    εϚʔτϗʔϜͷ։ൃମ੍

    View Slide

  19. 19
    - εϚʔτϗʔϜγεςϜ࣮૷
    - αʔϏεؒ࿈ܞ։ൃ
    - Lifecycle ؍఺ͷઃඋෆྑʹର͢ΔରԠ
    - ͓٬༷ɾӡӦ͔Βͷ্͕Δ FB վળ
    - ݐஙͷجຊઃܭ͔࣌Βઃඋͷཁ݅ௐ੔
    - KNX ͷ࢓༷ઃܭɾ࣮૷
    - ཁ࣮݅ݱͷͨΊͷػثબఆؚΉௐࠪ
    - ωοτϫʔΫ࿦ཧઃܭɾઃஔ
    ϦΞϧͱີ઀ͨ͠ۀ຿
    εϚʔτϗʔϜͷ೔ৗۀ຿

    View Slide

  20. 20
    - εϚʔτϗʔϜγεςϜ࣮૷
    - αʔϏεؒ࿈ܞ։ൃ
    - Lifecycle ؍఺ͷઃඋෆྑʹର͢ΔରԠ
    - ͓٬༷ɾӡӦ͔Βͷ্͕Δ FB վળ
    - ݐஙͷجຊઃܭ͔࣌Βઃඋͷཁ݅ௐ੔
    - KNX ͷ࢓༷ઃܭɾ࣮૷
    - ཁ࣮݅ݱͷͨΊͷػثબఆؚΉௐࠪ
    - ωοτϫʔΫ࿦ཧઃܭɾઃஔ
    ϦΞϧͱີ઀ͨ͠ۀ຿
    εϚʔτϗʔϜͷ೔ৗۀ຿

    View Slide

  21. 21
    Φʔφʔ༷ɾ͓٬༷ɾӡӦͷ͢΂ͯͷ໨ઢͰɺ
    NOT A HOTEL ͷѹ౗తͳମݧΛ࣮ݱ͢Δͨ
    Ίɺ౷߹తʹαʔϏε։ൃΛ͢Δඞཁ͕͋Δɻ
    εϚʔτϗʔϜ͸ɺεϚʔτϗʔϜγεςϜʹ
    ดͨ͡ੈքͰ͸ͳ͘ɺࣾ಺ͷଞͷγεςϜ
    (MainAppɺPMSɺAI) ͱαʔϏεؒͰͷ࿈ܞ
    Λ͍ͯ͠Δɻ
    “NOT A HOTEL” Λͭ͘Δ
    NOT A HOTEL αʔϏεؒ࿈ܞ
    SmartHome
    MainApp
    PMS

    View Slide

  22. - ݖݶ͕͋ΔϢʔβʔͷΈɺ

    ϋ΢εͷղৣ͕Ͱ͖Δ
    - ਗ਼૟ɾΠϯεϖΫγϣϯ࣌ͷղৣ
    - ͓٬༷ͷϋ΢εҊ಺࣌ͷղৣ
    - ఺ݕɾ޻ࣄ౳ʹΑΔղৣ
    - ղৣϩά͸ Slack ௨஌
    - Operation API 㲗 Smarthome API Ͱ࣮ݱ
    - ࠓޙ͸ϚϯγϣϯܕͷҊ݅͸ɺΤϨϕʔ
    λʔͳͲ΋ૢ࡞ՄೳʹͳΔ༧ఆ
    22
    ӡӦελοϑ޲͚ʹղৣػೳΛఏڙ
    PMS ͱεϚʔτϗʔϜ

    View Slide

  23. UniFi Dream Machine Pro
    Router
    smarthome-app-api
    Cloud Run
    VPN
    Cloud VPN
    smarthome-reciver-apigw
    Cloud Run
    main-app-api
    Cloud Run
    Operation API 㲗 Smarthome API Ͱ࣮ݱ
    23
    IPSec VPN
    Devices
    On Premise
    KNX/EIB
    Database
    Cloud Spanner
    Feedback
    Google Cloud Platform
    HomeController

    iPad / Web
    gRPC
    REST
    MainApp
    iOS / Web
    Dnsmasq
    DNS DHCP server
    Logic Macghine
    KNX server
    PMS

    Web
    smarthome-internal-api
    Cloud Run
    gRPC
    REST
    operation-app-api
    Cloud Run
    REST
    Firebase Auth
    Authentication
    Others: BigQuery / Tasks / Scheduler / Run Jobs / Logging / Error reporting
    Command

    View Slide

  24. - νΣοΫΠϯ࣌ɺ͙͢ʹϋ΢ε͕ղৣ
    - νΣοΫΠϯ࣌ɺΦʔφʔ༷͸ࣗ਎͕อ༗
    ͍ͯ͠Δϋ΢ε಺ͷΦʔφʔΫϩʔθοτ
    ͕ࣗಈղৣ
    - ଺ࡏதɺΞϓϦ͔Β͍ͭͰ΋ղৣ
    - Ұॹʹ଺ࡏ͢ΔϢʔβʔ΁ͷΩʔγΣΞ
    - νΣοΫΞ΢τ͢Δͱղৣݖݶണୣ
    - Main API 㲗 Smarthome API Ͱ࣮ݱ
    24
    ѹ౗తͳղৣମݧΛ໨ࢦͯ͠
    MainApp ͱεϚʔτϗʔϜ

    View Slide

  25. UniFi Dream Machine Pro
    Router
    smarthome-app-api
    Cloud Run
    VPN
    Cloud VPN
    smarthome-reciver-apigw
    Cloud Run
    main-app-api
    Cloud Run
    Main API 㲗 Smarthome API Ͱ࣮ݱ
    25
    IPSec VPN
    Devices
    On Premise
    KNX/EIB
    Database
    Cloud Spanner
    Feedback
    Google Cloud Platform
    HomeController

    iPad / Web
    gRPC
    REST
    MainApp
    iOS / Web
    Dnsmasq
    DNS DHCP server
    Logic Macghine
    KNX server
    PMS

    Web
    smarthome-internal-api
    Cloud Run
    gRPC
    REST
    operation-app-api
    Cloud Run
    REST
    Firebase Auth
    Authentication
    Others: BigQuery / Tasks / Scheduler / Run Jobs / Logging / Error reporting
    Command

    View Slide

  26. iOS ΤϯδχΞ͕ϋοΧιϯͰɺຊؾΛͩ͠
    ͯ̍೔ͭͬͨ͘ɺϥΠϒΞΫςΟϏςΟɻݱ
    ࡏ։ൃத (ඍௐ੔)ɻ
    ଺ࡏதʹɺසൟʹར༻͢Δղৣػೳ͕ɺϩο
    Ϋը໘ʹදࣔ͞ΕΔɻ
    26
    ϋοΧιϯͰ͏·Εͨղৣମݧͷ޲্
    MainApp ͱεϚʔτϗʔϜ

    View Slide

  27. ݱࡏ։ൃத
    - MainApp ͔ΒϗʔϜίϯτϩʔϧͱςεϥͷ
    ༧໿ͱૢ࡞
    ίϯτϩʔϧ෦͸ Web Ͱ։ൃ
    - Android ΞϓϦΛ0͔Β։ൃதͷͨΊ
    - Smarthomeͷࡉ͔͍ཁ݅ΛϓϥοτϑΥʔϜ
    ͕૿͑Δͱ؅ཧ޻਺ͱ͕૿Ճ͢ΔͨΊ
    27
    ͓٬༷ͷεϚϗͰ͢΂ͯΛίϯτϩʔϧ
    MainApp ͱεϚʔτϗʔϜ

    View Slide

  28. γʔϜϨεͳαʔϏεΛ։ൃ͠·͢ʂ
    28
    ͢΂ͯ͸ “NOT A HOTEL” Λͭ͘ΔͨΊʹ

    View Slide

  29. Ұॹʹ “NOT A HOTEL” Λͭ͘Γ·ͤΜ͔ʁ
    29
    ͢΂ͯ͸ “NOT A HOTEL” Λͭ͘ΔͨΊʹ

    View Slide

  30. Appendix
    30
    Appendix

    View Slide

  31. ͢΂ͯͷػثϩάΛ֬ೝͰ͖Δ
    - ૢ࡞ϩά (COMMAND)
    - ϑΟʔυόοΫϩά (FEEDBACK)
    ֬ೝ
    - ਖ਼͘͠ػث͕ಈ࡞͍ͯ͠Δ͔֬ೝ
    - Lifecycle Management Ͱػثͷϩάௐࠪ
    - ఀిࢼݧ౳Ͱར༻
    31
    ػثͷϩά
    σʔλ׆༻

    View Slide

  32. ͢΂ͯͷϝʔλʔ͸KNX࿈ܞ͍ͯ͠Δ
    ϦΞϧλΠϜʹޫ೤අͷ֬ೝ͕Մೳ
    Ψε࿙Εɺ࿙ਫɺͳͲݕ஌Մೳ
    ϓʔϧͷਫग़ͬ͠ͺͳ͠ͷݕ஌
    ࣌ؒผʹݟΔ͜ͱͰɺΑΓৄࡉʹ֬ೝ͕Մೳ
    32
    ϦΞϧλΠϜʹݟ͑Δޫ೤අ
    σʔλ׆༻

    View Slide

  33. ϋ΢εͰൃੜͨ͠ॏཁͳܯใ͸ Slack ΁௨஌͞ΕΔ
    ۓٸ౓͕ߴ͍΋ͷʹؔͯ͠͸ɺӡӦελοϑ΁ి࿩Ͱ
    ௨஌
    33
    BMS – Building Management System
    ͋Μ͠Μɾ͋ΜͥΜ

    View Slide