MQTT Messages not showing in Debug

Hi everyone.

Im using Solar Assistant the trying to get the MQTT messages published from Solar Assistant to run automations. Solar Assistant runs on a RasPi and MQTT is enabled.

I set up the IP:Port and credentials of the RasPI running Solar Assistant in Node-Red and added the same topic I did in Solar Assistant for messages to be published on.

When I add a debug node, I get absolutely no messages coming through ― but when I use the same IP:Port and credentials with MQTT Explorer, it picks up the ±50 messages every second that Solar Assistant is publishing.

Is there something I have missed? Does the MQTT/debug node "dumb down" the messages it receives? I changed the debug node to "complete message object" but still nothing coming through :man_shrugging:t3:

Any idea or help would be welcomed. Thanks in advance everyone :+1:t3:

Cheers,
finch6

Maybe you need the debug to show the ENTIRE message.

By default it only shows the payload.

Just a thought.

You may want to share your flow so that, potentially, we can help.
At the moment, not knowing what you've done or not, it would be pure guesswork...
I'd say that your MQTT in node is not configured correctly.

1 Like

Hi,

So sorry @greengolfer , here is the flow:

[{"id":"efa51561913d9e8d","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"61fd90df65d35515","type":"mqtt in","z":"efa51561913d9e8d","name":"","topic":"SunSynk","qos":"2","datatype":"auto-detect","broker":"467af29fd2996206","nl":false,"rap":false,"rh":0,"inputs":0,"x":180,"y":220,"wires":[["3a0fc2088065372d"]]},{"id":"3a0fc2088065372d","type":"debug","z":"efa51561913d9e8d","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":690,"y":220,"wires":[]},{"id":"467af29fd2996206","type":"mqtt-broker","name":"Solar Assistant","broker":"192.168.0.15","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

This was after being connected for about 10 seconds.

Hi Andrew,

Thanks for the idea ― how do I do this exactly? I thought I had done this by selecting complete msg object instead of msg.?

Yes, that's right.

Your mqtt-in node seems to have the right server IP address - 192.168.0.15.
Check on the security tag that you have the right username and password setup. (if not the status below the node in your flow will not say "Connected".)
You have the topic set to "SunSync" - is that the full topic that you are publishing to, rather than eg "SunSync/something" or "something/SunSync"?

Edit: I just noticed your third picture.
Try changing the topic to SunSync/# (# is an mqtt wildcard)

What MQTT broker do you have?

Adding the wildcard worked like a charm!!!

Messages galore now!!! :grin::grin::grin:

Thanks so much @jbudd!! Wooohooo!!!

If you want to learn more about MQTT then see this tutorial MQTT Essentials - All Core Concepts Explained

Thanks @zenofmud, I'll brush up on my MQTT knowledge :grin:

1 Like

Good to hear all is working.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.