When you want to connect an IoT device to anything (or, for that matter, anything to anything), you should take a serious look at Node-RED, a free, open source visual process wiring system from IBM ...
A new company from one of the original creators of the open source Node-RED project is setting out to make it easier for companies to bridge the gap between incompatible IoT ecosystems at scale.