[SOLVED] Audio MP3 Notification via MQTT 2.4

Dear Fellow Members, Happy new year !
Wonder if I could get some help on this, I have tried to look for the solution on forum but not much success apart from some tricks I came to know for MQTT string items, but so far it’s not working in my current setup…
Trying to use this (MP3 Player) for audio notification when door is opened/closed or beam sensor is triggered. MP3 files are stored on sd card on this DF Player module so it’s complete local and cloudless source.
It works when I send mqtt command using console (cmnd/Sound/mp3track 01).


I am on openhab 2.4 using paperui I have created generic mqtt thing and tried following two configurations without any success


this is my rule file where I have used SoundDummy switch to trigger this action.

But, I get this error when I trigger dummy switch :

Could really use some push :slight_smile:
many thanks.
cheers.

The command topic should be
cmnd/Sound/mp3track

Create an item linked to the channel you just created:

String "TrackNumber" { channel="mqtt channel fron PaperUI" } // Copy and paste the channel id

Rule:

rule "Audio Noficication"
when
    Item SoundDummy received command ON
then
    TrackNumber.sendCommand("01") // Note that it's not a number but a string
end
1 Like

That worked !!! Brilliant :grinning:
thanks very much :+1: