Difficulties with wildcard use


#1

Wildcard usage
Hello,
I am trying to use wildcard for the following topic tree (in micropython and kodular):
casa

  • interruptores
    • switch1
      • estado:0
      • modo:1
    • switch2
      • estado:1
      • modo:2
  • sensores
    • temperatura
      • hora:“11:13:00”
      • grados: 17.5

When I subscribe at casa/# I receive the information about all the topics, as well as I receive information when I use the paths:
casa/interruptores/switch1/#
casa/interruptores/switch2/#

However, when I try to receive the information only from the switches (switch1, switch2… up to switchn) using:
casa/interruptores/#
do not receive any information.
Will I have to do anything else to achieve this? Any configuration changes I need to make?
I will appreciate your help.


#2

Hello,

For the scenario you propose and the topic tree, we see it as correct.

But a requirement to receive, is that producer and receiver must be connected and topic filter must match the topic of the message, or the receiver must be connected with cleanSession=False + Subcribe with Qos1/Qos2 to receive it in the next connection (assuming messages sent are QoS1 or QoS2 too).

Reviewing your case, we see that you are fine with the topic filter but with a Qos0 subscription, and also producing messages with QoS0. In that scenario you will only receive the message while both devices are connected.

kind regards