MQTT Broker and integration driving me nuts

At the moment i’am playing around to get MQTT working. Installed the latest version ( Mosquitto broker 6.0.1 ).
The broker log tells me :

`[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] mosquitto.sh: executing... 
[11:17:51] INFO: SSL is not enabled
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[11:17:52] INFO: Starting NGINX for authentication handling...
[11:17:52] INFO: Starting mosquitto MQTT broker...
1621934272: mosquitto version 1.6.12 starting
1621934272: |-- *** auth-plug: startup
[11:17:52] INFO: Successfully send discovery information to Home Assistant.
[11:17:52] INFO: Successfully send service information to the Supervisor.
1621934272: Config loaded from /etc/mosquitto/mosquitto.conf.
1621934272: Loading plugin: /usr/share/mosquitto/auth-plug.so
1621934272:  ├── Username/password checking enabled.
1621934272:  ├── TLS-PSK checking enabled.
1621934272:  └── Extended authentication not enabled.
1621934272: Opening ipv4 listen socket on port 1883.
1621934272: Opening ipv6 listen socket on port 1883.
1621934272: Opening websockets listen socket on port 1884.
1621934272: Warning: Mosquitto should not be run as root/administrator.
1621934272: mosquitto version 1.6.12 running
1621934272: New connection from 127.0.0.1 on port 1883.
1621934272: Socket error on client <unknown>, disconnecting.
1621934272: New connection from 192.168.1.120 on port 1883.
{"result": "ok", "data": {}}1621934272: New client connected from 192.168.1.120 as shelly1l-F4CFA2E3A316 (p2, c1, k60, u'MQTT').
1621934394: New connection from 172.30.32.1 on port 1883.
1621934394: New client connected from 172.30.32.1 as 2X8pXRI7w8LITyvsxlRWjE (p1, c1, k60, u'MQTT').
1621934394: Client 2X8pXRI7w8LITyvsxlRWjE disconnected.
1621934394: New connection from 172.30.32.1 on port 1883.
1621934394: New client connected from 172.30.32.1 as 1wPCGDQelKjwB8xmjksXFK (p2, c1, k60, u'MQTT').
1621934407: New connection from 192.168.1.14 on port 1883.
1621934407: New client connected from 192.168.1.14 as 2zOt7D8b7Ft6WVoKY8z4Se (p1, c1, k60, u'MQTT').`

So i think the broker is working and configured okay .

I stared using 2 pieces who i try to connnect to this broker :

  1. Shelly 1L , in the log ; shelly1l-F4CFA2E3A316
  2. ESPEasy (Ducobox : link to github Ducobox

The intergration is configed, and when i used the “#” to listen

so it tell me that some trafic is recieved, but there’s nothing showed in the integration ( while te how-to tells me that within minutes the show up, so i waited 30min)
6

i already tried to delete / remove and re-install the MQTT broker and integration, but i can’t get this to work

Is there hopefully somebody who can help me with this ?

If you are not using discovery (or the Shelly integration) you need to define the entities you want in yaml.

Some of mine:

binary_sensor:

- platform: mqtt
  state_topic: "shellies/shelly1_kitchen/input/0"
  name: "Kitchen Shelly SW"
  payload_on: '1'
  payload_off: '0'
  qos: 1

- platform: mqtt
  state_topic: "shellies/shelly1_lounge_front/input/0"
  name: "Lounge Front Shelly SW"
  payload_on: '1'
  payload_off: '0'
  qos: 1

- platform: mqtt
  state_topic: "shellies/shelly1_lounge_rear/input/0"
  name: "Lounge Rear Shelly SW"
  payload_on: '1'
  payload_off: '0'
  qos: 1

Discovery is just the thing I want to use , but doesn’t seems to work

Do the devices support discovery?

Shelly doesn’t. It has its own integration. Use that instead if you don’t want to manually configure mqtt entities.

Looks like you have to write your own ESPEasy discovery rules too: Wonder what that button does: Home Assistant MQTT discovery with ESPEasy I recommend you use ESPHome instead. It has an API that supports discovery without needing you to do anything.

I can’t find if ESPEASY with MqTT selected does support discovery. What I can find that this is a feature request within the ESPeasy git community, not if it’s available or pushed .
This is the way I found seems to be the "easiest " KnatteAnka/NodeRED_ESPEASY_AutoDiscovery 10

So I don’t think that ESPeasy support discovery

So what should be the config for : DucoBox
This is an ESPEasy plugin,but i can’t find any clue how to set this up.
Had to learn a lot about MQTT i think :thinking:

No idea sorry. I use ESPHome, not ESPEasy.

From the article I linked above you have to write a script to publish the discovery message on every boot. It would probably be easier just to set the entities up manually.

1 Like