mirror of
https://github.com/meshtastic/protobufs.git
synced 2026-04-20 22:13:55 +00:00
Merge pull request #363 from meshtastic/mqtt-client-proxy
Mqtt client proxy config and reworked payload
This commit is contained in:
commit
f2d1ebbd34
5 changed files with 52 additions and 19 deletions
|
|
@ -53,4 +53,8 @@
|
|||
|
||||
*NeighborInfo.neighbors max_count:10
|
||||
|
||||
*DeviceMetadata.firmware_version max_size:18
|
||||
*DeviceMetadata.firmware_version max_size:18
|
||||
|
||||
*MqttClientProxyMessage.topic max_size:60
|
||||
*MqttClientProxyMessage.data max_size:435
|
||||
*MqttClientProxyMessage.text max_size:435
|
||||
|
|
@ -674,6 +674,36 @@ message Waypoint {
|
|||
fixed32 icon = 8;
|
||||
}
|
||||
|
||||
/*
|
||||
* This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server
|
||||
*/
|
||||
message MqttClientProxyMessage {
|
||||
/*
|
||||
* The MQTT topic this message will be sent /received on
|
||||
*/
|
||||
string topic = 1;
|
||||
|
||||
/*
|
||||
* The actual service envelope payload or text for mqtt pub / sub
|
||||
*/
|
||||
oneof payload_variant {
|
||||
/*
|
||||
* Bytes
|
||||
*/
|
||||
bytes data = 2;
|
||||
|
||||
/*
|
||||
* Text
|
||||
*/
|
||||
string text = 3;
|
||||
}
|
||||
|
||||
/*
|
||||
* Whether the message should be retained (or not)
|
||||
*/
|
||||
bool retained = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
* A packet envelope sent/received over the mesh
|
||||
* only payload_variant is sent in the payload portion of the LORA packet.
|
||||
|
|
@ -1320,6 +1350,11 @@ message FromRadio {
|
|||
* Device metadata message
|
||||
*/
|
||||
DeviceMetadata metadata = 13;
|
||||
|
||||
/*
|
||||
* MQTT Client Proxy Message
|
||||
*/
|
||||
MqttClientProxyMessage mqttClientProxyMessage = 14;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1361,6 +1396,11 @@ message ToRadio {
|
|||
*/
|
||||
|
||||
XModem xmodemPacket = 5;
|
||||
|
||||
/*
|
||||
* MQTT Client Proxy Message
|
||||
*/
|
||||
MqttClientProxyMessage mqttClientProxyMessage = 6;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1465,4 +1505,4 @@ message DeviceMetadata {
|
|||
* Has Remote Hardware enabled
|
||||
*/
|
||||
bool hasRemoteHardware = 10;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ message ModuleConfig {
|
|||
* This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs
|
||||
*/
|
||||
string root = 8;
|
||||
|
||||
/*
|
||||
* If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection
|
||||
*/
|
||||
bool proxy_to_client_enabled = 9;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
*ServiceEnvelope.packet type:FT_POINTER
|
||||
*ServiceEnvelope.channel_id type:FT_POINTER
|
||||
*ServiceEnvelope.gateway_id type:FT_POINTER
|
||||
|
||||
*MqttClientProxyMessage.topic type:FT_POINTER
|
||||
*ServiceEnvelope.gateway_id type:FT_POINTER
|
||||
|
|
@ -30,18 +30,4 @@ message ServiceEnvelope {
|
|||
* the globally trusted nodenum
|
||||
*/
|
||||
string gateway_id = 3;
|
||||
}
|
||||
|
||||
/*
|
||||
* This message will be proxied over the PhoneAPI for client to deliver to the MQTT server
|
||||
*/
|
||||
message MqttClientProxyMessage {
|
||||
/*
|
||||
* The MQTT topic this message will be sent /received on
|
||||
*/
|
||||
string topic = 1;
|
||||
/*
|
||||
* The actual payload for mqtt delivery
|
||||
*/
|
||||
ServiceEnvelope envelope = 2;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue