How to use MQTT from CLI - I need to publish from CLI

Hello,

Apologies for the delayed response.

If you are looking to install 3-rd party OPKG packages, please take a look at this post here.

When it comes to using MQTT from the CLI, I would suggest using mosquitto client:

opkg -e /etc/opkg/openwrt/distfeeds.conf update

opkg -e /etc/opkg/openwrt/distfeeds.conf install mosquitto-client-ssl

Then, you should be able to use mosquitto_sub and mosquitto_pub to subcribe and publish, respectively. For more information, I would recommend visiting mosquitto manual page here.

Kind Regards,

1 Like