Cant Publish Downlink Message Using TTN PAHO & MQTT

I am designing a sensor pushing data via LORA to TTN. I can subscribe to the data streams using Python PAHO. I need to send commands to the sensor. I can do that using the TTN console & the Cayenne dashboard. But I can not figure out what the format for publishing a message using Python PAHO is. I also receive no feedback, acknowledgements, or error messages. I am using MQTT Explorer to try to find the correct message format followingCayenne MQTT API page as a guide. Again, no problem subscribing.
Here is an example of the message I am trying to publish:
TOPIC: v3/testak1@ttn/things/eui-70b3d57ed00XXXX/data/json
MESSAGE:
[
{
“channel”:4,
“value”:1,
“type”:“digital”,
“unit”:“”
}
]
All suggestions appreciated.

I’m a little confused. Do you want to use MQTT or LORA?

I want to use both. I am using TTN LoRa. I want to send control commands to the LoRa device. I am using Cayenne to display measurements. I thought I could use Cayenne to relay commands.

It appears I can do that directly through TTN. Maybe that’s my answer. I just use Cayenne to display and use TTN’s MQTT interface to relay commands.

I guess you could use both, but It would be a lot easier and cheaper to just go MQTT if your project supports it.

I need the LORA connectivity.
I am now able to publish downlink messages using paho mqtt client to the ttn mqtt integration using this link as a sample. You do need to encode the message into Base64

1 Like