MQTT Manager plugin

Description

The plug-in MQTT Manager allows you to connect Jeedom to an existing MQTT broker or to install one locally or under Docker using the plugin Docker Management.

This plugin is able to combine several features :

Configuration

After installing and activating the plugin, the installation of dependencies should start unless automatic management has been disabled beforehand. In this case, you will have to click on the button Revive to initiate this installation phase.

Plugin Setup

To start configuring the plugin, it is necessary to select the connection mode to the broker from the 3 possible choices :

Once the Mosquitto broker is installed (if necessary), you can continue with the configuration :

Equipment configuration

It is possible to create MQTT equipment directly in the plugin.

You must indicate the root topic of the equipment (test for example), Be careful the root topic cannot have more than 2 levels (exe level1/level2) then depending on the type of commands :

IMPORTANT

The jeedom topic is reserved (this can be changed in the configuration), so do not send anything other than commands to drive jeedom

Jeedom via MQTT

It is possible to pilot Jeedom through MQTT. Here are the different possible topics assuming that the root topic is jeedom (to adapt if you have modified the default configuration) :

Uninstall the Mosquitto broker

2 possible options to uninstall the Mosquitto broker present locally on the machine :

Self-Discovery)

The plugin can auto-discover several types of modules. To do this, you just need to authorize auto discovery on the main page of the plugin and restart the demon.

IMPORTANT

For tasmota type modules it is absolutely necessary that the full topic configuration be %topic%/%prefix%/

Transmit information between two jeedoms by MQTT

With assistant

On the source Jeedom (the one that sends the information) you have to go to the plugin configuration and click on “MQTT Information” at the “Mqtt local transmission” level then copy what is displayed in the window that appears. On the target Jeedom (the one that receives) you must click on “Receive” at the level of “Mqtt tranmission local” and paste the information copied just before.

Manuellement

It is possible thanks to the plugin to transmit commands between two Jeedom (this system is dedicated to replacing jeelink), here is how to configure it :

Then you just have to return to the jeedom still on the plugin configuration and do “Send discovery”

IMPORTANT

This configuration assumes that the jeedoms are connected to the same brocker mosquitto. If you can’t do it, you must configure one of the two mosquittos so that it sends the values of the desired topics to another mosquitto (see next chapter) or go through the assist mode which will do everything for you

IMPORTANT

If you change the value of the “Publication template” field (empty by default) then auto discovery will not create the correct orders, it is up to you to adapt the configuration in this case

Linked two different mosquitto

IMPORTANT

If you used the wizard for local transmission you do not need to follow this part, Jeedom has already done everything for you

It is possible to link topics between several mosquitto, here is the configuration to add in mosquitto. The configuration only needs to be done on one of the brocker mosquitto :

connection #NOM_CONNEXION#
address #REMOTE_ADDRESS#:#REMOTE_PORT#
topic # both 0 #LOCAL_TOPIC#/ #REMOTE_TOPIC#/
cleansession true
notifications false
remote_clientid #REMOTE_CLIENT_ID#
remote_username #REMOTE_USERNAME#
remote_password #REMOTE_PASSWORD#
local_username #LOCAL_USERNAME#
local_password #LOCAL_PASSWORD#
start_type automatic

Example you want to send equipment from jeedom_2 to jeedom_1 by having :

Here is the configuration that must be added in jeedom_2 (mosquito parameter) :

connection jeedom_1
address 192.168.1.45:1883
topic # both 0 jeedom_2/ jeedom_2/
cleansession true
notifications false
remote_clientid jeedom_2
remote_username jeedom
remote_password password_1
local_username jeedom
local_password password_2
start_type automatic

NOTE

  • #NOM_CONNEXION# : can be whatever you want and it doesn’t matter. You can for example do name_jeedom_source-name_jeedom_target
  • #REMOTE_CLIENT_ID# : doesn’t matter either, you just have to put a unique string
  • #LOCAL_TOPIC# : name of the local topic often it will be “Jeedom root topic” of the local jeedom
  • #REMOTE_TOPIC# : name of the local topic often it will be “Jeedom root topic” of the remote jeedom

IMPORTANT

In jeedom the identifiers (username and password) are available on the plugin configuration page in “Authentication” in the form username:password

Linked to Jeedom through the internet

IMPORTANT

You only need to do this if your Jeedoms are not on the same local network. If you do this with two Jeedoms on the same local network you will have performance issues, reliability and losses in the event of an internet outage (or maintenance of the Jeedom cloud). To summarize this configuration is to be used as a last resort

To connect Jeedoms through the internet there are several possibilities: you can deploy a mosquitto at a cloud host or open one of your mosquittos on the internet (be careful with security in the event of a problem Jeedom cannot be held responsible). Or use the Jeedom cloud service (only case covered in this documentation)).

IMPORTANT

Jeedom cloud service is not yet open to users we must first ensure that all load and reliability tests are ok

To use the Jeedom cloud service it’s very simple, on the source Jeedom (the one that sends the information) you just have to go to the plugin configuration and click on “Send” at the “Jeedom cloud” level, then you have to note “Jeedom cloud identifier”. Then go to the target Jeedom (the one that receives the information) and in the plugin configuration click on “Receive” and indicate “Cloud Id” of the source (retrieved in the previous step).

That’s it, it’s finished, all you have to do is on the source Jeedom check the equipment to transmit then click on “Send discovery” in the configuration of the source Jeedom plugin.

IMPORTANT

The Jeedom cloud service only works with Jeedoms linked to the same market account, it is not possible to transmit information between Jeedoms on different market accounts

FAQ

Following an update of the system packages (apt) or an unattended upgrades, nothing works anymore

Updating the mosquitto package resets the service file to default and therefore mosquitto no longer points to the correct configuration file. To correct this, it’s very simple, just restart the installation of mosquitto from the plugin configuration page.

Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site web. Si vous continuez à utiliser ce site, nous supposerons que vous en êtes satisfait.