[RELEASE] Follow Me - Speaker control with priority messaging, volume controls, voices and sound files!

Glad to hear we got it working. Enjoy!

I have a question when it comes to the priority or decision making process. Let's say I have three child apps. One for the Kitchen, Office and Back Room and all are set for motion. I'm also using Sonos Play 1s.

  1. If I'm in my office and it's 20 minutes past the motion sensor time out, where do the messages get routed to? Do they still go to the office or the last room I was in?
  2. If I leave the office and head into the kitchen, both motion sensors would be active, but I would be in the kitchen. Would Follow Me send the message to both?

I have 9 rules with alerts and I'm trying to kill the echo I get with Sonos.

Voice announcements go to any room that is considered 'active'. Whether that's the current room you're in, the last room you were in or both. The goal is to limit the amount of 'echo' or 'bouncing' of the announcement. So it only speaks in one or two rooms instead of 8 or nine. Remember FM can also know if you're home or not and send you a push instead.

If you are keeping still for long periods of time, you can set the 'After motion stops, wait X minutes to turn the speaker off' higher to try and compensate. Typically in an office type space, put a motion sensor under the desk right where you sit. It'll pick up your leg motions and keep the room 'alive'. Same thing goes for a kitchen table. I have one right in the middle underneath, looking down. Light never turns off when we are there, someone always will move a foot or shift their legs around.

Lot's of options.

Ok..so, I'm back to trying to use it "normally" :wink:

Still trying to get the sounds to play. Text plays but ignores sound file arg. Test button in FM app does play the sound file tho. Results of the RM action is I hear "this is a test" on my sonos---but no sound file1.

Here's my RM action, FM app log, WDIS driver log. I'm using sonos.
image

Here's my FM app setup:

Awesome screenshots, thank you. I see the problem but it'll take a bit to think about a fix. Sonos is the first speaker I see that has speak and restore AND can play sounds/voices. So got to do some reconfiguring on the speech end. Red Sox are on tonight so I'll be able to work on it while watching the game. :baseball:

I had a few minutes... I don't have a Sonos to test on so if you would, turn on your debug and try it out. Paste a log whether it works or not please. Thanks!

New version on Github...

V1.2.7 - 07/28/19 - More changes to play Track

Ha....now (only) the sound plays.

image

Man, you want everything! lol

Alright on further review. Looks like we have two options based on the commands the Sonos accepts.

  1. setVolumeSpeakAndRestore - plays the message (no changing voices or sounds) but uses should restore your volume after message to previous level.

  2. playTrack - Will set your level to what you set in the app, plays the sound and the message in the voice you want. Then resets the volume to what you have set in the app. (may not be what the prev volume was).

I can/will put in some options so you can decide per speaker how you want it to play but curious on your thoughts on this?

For me, I'm not concerned too much about setVolumeSpeakAndRestore as I'm using speakers dedicated to Hubitat alerts. Getting sounds and speech is the holy grail of home automation announcements. There are lots of great use cases.

I think I'm late to this conversation and might be missing some of it but restoring music and volume work for me on Sonos on the app version I'm on. which is

V1.0.1 - 04/03/19 - Added importURL

I have notifications come in via the what did I say tile and the music will resume (not the same song, but the station)

Basically, Bryan is trying to get the FM app to get sonos to speak AND play sounds/change voices. Currently, I've only been able to get speech (eg, [F1] is totally ignored---does not change voice or play file1).

My setup involves multiple Sonos speakers, which are dedicated to Hubitat alerts. Chimes with a time announce. Knocking/dog sound with door movement. New mail sound with new email. Etc...

Yup, basically going to have to make a magic switch to either use the default speak and resume that you're use to or don't have the resume but be able to use sounds and voices.

I wonder if there is a way to know if the Sonos is playing music or not... hmmmm

I'll figure something out!

@jk12 or @greg

Could one of you post a screenshot of your Sonos device page. Want to take a look at the 'Current States'

Thanks

Awesome, what does the Status change to when something is playing?

Here are some states I just captured while playing...

FYI, there's an API someone created for interacting with sonos..maybe it helps

Alright, thank you. Now to make some magic! lol

Going to dinner with the family now. I'll have something later on tonight.

Thanks again

Ahh..thank you!

Sonos users, please check out the new version on Github...

V1.2.8 - 07/28/19 - Major changes for Sonos speakers

Again, I don't have a Sonos to test with so let me know how it goes.

Music to my ears....sound is truncated so it seems you have a hardcoded wait (timeBetween?) before it goes from playing the file to speaking. Is it possible for it to know the length/time of the MP3 before moving to speak? If not, I can just work with the set delay (~3 seconds?).

Also...the voices now work too! And, all of this works using Maker API.

PS...sent u some beer money for next time Sox are on.