A computer program product, encoded on one or more non-transitory computer storage media, including instructions that when executed by one or more computers cause the one or more computers to perform operations including:
- receiving, by a prototyping system that has one or more computers and emulates an environment to enable testing of a proposed Internet of Things (IoT) device, a prototype program defining functionality of the proposed IoT device that is configured to communicate with a plurality of sensors and one or more actuators, wherein the prototyping system uses the prototype program to issue one or more requests to a prototyping application programming interface (API) including requests to register devices, obtain the status of a sensor, execute an action by an actuator, or receive an indication regarding the result of an executed action;
- translating, by the prototyping system, the prototype program into one or more commands at least some of which utilize the prototyping API, the one or more commands including a registration request for registration of a plurality of connected physical sensors and one or more connected physical actuators, each of the plurality of connected physical sensors corresponding respectively to one of the plurality of sensors of the proposed IoT device and each of the one or more connected physical actuators corresponding respectively to one of the one or more actuators of the proposed IoT device;
- sending, by the prototyping system to a sensor hub and through the prototyping API, the registration request that utilizes the prototyping API;
- receiving, by the sensor hub connected locally, by wired or wireless connection, to each of the plurality of connected physical sensors and each of the one or more connected physical actuators that each correspond respectively to one of the plurality of sensors or one of the one or more actuators of the proposed IoT device, the registration request through the prototyping API for each of the connected physical sensors and the one or more connected physical actuators that correspond respectively to one of the sensors or one of the actuators of the proposed IoT device;
- in response to receiving the registration request, initializing, by the sensor hub, each of the connected physical sensors and the one or more connected physical actuators that correspond respectively to one of the sensors or one of the actuators of the proposed IoT device;
- automatically obtaining, by the sensor hub in real-time, a status of each registered connected physical sensor from the respective registered connected physical sensor;
- automatically providing, by the sensor hub in real-time, a last-obtained status of each connected physical sensor to the prototyping system through the prototyping API on a routine, continuous or periodic basis;
- automatically receiving, by the sensor hub from the prototyping system through the prototyping API, requested actions corresponding to functionality of the proposed IoT device specified in the prototype program;
- and
- executing, by the sensor hub, each of the requested actions on a corresponding connected physical actuator, receiving a result of each executed action from the corresponding connected physical actuator and providing each received result to the prototyping system, each received result including an indication of whether each corresponding action succeeded or failed.