MQTT node and binary data (OpenWeatherMap icons)

So I’m poking at the MQTT node.

I want to upload the OpenWeatherMap weather icons to my broker so my IoT devices can access it.

The workflow generates the link to this icon which I’d like to make available via MQTT:
Icon: https://openweathermap.org/img/wn/[email protected]

Welcome to the community @mrmay!

Honestly do not much about MQTT (actually nothing) and so do not know if it supports binary data, but I know that not matter what, the n8n node does currently not support it.

So if you want to send binary data via MQTT you would have to for example convert it to base64 first and then send the data like that. The receiving side can then convert it back to a binary file again.

Thanks @jan :wave:

Ok, that helps. I know that binary files can be sent over MQTT. It’s listed in the mosquitto_pub man page. A command like mosquitto_pub -t broker/topic/here -f file would work.

For now I’ll use an SHH node to execute the command. Might be fun feature to add to the MQTT node.

Cheers!

1 Like

Ah yes, then would for sure be a good addition to the node!

Glad to hear that you found a workaround!

1 Like

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