Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PLUGIN] MQTT Pub & Sub - Support Page

Featured Replies

Hi!

 

I wanted to publish some data from my unraid server to mosquitto so I can see and track it in Home Assistant.

This plugin is the result and gives you the ability to publish custom data to your own mqtt data broker.

You can also subscribe to a topic when you have an usecase for that, or just simply for debugging.

 

For more information take a look at the github repository.

 

Here is a quick example. I used the data provided from my corsair power supply:

image.thumb.png.3ef44eba1bb5902f5cdde0546f762f52.png

Edited by giganode

How to set what to publish ?

  • Author
1 hour ago, Vr2Io said:

How to set what to publish ?

Please take a look at the example in the about linked GitHub repo. 
 

as this is very custom from user to user there is no gui, at least for now.
You need to manually extract the data you want to publish.

 

On the other hand devs can use this plugin in combination with their own to add more functions.

 

in the near future I will add preconfigured mqtt export to the corsairpsu plugin. Users will have the ability to activate that feature when they have MQTT Pub and Sub installed.
 

 

Thanks a lot for sharing this useful app. I'll definitely try it. My unraid is also powered by Cosair PSU. I'm looking forwards to your future development.

I'm using Glances docker container on Unraid and Glances integration on Home Assistant (that provides 1000+ entities) for this purpose.
image.thumb.png.dbf599f7e00cf13530c23d45906b7ab3.png

  • Author
3 minutes ago, bthoven said:

Thanks a lot for sharing this useful app. I'll definitely try it. My unraid is also powered by Cosair PSU. I'm looking forwards to your future development.

I'm using Glances docker container on Unraid and Glances integration on Home Assistant (that provides 1000+ entities) for this purpose.
image.thumb.png.dbf599f7e00cf13530c23d45906b7ab3.png

Which PSU model do you have installed?

Corsair CV450.

  • Author
6 minutes ago, bthoven said:

Corsair CV450.

Ah okay. Sadly, you won‘t get any data from your PSU. It doesn‘t have the usb connection.

It's not a server-grade PSU, but it provides ample power for my Unraid setup. Thank you.

Settings page is blank for me

  • Author
On 10/26/2024 at 3:17 AM, stayupthetree said:

Settings page is blank for me

That is correct. At the moment it is empty. On next release you can edit the credentials there.

  • Author

New release has a form on the settings page to enter credentials and a few smaller changes.

 

I recommend removing the plugin and reinstalling it. After that, go to settings page and set up your mqtt data broker.

I don't have a user & password for my MQQT - can this handle that?

 

mosquitto_pub: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

 

Edited by dopeytree

  • Author
13 minutes ago, dopeytree said:

I don't have a user & password for my MQQT - can this handle that?

 

mosquitto_pub: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

 

So you are allowing unauthorized access? I don't have a setup like this but I would just try the commands without the -u and -P flags.

 

But what about your libary issue? What command did you execute?

  • Author

I updated the template for publishing because I wanted to have the command line for publishing shortened:

 

#!/bin/bash

source /boot/config/mqttcredentials

if [[ -z "$MQTT_HOST" || -z "$MQTT_PORT" || -z "$MQTT_USER" || -z "$MQTT_PASSWORD" || -z "$MQTT_CLIENT_ID" ]]; then
  echo "Error: Information missing."
  exit 1
fi

MQTT_URL=mqtt://$MQTT_USER:$MQTT_PASSWORD@$MQTT_HOST:$MQTT_PORT/$MQTT_CLIENT_ID

mosquitto_pub -L "$MQTT_URL/sensor/voltage" -m "{\"voltage\": $voltage}"

 

The old template can still be found in the repository.

  • 2 weeks later...

how do you install the mosquito client tools (Mosquitto_pub/sub on unraid. I don't see it in nerd tools

It's in the Spotlight of the Unraid 'app store'. 
Or did you mean the mosquito broker? If so that's docker container also in the app store.

  • Author
On 11/13/2024 at 3:48 PM, Faspina said:

how do you install the mosquito client tools (Mosquitto_pub/sub on unraid. I don't see it in nerd tools

 

You can find the plugin in Community Applications.

I too am getting the following msg:  mosquitto_pub: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

My broker is set up on another system and I have all the host, port, username, pw and client_Id setup.  

 

 

  • Author
8 hours ago, LABob246 said:

I too am getting the following msg:  mosquitto_pub: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

My broker is set up on another system and I have all the host, port, username, pw and client_Id setup.  

 

 

 

Please share the command line used. I might have an idea.

10 hours ago, giganode said:

 

Please share the command line used. I might have an idea.

I'm getting the same libssl error running both the old and the new publishing scripts via user scripts

  • Author
19 minutes ago, martindell said:

I'm getting the same libssl error running both the old and the new publishing scripts via user scripts

 

Can you search for these files?

 

root@Node:~# ls /usr/lib64/libssl*
/usr/lib64/libssl.so@  /usr/lib64/libssl.so.3@

 

When I run ls /usr/lib64/libssl* I get the following:

/usr/lib64/libssl.so@  /usr/lib64/libssl.so.1.1@

 

 

  • Author
8 hours ago, LABob246 said:

When I run ls /usr/lib64/libssl* I get the following:

/usr/lib64/libssl.so@  /usr/lib64/libssl.so.1.1@

 

 

 

Ok, so you are missing the required library. The new version is available with Unraid 7.0.0.

 

Seems like I should set the min OS version to 7.0.0

Edited by giganode

  • 1 month later...

Hi.

Where do I need to push the config file please ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.