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

Building mobile apps for IoT Devices: a case study of our work with the Holiday by MooresCloud

Secret Lab
September 09, 2014

Building mobile apps for IoT Devices: a case study of our work with the Holiday by MooresCloud

Presented by Secret Lab (http://www.secretlab.com.au)

Connected devices that support ‘hackable’ software development are becoming increasingly common: the Lifx, the Holiday by MooresCloud, Philips Hue, and so on.

This talk will explore the development of a number of iOS apps built for the Holiday by MooresCloud, including a device discovery app and a musical visualiser. The talk will summarise the best practices for developing IoT-related apps for iOS, how to talk to such devices in a reliable and network-friendly way, and best practices for UX and interaction with IoT devices.

We’ll showcase our past work, demonstrate what we’re working on now, and present a number of demonstrations of our approach to building mobile software for IoT devices.

Presented at YOW Connected 2014 in Melbourne, September 2014.

Secret Lab

September 09, 2014
Tweet

More Decks by Secret Lab

Other Decks in Programming

Transcript

  1. Designing Apps for the Internet of Things
    SECRET LAB

    View Slide

  2. View Slide

  3. @parisba

    View Slide

  4. @desplesda

    View Slide

  5. Kerbal Space
    Program Book
    (!!)
    Unity Mobile
    Game
    Development

    View Slide

  6. View Slide

  7. The internet is made
    of hardware

    View Slide

  8. The internet of things is made
    of user facing hardware

    View Slide

  9. A pretty old field

    View Slide

  10. Regular people now
    have access

    View Slide

  11. You’re either building a device and
    need an app, or you’re building an
    app for existing hardware

    View Slide

  12. Making apps for existing
    hardware is less common
    but very cool

    View Slide

  13. We’re talking about stuff
    that applies to both

    View Slide

  14. Our experience

    View Slide

  15. • Seamlessness!
    • Performance!
    • Working with the App Store

    View Slide

  16. Seamlessness

    View Slide

  17. View Slide

  18. The ideal user story

    View Slide

  19. The Ideal User Experience
    Buy The Thing, Take It Home
    Turn It On
    It Does Something Good

    View Slide

  20. Most Things Do This
    Already

    View Slide

  21. View Slide

  22. The Heater User Experience
    Buy The Thing, Take It Home
    Turn It On
    Now Your House Is Warm

    View Slide

  23. The Microwave User Experience
    Buy The Thing, Take It Home
    Turn It On
    Last Night’s Curry

    View Slide

  24. Configuration
    Adds Work

    View Slide

  25. View Slide

  26. The Xbox One User Experience
    Buy The Thing, Take It Home
    Turn It On
    Play Video Games

    View Slide

  27. The Xbox One User Experience
    Buy The Thing, Take It Home
    Turn It On
    Play Video Games
    Sign In to your Xbox Live account

    View Slide

  28. The Xbox One User Experience
    Buy The Thing, Take It Home
    Turn It On
    Play Video Games
    Sign In to your Xbox Live account Create an Xbox Live account
    OR

    View Slide

  29. The Xbox One User Experience
    Buy The Thing, Take It Home
    Provide Wifi Details
    Play Video Games
    Sign In to your Xbox Live account Create an Xbox Live account
    OR
    Turn It On

    View Slide

  30. View Slide

  31. Plugging stuff in is
    easy

    View Slide

  32. HARD MODE

    View Slide

  33. Configure a device…
    • It has only one plug, for power
    • It needs wifi
    • It has no useful display
    • It has no useful input

    View Slide

  34. View Slide

  35. Most use a temporary
    ad-hoc network

    View Slide

  36. Buy The Thing, Take It Home
    Turn It On
    Disconnect from the wifi,
    connect to the device
    Open a web browser, go to a
    weird URL
    Provide Wifi Details

    View Slide

  37. Disconnect from the wifi,
    connect to the device
    Open a web browser, go to a
    weird URL
    Provide Wifi Details
    Reboot
    Reconnect to the wifi
    If it worked, awesome

    View Slide

  38. This is awful

    View Slide

  39. Also really scary

    View Slide

  40. View Slide

  41. Other approaches

    View Slide

  42. Got a camera?
    Show a QR code

    View Slide

  43. View Slide

  44. You generally can’t get
    away from this stuff

    View Slide

  45. Takeaway:!
    Make the rest of the experience
    as simple as possible

    View Slide

  46. Performance

    View Slide

  47. View Slide

  48. Internet-connected
    holiday lights

    View Slide

  49. View Slide

  50. Each light individually
    configurable

    View Slide

  51. View Slide

  52. View Slide

  53. View Slide

  54. Smooth movement =
    ~20Hz

    View Slide

  55. We achieved 5Hz

    View Slide

  56. Problem: 

    Designed for sporadic access

    View Slide

  57. Original design
    was HTTP

    View Slide

  58. View Slide

  59. Two problems: 

    latency and throughput

    View Slide

  60. Latency

    View Slide

  61. Latency: server was
    handling requests one at
    a time

    View Slide

  62. Throughput: 1 HTTP
    request per light update

    View Slide

  63. It sucked

    View Slide

  64. Solution: UDP!

    View Slide

  65. UDP:
    Low-level networking

    View Slide

  66. Works fine for this case

    View Slide

  67. Both problems fixed!

    View Slide

  68. Achieved 100Hz

    View Slide

  69. The HTTP method is
    still good!

    View Slide

  70. View Slide

  71. Takeaway:!
    Have a high-level API, and a
    performance-focused low-level
    API.

    View Slide

  72. You might not be able to make
    this happen, but if you’re a
    hardware dev, please do it

    View Slide

  73. IoT apps !
    on the App Store

    View Slide

  74. View Slide

  75. If you’re making the
    official app, make it free

    View Slide

  76. If you’re making a third-
    party app, charge a
    premium price!

    View Slide

  77. Third party app customers
    have loyalty to the
    hardware

    View Slide

  78. Takeaway: Keep in mind
    that you’re part of a bigger
    picture when making apps.

    View Slide

  79. Making apps for
    hardware is fun!

    View Slide

  80. 1. Reduce the workload
    2. Consider both performance and flexibility
    3. Remember the bigger picture

    View Slide

  81. View Slide