Announce custom track 4.x
Getting now back to test Lox Audio Server for all the features I need, I tested again to play a custom audio file as announcement/overlay (as already tested in https://github.com/lox-audioserver/lox-audioserver/issues/63) wtih Lox Audio Server 4.x, and I still have the same issue:
It does not matter if I use
serviceplayorplayurl, the current playing song is interrupted and not resumed after the selected file is played. https://github.com/lox-audioserver/lox-audioserver/issues/63#issuecomment-3701917196
Trying with
http://10.4.200.60:7091/audio/7/serviceplay/library:local:track:b64_bGlicmFyeTovL2xvY2FsL0FDSFRVTkctd2FzY2htYXNjaGluZS13YXNzZXItYXVzZ2VsYXVmZW4ubXAz
gives the feedback Playback error: no playback sources resolved.
Tried also this commands, but they always did not resume the previous playback.
http://10.4.200.60:7091/audio/7/library/play/library:local:track:b64_bGlicmFyeTovL2xvY2FsL0FDSFRVTkctd2FzY2htYXNjaGluZS13YXNzZXItYXVzZ2VsYXVmZW4ubXAz
http://10.4.200.60:7091/audio/7/serviceplay/library/library:local:track:b64_bGlicmFyeTovL2xvY2FsL0FDSFRVTkctd2FzY2htYXNjaGluZS13YXNzZXItYXVzZ2VsYXVmZW4ubXAz
http://10.4.200.60:7091/audio/7/playurl/library:local:track:b64_bGlicmFyeTovL2xvY2FsL0FDSFRVTkctd2FzY2htYXNjaGluZS13YXNzZXItYXVzZ2VsYXVmZW4ubXAz
The function block of the audio player would also have the input Cs for it. There you can specify the file which should play and at which volume: mycustomaudiofile.mp3:55
Tried also with library:local:track:b64_bGlicmFyeTovL2xvY2FsL0FDSFRVTkctd2FzY2htYXNjaGluZS13YXNzZXItYXVzZ2VsYXVmZW4ubXAz:55 but very likely this is not implemented yet?
[2026-02-23T15:09:28.312Z][SPAM][LoxoneHttp] [command=audio/grouped/playeventfile/7~55/Event_Sounds/mycustomaudiofile.mp3 name=msHttp remote=10.4.200.77] loxone ws message received
[2026-02-23T15:09:28.312Z][DEBUG][LoxoneHttp|Processor] [command=audio/grouped/playeventfile/7~55/Event_Sounds/mycustomaudiofile.mp3] command received
[2026-02-23T15:09:31.665Z][SPAM][LoxoneHttp|Notifier] [artist="Unknown Artist" duration=0 mode=stop sourceName=504F94FF1BB6 time=0 title=mycustomaudiofile zoneId=7 zoneName="07 Manu's Büro"] audio_event payload
[2026-02-23T15:09:31.666Z][SPAM][LoxoneHttp|Notifier] [zoneId=7] audio_event broadcast
Goal is to play custom short audio files while anything other is playing and then resuming the previous state. Something like the bell and TTS does, only with my custom file. If then it would also be possible to play this with another volume level would be also a nice feature, but not as important as the first one.
@simon2207 would you be able to make a test for me, if the custom sound is played as announcement or just as normal file? The difference is, that an announcement restores the previous state after the sound finished and a normal file not.
This is by (Loxone’s) design. You’re using the regular play commands, which are intended for starting library playback when selecting tracks from within the Loxone app. They are not designed to temporarily interrupt playback and then resume the previous track afterwards.
We can implement a dedicated/custom command for that use case, but the playevent file mechanism already fits this behavior quite well. I’ll implement support for that in the next version.
If we find we need additional functionality beyond what playevent can provide, we can revisit this and introduce a custom command.
@mr-manuel yes I will do that - currently I m busy due to some family topics - will get to that task tomorrow
We can safely assume that playback will resume afterwards. This command is specifically designed for events, not for normal music playback. That implies temporary interruption behavior by design.
That said, the exact behavior is ultimately up to us — we control the implementation.
It’s trivial to implement, and I already have a basic version running. We can extend the existing playeventfile command with an additional parameter to support URL playback.
Original command (event file from local event_sounds folder):
http://192.168.1.209:7091/audio/grouped/playeventfile/27~55/Event_Sounds/diamond_tunes-cinematic-sound-effect-327618.mp3
Custom command (event playback from external URL):
http://192.168.1.209:7091/audio/grouped/playeventfile/27~55/custom_url/https://file-examples.com/storage/fee9adcbcc699c8da9bfe47/2017/11/file_example_MP3_5MG.mp3
After the alert/event has finished, playback will automatically resume.
This will be included in the next beta.
Did you already test this?
@rudyberends no - sorry - I m currently on vacation with limited access to my setup.
@mr-manuel @rudyberends
Back at my desk -
What I did:
Orignal Audioserver start playing music in one original zone, made an announcement in that zone via Loxone app - the music resumes after the announcement - everything fine.
Lox-Audioserver start playing music in one lox-audioserver zone, made an announcement in that zone via Loxone app - the music resumes after the announcement - everything fine.
maybe I miss something - but for me everything runs fine with custom announcements under 4.x Beta 8.
We can safely assume that playback will resume afterwards. This command is specifically designed for events, not for normal music playback. That implies temporary interruption behavior by design.
That said, the exact behavior is ultimately up to us — we control the implementation.
It’s trivial to implement, and I already have a basic version running. We can extend the existing playeventfile command with an additional parameter to support URL playback.
Original command (event file from local event_sounds folder):
http://192.168.1.209:7091/audio/grouped/playeventfile/27~55/Event_Sounds/diamond_tunes-cinematic-sound-effect-327618.mp3Custom command (event playback from external URL):
http://192.168.1.209:7091/audio/grouped/playeventfile/27~55/custom_url/https://file-examples.com/storage/fee9adcbcc699c8da9bfe47/2017/11/file_example_MP3_5MG.mp3After the alert/event has finished, playback will automatically resume.
This will be included in the next beta.
@mr-manuel : The "did you already test this" was meant for you. This should work in the recent betas.
Not yet, I just received my original Loxone AudioServer, so I can compare better and test. Will do some tests until sunday.
The announce-with-resume use case is supported via the playeventfile command (not the regular library-play commands, which intentionally don't resume):
Local event sound: audio/grouped/playeventfile/7~55/Event_Sounds/mycustomaudiofile.mp3 Custom external URL: audio/grouped/playeventfile/7~55/custom_url/https://example.com/sound.mp3
The ~55 sets the announcement volume. Both route through the alert mechanism, so the previous track resumes once the sound finishes.
Closing as resolved — reopen if it doesn't behave as expected on the latest beta.