For those that have not noticed, I work for a large technology company. As a part of my role I need to demo various things, including Internet of Things things. Since I didn’t have any “things” to hand, I needed to either buy or create one. As anyone in the IoT space will tell you, there are a load of options for board based systems including the Raspberry Pi. My mind doesn’t work that way though. I knew that if I purchased one of those it would very quickly end up in a drawer never to see the light of day again.Instead, I decided to write an app to use the sensors in my phone. This became a very quick fail for me as I don’t own an Android (and pretty sure I never will) and Apple in their…”wisdom”…have made a huge barrier to entry for IOS by requiring a Mac to write apps. I won’t be buying another Mac any time soon, I am in love with another sexy laptop. So what to do? I realised I had all the sensors I needed sitting on my wrist and my handlebars. I could write a Connect IQ app. So I did.
You can find the code at https://github.com/davedoesdemos/ConnectIQ-Watch-IoT which will create an app to pass all of the lovely sensor data to an event hub in the Azure cloud.
You can find the instructions on how to use that code at https://github.com/davedoesdemos/ConnectIQ-Watch-IoT/blob/master/IoTWatchInstructions.md and also soon some more at https://github.com/davedoesdemos/ConnectIQ-Watch-IoT/blob/master/MLModelTraining.md
These will get you a platform that ingests the messages in real time from the watch using REST API calls. It then stores the messages as well as pushing them via an analytics solution to Power BI. The second set of instructions will help you to train a basic machine learning model and add this to the Stream Analytics, allowing you to include the ML results in the reporting platform. The below is an example realtime dashboard I created. The green HR box will turn red if the HR goes too low or too high based on what the machine learning model determined to be “normal” range.
There’s a video overview at https://youtu.be/_39eKRNK3UU for those interested, along with demos of the platform.
Please feel free to use the code and extend it for your own needs, let me know in the comments below if you do anything cool with it.