File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11"""Mesh Interface class
22"""
3- # pylint: disable=R0917
3+ # pylint: disable=R0917,C0302
44
55import collections
66import json
@@ -477,6 +477,18 @@ def sendAlert(
477477 priority = mesh_pb2 .MeshPacket .Priority .ALERT
478478 )
479479
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+
480492 def sendData (
481493 self ,
482494 data ,
You can’t perform that action at this time.
0 commit comments