New alpha 1.2.25 to test the MQTT gateway feature

A few questions about the MQTT? I’ve been playing around with this, and it looks like meshtastic is using the mosquitto public server and it is hardcoded. When I try to customize the mqtt_server to my own, it doesn’t have any affect. Is that for debugging / testing?

It is defaulting to a mqtt.meshtastic.org server, but if you change it to something else that should work fine.

Hmm, I’ll reflash it and try again. Would there be any conflict between this and 7-hop? I’m using a custom build that hardcoded the bluetooth pin, and enabled 7-hop.
does the mqtt_server domain need to be in double quotes specifically?
I’ll keep some of the nodes going to the meshtastic server if that’s helpful. the other ones are part of a sensitive project and I need to go to our own server.
Hopefully the bleeding edge doesn’t bite too much. :slight_smile:

Is it possible in the current implementation, to enable password or psk for the connection to the mqtt server? Right now I have it firewalled off, but ideally I’d like meshtastic to pass a psk or password to auth to my mosquito server. Thank you

Any other settings we need to change to configure our own uplink MQTT with firmware 1.2.39?

I’m trying to point my device to a mosquitto server on a non-standard port (18883), with all other settings standard. All my other test mqtt clients connect fine, but I can’t get my t-beam to connect to it and up-link messages.

I see these and presume I use as follows:
mqtt_server server:port (I use a non-standard port)
mqtt_disabled false (I presume false means not disabled, or is my logic messed up?)

Anything else I’m missing?

From a quick gander at the meshtastic-device code, it appears that a non-standard port might be a deal breaker in the current firmware.
image
The MQTT feature is still pretty new, so that stuff can be parameterized with user preferences in the future I’m sure.

2 Likes

I suspected as much. Thanks for taking a look.

Need info on MQTT?

Read, then watch the video, then read again. You will be amazed how smart you are on MQTT with just that much investment.

1 Like

Oh yes. If someone wants to add a port number parameter (or even better allow a :portnum in the string) I think that would be great!

1 Like
2 Likes

Left some code review comments on your Pull Request.

as you try to configure mqtt with the setServer you split a string and create a local host string which goes out scope immediately. PubSubClients does only keep a pointer to a deallocated string and fails to connect. @geeksville

Sure.It will be incessant

Hey @geeksville and @mc-hamster did the internet gateway component ever get finished? If so, I’m curious to read more about how to use it but am not sure where to start looking. Any pointers? Awesome work!

2 Likes

Hi @anakaine I moved your post here because the top post in this thread has instructions on how to turn on the current mqtt gateway features (it is included in all recent builds)

We’re still working on this feature and alas I think it is still a month or two out for more general usage.

2 Likes

Awesome, thank you! Well, ill be keen to give it a go when my TBeams turn up

1 Like

@geeksville any guide or updates on how to decode the messages seen on the mqtt? I have my own mosquitto server running fine, but cant find a way to decrypt that works (using python mqtt client).

The idea is to decrypt my environmental mesurement messages from nodes. Help or guidance is appreciated!

there is a draft here but it is very much a work in progress:

1 Like

is there a mqtt message size limit? noticed that my mqtt gateway is restarting if message exceeds 64 chars.
thanks in advance if someone can point out the max mqtt message limit.