Red-Node error: MeshPacket in the ServiceEnvelope

So I am using the example from MQTT | Meshtastic specifically where the author shows the source code for the mqtt decoding. When I get it running under node-red i get the following error whenever a packet comes across the network:

Wire format is invalid: Error: no such Type or Enum ‘MeshPacket’ in Type .meshtastic.ServiceEnvelope

which is in the decode protobuf gadget right after the MQTT node.

What is required to get this fixed?

Hi,
I’m having the same problem. The MQTT setup seems correct as the messages are coming through and showing in the debug node on the flow, but I get the same error as the OP. I initially had the wrong path to the mqtt.proto file and that gave a different error. That’s sorted now so I reckon it must be either the encoding on the device or decoding that isn’t correct. How do I start looking into this? Any tips?
Cheers

I never did get it to work. You have to switch to JSON in the device, ci very it within python and then completely rewrite the code. This version was never meant to work with V2.x of Meshtastic

Ah, ok. Thanks for that!

I just figured this out. You need to include more proto files. in node red you need to comma delim when you need to reference multiple files. for example. mqtt.proto , mesh.proto , portnums.proto .

Since the protocol references types from different files you need to include all the files for the messages you are decoding. I only needed those three but I was just decoding a specific message.

Hello,
finally it’s work with the 2.2.XXX or not ?
thank you

Just for information yes it’s working

can you send a screenshot of your working setup in the decode node? I would really appreciate it

Hi
I’m stacked in the mqtt - nodered integration with the “wired format invalid” problem. Can you give me any hint to resolve this please?

Hi. I have the same problem. How do you solve it?

Hi Erich.
What do you means with reference multiple files?
I’m stack in decoding the protobufs in nodered and I do not know how to resolve the “wire format invaid” problem.

image

Following your directions I make reference to multiple files in this way:
/home/meshtastic-protobufs-master/protobufs/meshtastic/mqtt.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/mesh.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/portnums.proto

but it does not work neither.

Regards,

You need to reference all the protofiles that you expect to decode. There are files for different data types. Here are all the types available in their project. If you don’t know what types you need to handle then try all of them . protobufs/meshtastic at master · meshtastic/protobufs · GitHub

Hi
I copy all the .proto and .options files in /home/meshtastic-protobufs-master/protobufs/meshtastic/ and reference all of them in the configuration file an still doesn’t work.

/home/meshtastic-protobufs-master/protobufs/meshtastic/mqtt.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/mesh.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/portnums.proto,/home/meshtastic-protobufs-master/protobufs/meshtastic/admin.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/apponly.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/atak.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/cannedmessages.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/channel.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/clientonly.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/config.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/connection_status.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/deviceonly.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/module_config.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/paxcount.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/powermon.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/remote_hardware.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/rtttl.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/storeforward.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/telemetry.proto, /home/meshtastic-protobufs-master/protobufs/meshtastic/xmodem.proto

Maybe the service packets are malformed or different versions