iot_object module

iot_object.IOT_OBJ_LIST = [<iot_object.IotObject instance>, <iot_object.IotObject instance>, <iot_object.IotObject instance>]

List of all IoT devices that are supported by this lambda function

class iot_object.IotObject(pubTopic, subTopic, awsObjectProfile)[source]

Represents an IoT devices that can be discovered by Alexa smart home

create iot objects
param self:
param pubTopic:MQTT topic that this device publishses to
param subTopic:MQTT topic that this device subscribes to
param awsObjectProfile:
 the dictionary containing the aws profile of this object, the profile allocates the endpoints, specifies the capabilities, friendly name(which the user called to invoke)
iot_object.bedRoomLightAwsProfile = {'capabilities': [{'interface': 'Alexa', 'version': '3', 'type': 'AlexaInterface'}, {'interface': 'Alexa.PowerController', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'powerState'}], 'proactivelyReported': True}}], 'cookie': {}, 'description': 'Controller for bed room light', 'displayCategories': ['SWITCH'], 'endpointId': 'endpoint-002', 'friendlyName': 'bed room light', 'manufacturerName': 'Kd'}

the bed room light controller aws profile

iot_object.pcControllerAwsProfile = {'capabilities': [{'interface': 'Alexa', 'version': '3', 'type': 'AlexaInterface'}, {'interface': 'Alexa.PowerController', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'powerState'}], 'proactivelyReported': True}}, {'interface': 'Alexa.EndpointHealth', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'connectivity'}], 'proactivelyReported': True}}, {'interface': 'Alexa.TemperatureSensor', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'temperature'}], 'proactivelyReported': True}}], 'cookie': {}, 'description': 'Controller that controls and monitor the desktop PC', 'displayCategories': ['SWITCH', 'TEMPERATURE_SENSOR'], 'endpointId': 'endpoint-001', 'friendlyName': 'my computer', 'manufacturerName': 'Kd'}

the pc controller aws profile

iot_object.speakerControllerAwsProfile = {'capabilities': [{'interface': 'Alexa', 'version': '3', 'type': 'AlexaInterface'}, {'interface': 'Alexa.Speaker', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'volume'}, {'name': 'muted'}], 'proactivelyReported': True}}, {'interface': 'Alexa.EndpointHealth', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'connectivity'}], 'proactivelyReported': True}}], 'cookie': {}, 'description': 'speaker controller', 'displayCategories': ['OTHER'], 'endpointId': 'endpoint-005', 'friendlyName': 'my computer speaker', 'manufacturerName': 'Kd'}

the speaker controller aws profile

iot_object.thermostatAwsProfile = {'capabilities': [{'interface': 'Alexa', 'version': '3', 'type': 'AlexaInterface'}, {'interface': 'Alexa.ThermostatController', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'AdjustTargetTemperature'}, {'name': 'SetTargetTemperature'}], 'proactivelyReported': True}}, {'interface': 'Alexa.EndpointHealth', 'version': '3', 'type': 'AlexaInterface', 'properties': {'retrievable': True, 'supported': [{'name': 'connectivity'}], 'proactivelyReported': True}}], 'cookie': {}, 'description': 'Adjust temperature level', 'displayCategories': ['THERMOSTAT'], 'endpointId': 'endpoint-004', 'friendlyName': 'thermostat', 'manufacturerName': 'Kd'}

the thermostat aws profile