Difference in behaviour from Snap6 to Snap7


I wonder if you could help out with this? :slight_smile:

I've an issue with the MQTT library from Xavier Pi (which I'm converting to an extension) in Snap 7

As you know, my JS knowledge is very limited :slight_smile:

I've come up with a small example which shows the issue

In Snap6 it works as expected with all 3 key presses


But not in Snap7


Using key press 2 - the broadcast connection made block doesn't seem to be executed

The reason I'm concerned about this is that I'd like the user of the MQTT library to be able to use the callback feature, with or without the JS parameter being used.

I'd like to leave it to the user to decide what they want to do.

Are there any solutions available in the JS code that could get around the Snap7 behaviour.

Or should I file a bug report

I'm reluctant to do so, as not using official AP. So might just have to live with new behaviour

Works for me
untitled script pic - 2022-02-08T180921.859
It seems that the redundant parameter was used as destination for broadcast.

If You are courageous enough...

Thanks for working out what the issue was

I'll have to have a play and a think about it


I've come up with the workaround of sending "all" from the JS

                let p = new Process();
                p.initializeFor(callback, new List(["all"]))
                //log('Callback process pushed');

which works for me in my block

Thanks again for working out what was going on :slight_smile: