locky 3 жил өмнө
parent
commit
09aa6092c1

+ 0 - 18
Object/IOTCore/IotObject.py

@@ -137,24 +137,6 @@ class IOTClient:
                 templateBody=templateBody,
                 parameters=parameters
             )
-            topic_sql = "SELECT * FROM 'my/things/{}/shadow/update_lwt'".format(ThingName)
-            self.client.create_topic_rule(
-                ruleName=ThingName + '_LWT',
-                topicRulePayload={
-                    "sql": topic_sql,
-                    "ruleDisabled": False,
-                    "awsIotSqlVersion": "2016-03-23",
-                    'actions': [
-                        {
-                            'republish': {
-                                'roleArn': self.iot_role,
-                                'topic': '$$aws/things/' + ThingName + '/shadow/update',
-                                'qos': 1
-                            }
-                        }
-                    ]
-                }
-            )
             return res, parameters
         except Exception as e:
             print(e)