Repository navigation
Flow Examples
- Play an announcement
- Play a sound before speech
- Translate a message
- Search YouTube
- Combine translation and speech
- Maps examples
Use Homey's Advanced Flow editor and a manual Start for tests. Save before running. Text in code is an example you can enter; insert named tokens using Homey's token picker.
Before you start: set up Text-to-Speech and a speaker with a Homey action that accepts an audio URL. For cloud speech the speaker must reach Homey on port 47333 and support your encoding (MP3 by default).
Illustration: connect the speech action's Url output, not the Text token, to your player's URL input.
- Connect Start to Start TTS with voice at speed with pitch (with tokens). Enter
Dinner is ready.Choose an English voice, set Speed to1and Pitch to0; leave device pitch at0too. - Connect the successful output to your speaker's play-URL action. Put the speech action's Url token in the player's URL argument.
- Add a private failure notification on the speech action's error path. Save and run: you should hear the sentence. Duration is audio length in milliseconds, not a playback acknowledgment. If the Flow succeeds but there is no sound, check the player and URL.
For regular Flows or waiting conditions, make one enabled Flow with Url triggered for the same speech device, passing its Url token to the player. A different Flow can then run Start TTS. Choose either this trigger route or the direct token connection for the same player; cloud token actions also fire the trigger. For Non-Cloud speech use its own Start TTS action or Url triggered card and a short text up to 200 characters.
This follows the app author's announcement tutorial. Edgar's Advanced Flow routes announcements by room with sensors and variables; Google Services doesn't determine your room.
Use Music Url Converter only on Homey models with supported speaker playback. With the setup above, connect the speech action's Url token to Music Url Converter's Play URL action, URL field. If using the trigger route instead, use that trigger's Url, not both routes. Test with Dinner is ready. in MP3. The converter's action completion does not confirm the speaker finished.
Illustration: the converter is the player for this setup; Google Services still only produces the URL.
Before you start: make the announcement work, set the default cloud voice, and set up Universal Media Player with a UPnP server (a server that shares media on your network). Put a short, known two-second MP3 such as chime.mp3 on that server. Use the player that already plays your announcements.
Illustration: the chime and speech each supply their own Url. The delay is not playback feedback.
- Start with Universal Media Player's Play a UPnP file action that returns tokens. Select your chime in File and leave Finish off. Use the action's Url in the speaker action's URL field, not a separate UPnP URL trigger.
- On the speaker action's success path, add a four-second delay before the speech action with tokens above. Enter
Dinner is ready.Use its Url in a second speaker action. Connect errors to a notification, not to the next audio action. - Save and run. Expect the chime, then the sentence. Allow more time if they overlap or the chime starts late. Prefer actual playback completion from the player if it provides it.
For two spoken messages with an enabled trigger-based player Flow, use two Start saying Text and finish conditions chained from the first condition's true path to the next, with Text Dinner is ready. and Please come to the table. The conditions wait for the generated duration plus the device's delay, not for feedback from the speaker. Another speech request to the same device can replace the pending timer. See the Advanced Triggers discussion and optional sequencing; Google Services does not queue independent requests.
Illustration: chain the conditions by their true path, not by URL tokens. The separate trigger passes each Url to the player.
Before you start: configure the Cloud Translation JSON and project ID, and add Google Translate.
Illustration: the Translation token is the translated sentence; Text to translate is the input.
- Connect Start to Translate (with tokens). Enter
Hello, choose English (en) under Source Language and Dutch (nl) under Target Language. - Connect the success path to a notification. Insert Translation in the message. Connect the error path to a separate translation failure message.
- Save and run. Expect a Dutch translation, typically “Hallo”. If suggestions are empty, check translation troubleshooting.
Before you start: enable YouTube Data API v3, save a YouTube API key and add YouTube.
Illustration: use YouTube link for a clickable video URL; it is not an audio URL for a speech player.
- Connect Start to Search within YouTube (with tokens). Enter
Homey smart home. - Connect success to a notification with YouTube link in its message. Add a separate error notification for no result, invalid key or quota issues.
- Save and run. Expect a link to the first video in this search; results vary. The action also fires YouTube triggered. Use one result path per notification to avoid duplicates.
Before you start: make the translation and cloud announcement above work.
Illustration: connect Translation to Text first, then connect Url to the player.
- Keep the Translate (with tokens) action and its
Hello, English → Dutch inputs. On success, connect to the cloud speech action with tokens. - Insert Translation into the speech card's Text. Select a Dutch voice, Speed
1and Pitch0(also0on the device). Connect success to the speaker action with Url in its URL field. - Connect both error paths to notifications, not the speaker. Save and run. Expect the player to speak the Dutch translation. Don't also route the trigger to the same speaker.
To add the current time or another expression to Text, see BLL coding. For a trip estimate, go to Maps examples.
Support development - If Google Services is useful to you, you can support its
continued development through GitHub Sponsors,
Patreon,
PayPal, or
bunq.
Thank you!