We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e675050 commit a097161Copy full SHA for a097161
1 file changed
meshtastic/mesh_interface.py
@@ -1,6 +1,6 @@
1
"""Mesh Interface class
2
"""
3
-# pylint: disable=R0917
+# pylint: disable=R0917,C0302
4
5
import collections
6
import json
@@ -477,6 +477,18 @@ def sendAlert(
477
priority=mesh_pb2.MeshPacket.Priority.ALERT
478
)
479
480
+ def sendMqttClientProxyMessage(self, topic: str, data: bytes):
481
+ """Send an MQTT Client Proxy message to the radio.
482
+
483
+ Topic and data should be the MQTT topic and the message
484
+ payload from an MQTT broker, respectively."""
485
+ prox = mesh_pb2.MqttClientProxyMessage()
486
+ prox.topic = topic
487
+ prox.data = data
488
+ toRadio = mesh_pb2.ToRadio()
489
+ toRadio.mqttClientProxyMessage.CopyFrom(prox)
490
+ self._sendToRadio(toRadio)
491
492
def sendData(
493
self,
494
data,
0 commit comments