question

jmq1961 avatar image
jmq1961 asked

Instructions for the Venus OS 3.20 MQTT fix

I made the MQTT working again as before.

Here a detailed setup i did.

Please read the file.Venus320MQTTOK.pdf

MQTT
venus320mqttok.pdf (103.9 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey @JMQ1961 what is this about? From what software or device are you trying to connect to MQTT?

With the software we use and tried it works fine.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jmq1961 avatar image
jmq1961 answered ·

I wrote this for a friend. He has no other MQTT server.

He uses OpenDTU for reading Out the Hoymiles inverter,

1708332754252.png

OpenDTU will not connect when no user is set.

Once connected with a User name and Password MQTT Data is send to flashmq.

1708333219322.png

Now Node-Red can read the incoming MQTT data

here is the Node-red Screenshot

1708332958255.png



1708332754252.png (58.3 KiB)
1708332958255.png (438.6 KiB)
1708333219322.png (124.5 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey again,

I think the problem your friend was having is the one described in our below text.

The solution in your PDF suggests modifying Venus OS, which is not easy to do and any changes made will be gone once another firmware update is installed.


Please check!


----


Finally, and this is the same issue (2) above that CeriW ran into: there is a difference between how Mosquitto and FlashMQ treat anonymous logins on MQTT. Mosquitto treated the specifications a bit loosely, and accepted an empty username. FlashMQ is more strict, and if during login the client says that there is a username, it also expects one. And if there is none, it refuses to connection.

On some clients and implementations that works fine; but - as clear now - there are also implementations on which that gives a problem. What you see then is that the software you're using is unable to connect.

And if you'd look in the logs on the GX device, you'd see this:

[ERROR] Unspecified or non-MQTT protocol error: Username flagged as present, but it's 0 bytes.. Removing client.

To work around this, configure a username and password in the MQTT software you are using. Then FlashMQ will accept the connection, even though there is no username or password required.

This workaround does *not* require you to login to the GX command line and make changes there.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources