Meshtastic 2 telemetry data as json format

Hi,

I am able to send text msg over LORA from one device to the other (Lilygo v1.6) and transfer it over to my mqtt server.
Now I’m trying to do the same with telemetry data but this is not coming thru.

The telemetry works fine in the display of the first device - I can see the data there.

I can also see data being send but it seems encrypted. It looks like:

"

Ðç mÿÿÿÿ"("
!6d09e7d0FriediFrd"èŸm çÐ(5¾GY-HX
LongFast !6d09e7d0
"
I couldn’t find any useful documention on what is going on here and also the debug output didn’t shine much light on it. I read thru the following thread but it didn’t help.

Thanks, tong

Ok, I figured that the transmission of the telemetry data over LORA doesn’t seem to be the problem. I can see the environment data being received correctly, but the LORA - MQTT connection seems to have an issue.

I have finally given up. The mqtt export of environment data seems broken or encrypted or the proto decode stuff isn’t working as documented. I can’t figure it out and I don’t understand why this is made so complex for the user. Text messages are pushed to mqtt in a nice and plain json format - why not doing the same for environment data?

I’m now using a python script which queries the environment values from the devices and sends them to mqtt as json.

It’s disconcerting that it’s been almost two years and telemetry for MQTT is still broken. I jumped on Meshtastic for literally this where I aim to build cells of meshes sending sensor and telemetry data to a private MQTT broker using one or more devices connected to Internet. I’ve just got delivery of my first devices and have tried a few beta builds and some alpha ones with all sending telemetry in the same format as OP described. Neighbor information seems to be arriving in a fine looking JSON format.

If you’re seeing the NeighborInfo, you should also see telemetry there in the same json topic.

Here are the fields that are populated using JSON: firmware/src/serialization/MeshPacketSerializer.cpp at master · meshtastic/firmware · GitHub

Not on my setup. I get neighbor info, and what’s supposed to be telemetry data into two different topics.

Hmm, how do you know it’s device metrics you’re seeing in the protobuf topic? You can try increasing the device metrics interval and see if it shows in the JSON topic.

Well, I don’t really, I just reiterated what the OP wrote about since I see the same thing. I’ll fiddle a bit with the telemetry update interval to see if I get any change.

I see now you have set the NeighborInfo module interval to 10 seconds (!), while device telemetry is by default only sent every 30 min., so chance is high you will miss it.

I would first decrease the interval of the NeighborInfo module to something more sensible like 30 min.

Arrg! I feel like a fool. The telemetry messages are delivered to MQTT as you described it, under the json topic. My only guess right now is that they must have been drowned out by the NeighborInfo messages.