How to play custom audio files when switch turns ON/OFF

Hello my friends,

this is my first post and I even do not know if someone will read this message. But I will try.
First of all what I would like to mention I am from Slovak republic and my english is still in learning progress, so appologize for mistakes.
Basically what I would like to do is to play custom ~10 seconds audio files such as mp3, wav… from my android device (tablet or phone) when I turn on/off light, switch, motion detected, routine …
I do not want to use very expensive Sonos or other WiFi speakers.
Reason is simple: Countries like Slovakia, Czech republic where people do not speak English this is the only way how to make it possible.

I am able to do it, when I use this methods:
1st method) BigTalker2 + VlcThing using my computer - Windows solution

  • during BigTalker2 installation I choosed ON=Music Player and then I used command %mp3(url)%.
  • this option would be great but I need to have computer ON all the time and VLC player just play sometimes half message, sometimes only one second, sometimes when BigTalker occur 2 sounds VLC player goes crazy, sometimes delay is ~3 seconds to play a message.
  • not applicable for Android devices and I can only play this message from my computer (or using just maximum 2 bluetooth devices using StereoMix setup.

2nd method) BigTalker2 + Lannouncer/LanDroid - Android solution

  • during BigTalker2 installation I choosed OFF=Speech Synthesis and then I used command @#ALARM=FILE1 (when I use ON=Music Player like in 1st method Lannouncer is not working)
  • I am able to choose only 5 files :smiley: which are applicable only for premium members. I do not understand why there are limitations when you are premium member or when these audio files are located on my side. It would be really great if I could choose command like @#HTTP=MP3_URL_LINK or to play unlimited audio files for premium members.
    This is the best option, because it is not freezing, audio file plays immediatly when light is on, motion detected etc… with no issues at all!

3rd method) SharpTools plugin + Tasker - Android solution

  • what I did: I buyed SharpTools Plugin from Sharptools app. I subscripted switch to be able to use in Tasker. I openned Tasker and did following set-up:
    Event - Plugin - Sharptools - clicked on pencil icon - choosed device.
    then action Media - Music Play - mp3 file choosed - IF %st_attr_value ~ on
    Reason why I am not using SharpTools dashboard because it takes 2 seconds longer to trigger things than ActionTiles. So for that reason I am using ActionTiles dashboard instead of SharpTools. I was hoping that SharpTools plugin would act better but is not. It takes ~5 seconds to play an audio file.
    Sometimes same message plays 2 times, sometimes play 1 second from audio files then stop and right away play whole message. However it takes a long time to play a message.

From these options I would choose Lannouncer but there are limitations.

I do not know how to use WebCore, so I preffer other methods. I am not willing to buy Sonos. I want to use Android devices (I have 3 mounted HUAWEI M2-A01L tablets) or Windows computer (but only if it will be working properly)
I was thinking about if there is any different app than Lannouncer which can be used for smartthings or any smartthings plugin (except SharpTools plugin) which I can connect to Tasker.
I have Smartthings HUB 3rd version (directly connected to modem), ActionTiles, SharpTools dashboard+plugin, Tasker, all kind of smart devices…

Do you have any good solution in this year 2020 ?
Thank you.

Year 2020 indeed and this kind of functionality is surprisingly hard to do. In my old Domoticz system I used (actually it’s still in use) RasPi connected USB powered speakers with voicerss.org. That works in many languages. I have even planned to utilize my Domoticz “speaker” in ST with URI_switch -> Domoticz virtual switch -> voicerss. But I really want to get rid of those old RasPis of mine… Maybe Sonos/Ikea Symfonisk is the route for me after all.

1 Like

For the SharpTools Tasker Plugins, one thing you might try is to make sure you’ve run through all the deoptimization steps noted in the following article:

You’ll want to make sure both SharpTools and Tasker have been whitelisted in any battery management features. If the Android device has any Data Saver features, you’ll also want to make sure those are disabled or SharpTools and Tasker are at least whitelisted.

Note that the SharpTools Tasker Plugin push events are pushed directly from SmartThings to Google and down to your Android device. So if your device/connection is slow to receive push notifications (eg. high latency in your country)… then it might not be the ideal solution in your case.

Lannouncer can communicate directly over your LAN, so it might be a good solution in your case.

Alternatively, you could try pushing events down to your Android with Pushbullet or Pushover. Both of these apps are focused on push messages, so perhaps they will be faster (though the both rely on Google Cloud Messaging as well). To do this, you could either use one of the DTHs here in the community, or you can use the SharpTools.io Rule Engine which can send messages via both Pushbullet and Pushover.

(One other option you could try is using the AutoRemote Tasker Plugin which has a built in HTTP server that operates on the LAN. You would need a custom DTH to communicate to it. I’ve done something similar on other platforms.)

Edit: Please feel free to reach out to support@sharptools.io if you would like to troubleshoot the 2 second delay on your SharpTools dashboard. We are happy to help!

1 Like