Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

HueMore

1,281 views

Published on

Design process of building this app: https://play.google.com/store/apps/details?id=com.kuxhausen.huemore

Published in: Technology, Business
  • Be the first to comment

HueMore

  1. 1. HueMoreBy Eric Kuxhausen
  2. 2. HueMore• Android app• Controls the Phillips Hue lighting system• ST: Applied Human Computer Interactionproject• Published:https://play.google.com/store/apps/details?id=com.kuxhausen.huemore
  3. 3. BACKGROUNDThe Phillips Hue ecosystem
  4. 4. Philips Hue LED bulbsPhoto Credit: http://www.amazon.com/gp/product/B00BSN8DN4/ref=noref?ie=UTF8&psc=1&s=hi
  5. 5. Smartphone Controlled LightingPhoto Credit: http://www.multiroom.fr/zigbee-light-link-la-norme-de-reference-pour-le-controle-declairage/
  6. 6. USE CASESUsing smartphones to integrate controlled lighting into everyday life
  7. 7. Multipurpose space• Manipulate color temperature (red vs blue tintin whitish light)• Reuse room for concentration and relaxation
  8. 8. Set the Mood• Colorful and time variant lighting options• Anything from candlelight dinner to danceparty
  9. 9. Sleep Assistant• Dim the lights as bedtime approaches• Fade the lights on to gently wake up inmorning
  10. 10. Optimized Circadian Biorhythm• Automatically vary color temperaturethroughout the day to match to sunlight color• Fight seasonal affectiveness disorder withbrighter light in the winter
  11. 11. Control Away from Home• Run lights while on vacation to appear home• Save power by turning off lights when lastperson leaves
  12. 12. DESIGN CONCERNS
  13. 13. Convenience• Minimize the number of clicks in everyday usecases• Physical light switches not viable• Users can save settings to NFC tags and placeon walls instead of lightswitches– NFC tags reprogrammable to auto-apply presetsor bring up onscreen options
  14. 14. Access Control• How does this scale for family use?
  15. 15. SCREENSHOTS
  16. 16. Select a group of lights Then apply a mood
  17. 17. Schedule Alarms Create new moods
  18. 18. DEVELOPMENT
  19. 19. Process• IDE: Eclipse with Android plugins• Version control: git via Github• Unit testing for NFC subcomponent• Compatibility testing across Android VirtualMachines representing:– Android versions 2.3 to 4.2– Small smartphones up to tablets
  20. 20. Magnitude of Project• 20+ screens the user might see• 60+ java classes• 10,000+ lines of code• Translated into 4 languages• Developed in 2 months
  21. 21. Kilolines of code modified
  22. 22. Architecture• Heavy use of OO design principles• 5 major elements:– View– ModelView (integrated with Model)– Persistence– Networking– System-Event interaction (Alarms and NFC)
  23. 23. View• 30 layouts built from standard UI elements• Defined with Android layout xml files• Different versions between screensizes, Android versions
  24. 24. ModelView• Java code extending Android Activity andFragment classes• Used Android supportV4 library to backport UIelements to legacy Android devices• Manual bindings to Views handle UIinteraction, data population
  25. 25. Persistence• Databases wrapped by AndroidContentProvider implementation• 3 mySQL lite databases for:– Groups– Moods– Alarms• Android’s key-value preference system to trackdatabase patches, user settings, etc
  26. 26. Networking• Extensions of Android AsycTask• Philips Hue API• Android standard Apache library for http get,post, put requests• Gson library translates between internal javaobjects representation and json for APIrequests & responses
  27. 27. System-Event Interactions• Alarms– Schedule with PendingIntent– Receive with BroadcastListener• NFC– Write NDEF messages containing URL withappended data (custom dataencoding protocol)– Read with system IntentFilter
  28. 28. HUEMORE NFC PROTOCOL 1.0Encoding light moods on nfc tags with as little as 46 bytes of storage
  29. 29. Constraints• NFC tags on the market that store as little as46 bytes of usable storage• Needs to support entire Hue bulbs API to beforwards compatible with the rest of HueMore
  30. 30. Data wrapper• NDEF record on tag containing a URL towww.kuxhausen.com/HueMore/nfc?• Websafe base64 data appended to end of URL
  31. 31. Data bitstring• 4 bit version number• 50 bit bulbs included flags• 7 bit number of states• Sequential listing of states
  32. 32. State subbitstring• 9 bits flagging optional inclusion of the following:– 1 bit on– 8 bit brightness number– 16 bit hue number– 8 bit saturation number– 64 bit xy float pair– 9 bit color temperature number– 2 bit alerts enums– 4 bit effect enums– 16 bit transitiontime number
  33. 33. Protocol Analysis• Numbers are big endian• Flags are bit strings (little endian)• No checksum (as of V1)• Orders of magnitude more space efficent thastoring json api calls
  34. 34. DEPLOYMENT
  35. 35. Distributed on Google Play
  36. 36. FUTURE

×