I have a value under milight/states/0x1/fut089/1.

What I'm trying to do is to replicate this to milight/states/0x[2..4]/fut089/1

Description of the mqtt structure

I've already tried the following config:

connection milight-forwarder
address localhost:1883
cleansession true
topic # out 0 milight/states/0x1/ milight/states/0x2/
topic # out 0 milight/states/0x1/ milight/states/0x3/
topic # out 0 milight/states/0x1/ milight/states/0x4/

The first one seems to work somehow but it replicates all of the values (1,2,4). If I append a 1 to the source and the destination mosquitto throws these errors:

1591289258: Connecting bridge (step 1) milight-forwarder (localhost:1883)
1591289258: Connecting bridge (step 2) milight-forwarder (localhost:1883)
1591289258: New connection from ::1 on port 1883.
1591289258: New bridge connected from ::1 as RasPi.milight-forwarder (p2, c1, k60).
1591289258: Invalid unsubscription string from RasPi.milight-forwarder, disconnecting.
1591289258: Socket error on client RasPi.milight-forwarder, disconnecting.
1591289258: Socket error on client local.RasPi.milight-forwarder, disconnecting.

I'm using mosquitto version 1.6.8.

Documentation wasn't helpful to me :/

Any help here?

1 Answer 1


I don't get the unsubscribe error, but I do get the same effect of only the first mapping taking effect.

Without digging into the code I'm going to assume that the bridge is stopping at the first matching pattern, which in this case is # which matches everything.

This makes sense, especially when we remember that loopback bridging to the same broker is really just a nasty hack.

I'm using 1.6.8 on Ubuntu rather than raspbian but it should be the same.

  • So how can I change the maching pattern that it does apply correctly? Jun 5, 2020 at 14:03
  • You are going to have write a small app that does the republishing
    – hardillb
    Jun 5, 2020 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.