The NodeConfEu 2018 Badge
And here it is, the NodeConf EU 2018 Digital Badge:
Gorgeous, isnâ€™t it? The first time I saw one lit up, it silenced me. The badge surround is, to quote one of our NearFormers â€˜a work of artâ€™. Many of us are already planning to mount it somewhere at home where we can smile every time we see it.
- RGB LEDs (of course!)
- RGB back-lit screen
- 2 vibration motors for alerts
- LiPo battery for all those LEDs and motors
- Battery charging circuit
- USB port for charging
- An LSM303DLHC accelerometer and compass
- Holes for an optional ESP8266 ESP-01 Wifi module
The focus this year was on the software, and specifically making more use of Bluetooth for features/fun. We were also very interested in up-skilling across more Azure services to add to our DevOps expertise around it, so this seemed like the perfect opportunity.
The core set of requirements we started with were:
- Show peopleâ€™s name on badge (obviously!)
- Use badge Bluetooth broadcasts to anonymously estimate number of people in room and generate heatmaps
- Use accelerometer on badge to measure clapping at sessions and broadcast that anonymously
- Receive and display information messages and alerts on badge
- Receive and display basic schedule information on badge
- Add whatever other fun code we have time to do (Compass, Map, Backlights)
- Enable people to program the badge themselves using the Espruino IDE in Chrome over Web Bluetooth
The heatmaps are more than just fun. They can potentially help anyone who suffers from social anxiety and they can also help with smoothing out the lunch rush.
The aim of the alerts is to work around phone-alert-fatigue where many of us donâ€™t bother checking our constantly buzzing phones. A buzzing alert on the badge only means one thing â€“ this is important and you should read itâ€¦for example â€˜The buses are leaving now!â€™.
Raspberry Pis love Node.js
To achieve everything we wanted we clearly needed more than just the badges.
Enter 20 Raspberry Pis with built-in Bluetooth and Wifi running our Node.js code. These are our relays scattered around the event venue. They can broadcast to all the badges over Bluetooth and they can also listen for what the badges are broadcasting. Naturally we used Sandeep Mistryâ€™s brilliant Noble and Bleno Node.js libraries to implement this.
Microsoft Azure loves Node.js
But where will all that data go to/from and how? Microsoft Azure!
Azure gave us the following functionality:
- Access to the schedule backend created by the NodeConf EU PWA team that runs on AKS
- Send schedule info to the badges
- Send Info/Alert info to the badges from the Events team, originating in the PWA backend
- Aggregate the badge data
- Generate heatmap and clap-o-meter visualisations and display on a giant screen
- Send/Receive all of the data over MQTT to/from the Pis via IOT Hub
And to do that we used the following:
- AKS for the PWA back-end
- IOT Hub
- Functional Apps
- Stream Analytics
- Event Grid
- Application Insights
- Event Hub
- Power BI
- azure-iot-device Node.js module
- azure-iot-device-mqtt Node.js module
- Azure IoT Toolkit for VS Code
Weâ€™ll do a deep dive blogpost on the architecture of all of this after the event, when weâ€™ll also be Open Sourcing everything â€“ hardware and software.
But for the moment, Iâ€™d just like to mention the immense pleasure it was to discover that the Azure MQTT Node.js modules rely on NearForm legend Matteo Collinaâ€™s MQTT.js library!
We took privacy very seriously from day one and rejected many cool ideas as they could have (even theoretically) impinged on attendee privacy. Some of the relevant features/approaches we implemented include:
- Opt-out of badge broadcasts on first use or any time after
- Opt-out of clap-o-meter broadcasts on first use or any time after
- Opt-out of receiving any notifications on first use or any time after
- No record kept of who received which badge
- No badge information is persisted on Raspberry Pis
- Badge Bluetooth Mac addresses are hashed before sending to Azure
- No triangulation of badges â€“ best guess on count of badges in event rooms is based on measured power
- Heatmap room counts are ranges only
- All Pi-to-badge messages are broadcasts; never 1-1
- No recording of badge data outside of range of Pis in public areas
- No recording of data from non-badge Bluetooth devices
- Badges reject data from all devices except from event Pis or if attendees own code allows it
Please contact any NearFormer working at NodeConf EU if you feel there is anything we have missed or anything that you are uncomfortable with. Theyâ€™ll put you in touch with me.
A Work In Progress
This work is not complete by any means. We have so many things weâ€™d like to have done but were time and resource limited. Many aspects were done in peopleâ€™s spare time or in small gaps between customer projects, for example testing was done on 9 Pis and 15 real and pseudo-badges in my house via ngrok So please be gentle with us if things glitch or break. But let us know if you spot anything, particularly anything important.
Once we Open Source it all, you can fix anything you donâ€™t like.
Like so many NearForm projects this is a multinational effort and we have a lot of people to thank:.
- Global â€“ All of the NearFormers who submitted ideas and helped out on the 2018 badge in any way
- Ireland â€“ Glen Keane, Nigel Hanlon and HÃ©lÃ¨ne Haughney for initiating the NodeConf EU App project and working on it throughout
- Global â€“ All of the NearFormers who worked on the NodeConf EU App
- UK â€“ Gordon Williams for the always brilliant hardware and software design of the badge
- Ireland â€“ Agata Surgot for the stunning badge surround design
- Italy â€“ Matteo Collina for MQTT.js
- Canada â€“ Luca Maraschi for recommending we go with Azure, IOT Hub and MQTT
- Croatia/UK â€“ Mihovil Rister and Shaun Baker for the first version of the Azure code
- France â€“ Nicolas Morel for the core Azure implementation
- Lithuania â€“ Edvinas Barthkus for all of the Raspberry Pi Node.js code and lots of other things
- Ireland â€“ The NearForm Marketing and Events Team for all their support and help
- USA â€“ Ron Litzenberger for the notification system and many aspects of Azure
- Brazil â€“ Mehdi Avdi for getting the heatmap and clap-o-meter visualisation over the line
- Spain â€“ Alex Knol and the rest of our DevOps team for all of their Azure expertise and help
- Ireland â€“ Antoine Marin for the lovely design of the visualisation
Iâ€™d also like to give a shout-out PD Signs in Cork Ireland who did a great job manufacturing the badge surrounds. We used a *lot* of laser time! And finally to Pimoroni who also did a great job manufacturing the badges in the UK.