|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | {{Top}}
| |
| | | |
− | <big>Connecting your Hubitat Elevation to your Sonos device is an easy way to add audio and text to speech voice notifications to your home automations. Using the Hubitat Sonos Integration, you can control the volume and playback functions of your Sonos speakers, plus send voice notifications using the built-in Text to Speech (TTS) capabilities of your Hubitat Elevation hub.</big> | + | <big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big> |
| | | |
− | ===<big>Installing the Hubitat Sonos Integration</big>===
| + | <big> |
− | | + | This document is available at: http://docs2.hubitat.com/en/apps/sonos-integration |
− | #<big>From the sidebar of your hub, select '''Apps''' and press the '''Add Built-In App''' button.</big>[[File:Install Built-In App 2.0.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/7/77/Install_Built-In_App_2.0.png ]]
| + | </big> |
− | #<big>Choose '''Sonos Integration''' from the list of Built-In Apps.</big>[[File:Install Sonos Integration.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/6/6b/Install_Sonos_Integration.png ]]
| |
− | #<big>Wait for your Hubitat Elevation hub to search for Sonos devices. This can take 5 minutes or more, but typically Sonos devices are found with 30 seconds from installation the Sonos Integration app.</big>[[File:Sonos Integration - Search begins.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/f/f6/Sonos_Integration_-_Search_begins.png ]]
| |
− | #<big>Once your Sonos device is found, press the '''Next''' button.</big>[[File:Sonos Integration Discovery.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/b/b3/Sonos_Integration_Discovery.png ]]
| |
− | #<big>Make your selection by checking the box next to the name of the found device you want to use. To add additional devices not discovered during the Sonos Integration installation, press the '''Continue Search''' button.</big>[[File:Sonos Integration set found.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/b/b1/Sonos_Integration_set_found.png ]]
| |
− | #<big>Press the '''Done''' button to finish.</big>[[File:Sonos Integration complete.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/4/4b/Sonos_Integration_complete.png ]]
| |
− | | |
− | ===<big>Test your Sonos Integration</big>===
| |
− | | |
− | #<big>In the list of [[Devices]], find the name of your Sonos device you are testing. In the example above, it is named '''Dining Room Sonos'''.</big>
| |
− | #<big>Scroll down and find the '''Speak''' command.</big>
| |
− | #*<big>'''NOTE''': There will be some duplicate commands shown, since the same command is part of two separate capabilities of the integration. You will notice for example, one of the '''Speak''' commands also has a field for ''Volume level'', while the other only has a single field for testing the TTS message you want to hear from the Sonos device.</big>
| |
− | #<big>Type your test word or phrase into the ''Text'' box below the '''Speak''' command and press the '''Speak''' button. You should hear your word or phrase from your Sonos device.</big>[[File:Test Sonos Integration driver.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/d/d3/Test_Sonos_Integration_driver.png ]]
| |
− | | |
− | ===<big>Using the Hubitat Notifications app for Text to Speech (TTS) messages</big>===
| |
− | <big>The Notifications app can be used to send TTS messages to your Sonos device. This is the simplest way to play TTS announcements on your Sonos. For detail on how to use the Notifications app, please see the [[Notifications]] document.</big>
| |
− | | |
− | ===<big>Controlling your Sonos Integration with Rule Machine<sup>®</sup></big>===
| |
− | <big>There are several ways to control your Sonos device with Rule Machine and send Text to Speech (TTS) messages. While it's possible to simply use the Notifications app to play TTS messages on your Sonos device, it is helpful to understand how to build Rule Machine rules, since you can combine multiple actions, control multiple devices, and trigger all actions within a single rule by way of one or multiple triggers. This is substantially more powerful than a single TTS Notification and will help you Elevate your home automation to new levels. For our basic example below however, the Sonos device will simply play the TTS message at volume 50, anytime the front door contact sensor is opened.</big>
| |
− | | |
− | #<big>If you have not already done so, install '''Rule-4.0''' with the same method used to install the Sonos Integration at the beginning of this document.</big>
| |
− | #<big>From the Apps page of the Hubitat Web Interface, select '''Rule Machine'''</big>
| |
− | #<big>Give your rule a name. For this simple example, we will announce the via TTS, the message "Front Door" anytime the front door contact sensor is open, so it therefore makes sense to name our example rule "Announce Front Door".</big>[[File:RM4 TTS speech example.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/2/22/RM4_TTS_speech_example.png ]]
| |
− | #<big>For our example rule, we need to specify something to trigger the actions of the rule. We want the rule actions run when the front door is opened, so the trigger device we will select will be our Front Door contact sensor.</big>[[File:RM4 select trigger - TTS example.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/9/9e/RM4_select_trigger_-_TTS_example.png ]][[File:RM4 TTS example - contact as trigger.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/1/11/RM4_TTS_example_-_contact_as_trigger.png ]][[File:RM4 TTS example Front Door contact.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/f/f1/RM4_TTS_example_Front_Door_contact.png ]]
| |
− | #<big>You can of course have multiple triggers in Rule Machine, but for our simple example we only want to use a single trigger. Press the button '''Done with Trigger Events'''.</big>[[File:RM4 TTS example Finish trigger event.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/6/6c/RM4_TTS_example_Finish_trigger_event.png ]]
| |
− | #<big>We will now specify the '''Action''' for our example rule to Speak a message on our Sonos device. Press the '''Select Actions to Run''' button.</big>[[File:RM 4 TTS example Select Action.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/8/86/RM_4_TTS_example_Select_Action.png ]]
| |
− | #<big>From the drop-down menu, choose the Action '''Send, Speak or Log a Message, Send HTTP Request''' and then choose '''Send or Speak a Message'''.</big>[[File:RM 4 TTS example choose action category.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/d/d6/RM_4_TTS_example_choose_action_category.png ]][[File:RM 4 TTS example choose action.png|none|thumb|600x600px|link=https://docs.hubitat.com/images/1/17/RM_4_TTS_example_choose_action.png ]]
| |
− | #<big>For our example rule, we want our announcement to be "Front Door", so type this into the '''Message to Send''' field, then scroll down and activate the option '''Speak this message'''. For a Sonos device, there are two places where you can select the device to use. If you choose '''On this speech device''', the TTS message will be spoken at the current volume level of the speaker. For our example, we will choose '''On this music device''', since it will allow us to also specify the volume at the same time.</big>[[File:RM 4 TTS Example setup speech.png|none|thumb|1102x1102px|link=https://docs.hubitat.com/images/e/e8/RM_4_TTS_Example_setup_speech.png ]]
| |
− | #<big>Press '''Done with this action''', and since we will only be adding a single action from our trigger device (the Front Door contact sensor), you should now select '''Done with Actions'''.</big>[[File:RM4 TTS example finalize action.png|none|thumb|640x640px|link=https://docs.hubitat.com/images/4/45/RM4_TTS_example_finalize_action.png ]]
| |
− | #<big>Press '''Done''' to finish and test your rule by activating the trigger device.</big>[[File:RM4 TTS example finish rule.png|none|thumb|835x835px|link=https://docs.hubitat.com/images/9/91/RM4_TTS_example_finish_rule.png ]]
| |
− | #<big>As you become more familiar with building rules, you can explore using Rule Machine Actions called Custom Commands. These allow you to specify actions such as '''Pause''', '''nextTrack''', '''previousTrack''', '''Mute''', etc. These may be independent actions, or they can follow, or proceed the TTS action.</big>[[File:RM4 Sonos example of custom commands 2.png|none|thumb|960x960px|link=https://docs.hubitat.com/images/9/97/RM4_Sonos_example_of_custom_commands_2.png]]
| |
− | | |
− | <big>As you can see from the above examples, the power of Rule Machine can be leveraged to specify criteria that must be met before a rule action is run. In the example rule, the TTS message will be at a specified volume level. Once you are more familiar with building Rule Machine rules and '''[[Rule-4.0#Rule-4.0 Conditional Actions and Logical Expressions|Conditional Actions]]''' , TTS announcements at different volumes, occurring at different times of the day, only in specified '''[[Modes]]''', etc., becomes very simple to achieve.</big>
| |