This document discusses implementing an IoT device gateway pattern using an Android TV box, XBee modules, and the WSO2 IoT platform. It shows how sensor data from devices connected to an XBee module on the TV box can be sent to the WSO2 IoT platform for edge analytics processing and monitoring/control of devices from the platform. Siddhi queries are presented that can analyze the sensor data locally on the Android TV box before sending results to the cloud. The document also describes how to connect the Android TV box to an XBee module using USB.