--- a/PluginMqttMonitor.py Sun Apr 25 17:57:43 2021 +0200 +++ b/PluginMqttMonitor.py Thu May 13 18:15:49 2021 +0200 @@ -24,7 +24,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "3.0.0" +version = "3.1.0" className = "MqttMonitorPlugin" packageName = "MqttMonitor" shortDescription = "Plug-in implementing a tool to connect to a MQTT broker" @@ -239,5 +239,18 @@ Preferences.Prefs.settings.setValue( self.PreferencesKey + "/" + key, value) + +def installDependencies(pipInstall): + """ + Function to install dependencies of this plug-in. + + @param pipInstall function to be called with a list of package names. + @type function + """ + try: + import paho.mqtt # __IGNORE_WARNING__ + except ImportError: + pipInstall(["paho-mqtt"]) + # # eflag: noqa = M801