Xtreme Labs is headquartered in the Canadian Pacific Building, which when completed in 1913 was the tallest building in the British Empire. Along with that heritage, the building has an HVAC that may be originally from that era as well resulting in the office temperature fluctuating during the day; of course, it also doesn’t help that we have probably 2 to 3 times the typical number of high-end workstations in our offices.
I had a couple wireless, Zigbee temperature sensors sitting around and figured it would be perfect to use them to create a mobile friendly, temperature monitoring site displaying the current temperature in the office. Basically, the system, which can be accessed at http://temperature.xtremelabs.com (and http://temperature.xtremelabs.com/get_data for the web service), comprises of several pieces. The Zigbee temperature sensors periodically send a report packet to a Digi Zigbee to WiFi gateway. The gateway, which runs some simple Python code, collects the reports from the sensors and then sends the combined reports to a central server. The sensors and the Digi Zigbee to WiFi gateway provided most of the necessary pieces for collecting the temperature reports but I was lacking the central server to receive the reports, to store the data, and to provide the web site and API for pulling the current (and past) temperature values. Having recently done some reading about Node.js, I was curious to play with it, so this seemed like the perfect opportunity.
Developing in Node.js was exciting as it was quick to see results, test and enhance. The platform and community modules are elegant and simple. Node.js is a relatively young server platform and definitely isn’t a silver bullet to replace all existing server platforms. If you need a light weight, efficient and scalable platform to provide services for your mobile app, Node.js will likely be a great choice. Using technologies like Node.js, Xtreme Labs can help you get your mobile solution out to testers and market more quickly, allowing you to garner feedback and further enhance your mobile product. One product we’ve already completed using Node.js is Alpha Slides, a program that allows you to transfer presentations through the cloud to other devices.
If you’re curious, source code for my simple server, under MIT open source license, is available at: https://github.com/abaril/RemoteTemperatureServer
About the AuthorMore Content by Pivotal Labs