Skip to content

Commit 34e18d3

Browse files
committed
ucloud: Update QoS settings.
1 parent 9eaf104 commit 34e18d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arduino_iot_cloud/ucloud.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ async def discovery_task(self, interval=0.100):
291291

292292
if lastval_record := self.records.pop("r:m", None):
293293
lastval_record.add_to_pack(self.senmlpack)
294-
self.mqtt.subscribe(self.create_topic("shadow", "i"))
295-
self.mqtt.publish(self.create_topic("shadow", "o"), self.senmlpack.to_cbor(), qos=True)
294+
self.mqtt.subscribe(self.create_topic("shadow", "i"), qos=1)
295+
self.mqtt.publish(self.create_topic("shadow", "o"), self.senmlpack.to_cbor(), qos=1)
296296
logging.info("Device configured via discovery protocol.")
297297
await asyncio.sleep(interval)
298298

@@ -308,7 +308,7 @@ async def mqtt_task(self, interval=0.100):
308308
logging.debug("Pushing records to Arduino IoT cloud:")
309309
for record in self.senmlpack._data:
310310
logging.debug(f" ==> record: {record.name} value: {str(record.value)[:48]}...")
311-
self.mqtt.publish(self.topic_out, self.senmlpack.to_cbor(), qos=True)
311+
self.mqtt.publish(self.topic_out, self.senmlpack.to_cbor(), qos=1)
312312
self.last_ping = timestamp()
313313
elif self.keepalive and (timestamp() - self.last_ping) > self.keepalive:
314314
self.mqtt.ping()

0 commit comments

Comments
 (0)