MQTT / send only decrypted value ??

Hi, is it possible to just receive the decrypted value from a device ? for example my temp sensor sends 3 values. 1 is internal temp - 2 is humidity and 3 is external temp

My mqtt client would like to get a plain value. is it spossible to define this in the mqtt topic ?

Example: application/18/device/a84041bc8187aaae/rx

and this is the received data:

{“applicationID”:“18”,“applicationName”:“TemperaturLuftfeuchteHallen”,“deviceName”:“Temp19”,“deviceProfileName”:“OTAA + DraginoTempSensor”,“deviceProfileID”:“61e85d98-dc35-474d-9e18-1b45bf620ed3”,“devEUI”:“a84041bc8187aaae”,“rxInfo”:[{“gatewayID”:“7276ff000b032201”,“uplinkID”:“524783c5-7282-4fe3-8532-91269bf8edcb”,“name”:“Antenne1”,“time”:“2024-04-29T08:24:33Z”,“rssi”:-123,“loRaSNR”:-4.5,“location”:{“latitude”:52.16846,“longitude”:14.61412,“altitude”:90}}],“txInfo”:{“frequency”:867700000,“dr”:0},“adr”:true,“fCnt”:27388,“fPort”:2,“data”:“ysYIiwGQAX//f/8=”,“object”:{“analogInput”:{“_1”:21.87,“_2”:40,“_3”:327.67,“_4”:2.758},“info”:“Dragino Tempsensor”}}

What you want is the data field, but there is no way to put that directly on the topic. If you don’t want to write code to consume the messages, I guess you could pipe it out to something like jq to grab the data field and then base64-decode it, but I wouldn’t trust that long-term.

This topic was automatically closed after 90 days. New replies are no longer allowed.