Opening SqueezeboxSpeak up to IFTTT - is this possible?

Tags: #<Tag:0x00007f616f9ccb38> #<Tag:0x00007f616f9cca70> #<Tag:0x00007f616f9cc9a8>

I’ve been trying to figure out if it’s possible to share my squeezebox binding and more specifically the squeezeboxSpeak abilities of the binding, with myopenhab to be able to control it with IFTTT commands. For example, a website down notification from IFTTT would cause a string of text to be announced, or a specific email sender notification would start a different string announcement.
Is it possible to define a SqueezeboxSpeak item, and how would the syntax look? Or if not, does anyone have any clever workaround ideas that I could try to implement?

I don’t know the squeezebox, however if it is listed on PaperUI as an audiosink, the later part ( converting a text to speech and sending it to a audiosink) will work.

Assuming you are using the 2.0 Version, this should give you the basic idea:
tl;dr: you need to set up a TTS engine and then you can use the “say” command in any of your rules.
If you want the announcement to play on your mobile while outside your local LAN (I guess that is what you indent as you mention myopenhab), that might be tricky.

Thanks, I’m still working on 1.8 and have been hesitant to move forward because I just got everything working smoothly. Also, I am scared of change. Can the ‘Say’ command be called from myopenhab? It’s not to play on outside devices, but because the inputs would be coming from IFTTT so they need to be ‘shared’ openhab items as far as I understand.

The say command can be used in rules, which in turn can be triggered by several events. The most obvious is a on/off button. Having an account on myopenhab allows to use openhab remotely with the habdroid (android ui app).

Right, I have several items listed in myopenhab that I had to add to the cfg file and these items are accessible through myopenhab (and by extension, accessible to IFTTT as well). I have added switches and a temperature reading (Switch item and string item). But how would I go about adding a ‘speech item’ or what is the trick? Like make a dummy switch item, use a rule to have that switch item say something when activated and then sharing the switch item in myopenhab? Did I answer my own question?

In short, Yes!
That way, the only open point is, where to get the text . I guess you want to have it say something that is not fixed.

Well, in some cases a standard notice will work fine, but looking into it further I came across the XSLT transformation, perhaps I could use something like that or the REGEX transformation to find dynamic input for the spoken string?

I’m using my habpanel GUI which takes a string input to send to the audiosink ( “Get up, breakfast is ready”). But that can’t be used from the outside. In your case al depends on what is to be said. Anything relating to a item state would be rather easy to be transformed to an usable text string.
For example: When using a special device to detect the presence of a person, upon detection a nice welcome could be used (“Captain arrived on board”)

I’m have done a bit of research and found parsehub, where I can create a website parsing api that I can call through a python script and turn into a string item, turning it into a completely dynamic string input that can then be fed to squeezeboxsqeak.
So far I have just tested it with the current local weather conditions and everything works. The only issue right now is with squeezbox itself, it seems to want to restart the music playlist automatically after a TTS command even if there was no music before. Anyways, that’s outside of the scope of this question, time to do some more digging I guess.

Just for the sake of posterity, after a bit more tinkering I realized that parsehub was a bit of a pain with dynamic content (the runs wouldn’t update when text on the page changed). I ended up using a regex transformation instead and it works great even with page updates.