Nuggets

Ffffa52ae8108fdeb2559d804051556e?s=47 Rob Hruska
September 06, 2013

 Nuggets

Building real-time projector dashboards with node.js, Socket.IO, and Raspberry Pi.

Ffffa52ae8108fdeb2559d804051556e?s=128

Rob Hruska

September 06, 2013
Tweet

Transcript

  1. Throwing Up Numbers

  2. @robhruska

  3. Dashboards

  4. None
  5. None
  6. None
  7. Nuggets

  8. None
  9. None
  10. They’re Awesome.

  11. None
  12. None
  13. Communal Dashboards

  14. Communal Dashboards With the growing interest in data analytics and

    visualizations, we're seeing more effort put into interesting visualizations that allow people to draw insight from data floating around in an organization. Most of these dashboards are aimed at individual usage, but there is a growing tendency to use them for a more communal purpose. “ martinfowler.com/bliki/CommunalDashboard.html ...creating an emotional engagement with how the business is running. “ ...a form information radiator. “
  15. Communal Dashboards martinfowler.com/bliki/CommunalDashboard.html Photo: Chris Kapcar (via Martin Fowler)

  16. This is less about helping people make decisions, more about

    educating people about what's happening, providing background information and context for their regular work. “ Communal Dashboards martinfowler.com/bliki/CommunalDashboard.html
  17. Today’s Menu • Project structure • Examples • Hardware

  18. socket.io event handler / emitter socket.io client node.js browser message

    subscribe
  19. http://nodejs.org node.js

  20. Event loop • Single-threaded message processor Non-blocking I/O • Node

    does all the I/O outside the event loop
  21. None
  22. None
  23. http://nodejs.org node.js

  24. socket.io http://socket.io

  25. Client Server

  26. None
  27. nugget https://github.com/hudl/nugget

  28. socket.io event handler / emitter Datasource External API subscribe: stat

    socket.io client stat node.js browser Display stat Display Datasource stat stat subscribe: stat
  29. nugget |_ client |_ server |_ user |_ datasources |_

    displays |_ resources |_ server-config.json |_ datasources |_ datasource-name.js |_ ... |_ displays |_ display-name.css |_ display-name.js |_ display-name.html |_ ...
  30. current-time Example

  31. socket.io event handler / emitter system-time System Time subscribe: time

    socket.io client time node.js browser current-time time
  32. nugget |_ client |_ server |_ user |_ datasources |_

    displays |_ resources |_ server-config.json |_ datasources |_ server-time.js |_ ... |_ displays |_ current-time.css |_ current-time.js |_ current-time.html |_ ...
  33. server/user/datasources/system-time.js

  34. server/user/displays/current-time.js

  35. server/user/displays/current-time.css server/user/displays/current-time.html

  36. current-time Demo

  37. current-users Example

  38. socket.io event handler / emitter current-users Chartbeat subscribe: current-users socket.io

    client current-users node.js browser current-users current-users Splunk
  39. server/user/displays/current-users.js

  40. current-users Demo

  41. github-commits Example

  42. None
  43. server/user/displays/github-commits.js http://your-server/inbound/datasource-name

  44. github-commits Demo

  45. Control Panel

  46. None
  47. None
  48. Hardware

  49. Acer X1220H $380 Raspberry Pi $35

  50. Edimax EW-7811Un - $10 Rosewill RPM-MP0010 - $35 2.1A USB

    wall charger - $10 4-port powered USB hub - $15
  51. Shopping LIst $380 35 10 15 35 10 ~$500 10

  52. Automation • Power on/off automatically • Projector power

  53. None
  54. Schematic: Alex Bain, http://alexba.in/

  55. None
  56. Molten Lead

  57. Images: http://sparkfun.com IR LED 850nm $0.95 x 3 100g leaded

    solder $5.95 10k Ohm resistor $0.25 1" ProtoBoard (2) $2.50 30W soldering iron $9.95 12" M/F Jumper (10) $4.50 PN2222 Transistor (10) $1.95
  58. None
  59. None
  60. LIRC

  61. Make Your Own Awesome What’s important to you and your

    organization? • Current users • GitHub commits • Items purchased • Videos watched • App downloads
  62. Fork it! https://github.com/hudl/nugget

  63. None
  64. Resources • @robhruska / robhruska@gmail.com • http://github.com/hudl/nugget • http://github.com/hudl/nugget-hudl •

    http://elinux.org/RPi_VerifiedPeripherals • http://nodejs.org/ • http://socket.io/ • http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/
  65. Questions