[OBSOLETE 1.1.6 5/25/16] Big Talker - Talk when events occur

Version 1.1.6 release announcement
(updated post 5/25/2016 with 1.1.6 release)

Have you ever wanted a talking house? Now you can! With the Big Talker SmartApp ( http://github.com/rayzurbock/SmartThings-BigTalker )

When SmartThings is paired with a compatible audio device (such as a Sonos, Ubi, LANnouncer or VLC Thing) and Big Talker SmartApp, your house can say what you want it to say when events occur.

Currently supported events:

  • Time, Time of Day + Day(s) of Week
  • Motion, Active/Inactive
  • Switch, On/Off
  • Presence, Arrive/Depart
  • Lock, Lock/Unlock
  • Contact, Open/Close
  • Mode, Change (Home, Away, etc)
  • Thermostat, Cooling/Heating/Fan/Idle(not running)
  • Acceleration, Active/Inactive
  • Water, Wet/Dry
  • Smoke, Detect/Clear/Test
  • Button, Press

Each supported event supports 3 different groups so that you can alter your spoken phrases based on which group your selection of devices is configured in.

Voice phrases support the following variables (to be filled in at runtime)

  • %devicename% = Triggering devices display name
  • %devicetype% = Triggering device type; motion, switch, etc…
  • %devicechange% = State change that occurred; on/off, active/inactive, etc…
  • %locationname% = Hub Location name; home, work, etc…
  • %lastmode% = Last home mode; home, away, etc…
  • %mode% = Current home mode; home, away, etc…
  • %time% = Current time; HH:mm am/pm
  • %shmstatus% = SmartHome Monitor Status (Disarmed, Armed Stay, Armed Away)
  • %weathercurrent% = Current weather (from Weather Underground; based on SmartThings Hub Zipcode)
  • %weathertoday% = Today’s weather forecast (from Weather Underground; based on SmartThings Hub Zipcode)
  • %weathertonight% = Tonight’s weather forecast (from Weather Underground; based on SmartThings Hub Zipcode)
  • %weathertomorrow% = Tomorrow’s weather forecast (from Weather Underground; based on SmartThings Hub Zipcode)
  • %weathercurrent(00000)% = Current weather (from Weather Underground; using custom Zipcode; replace 00000)
  • %weathertoday(00000)% = Today’s weather forecast (from Weather Underground; using custom Zipcode; replace 00000)
  • %weathertonight(00000)% = Tonight’s weather forecast (from Weather Underground; using custom Zipcode; replace 00000)
  • %weathertomorrow(00000)% = Tomorrow’s weather forecast (from Weather Underground; using custom Zipcode; replace 00000)
  • Note: (00000) can also be replaced by any supported location of the WeatherUnderground API such as (France/Paris), (latitude,longitude), (AirportCode), (State/City)

For example when turning off a switch named “Office Light” with a spoken phrase of “%devicename% %devicetype% has been turned %devicechange%” would speak “Office light switch has been turned off”.

Another example would be to create a virtual switch that is turned ON in the morning by your Good Morning routine, and then OFF at night with your Good Night routine. Then set up a Big Talker Switch Event tied to that switch’s ON event that speaks “Good Morning. %weathercurrent% %weathertoday%”

Keep in mind, if you configure highly active or too many devices, it may get annoying!! We had a family gathering and the kids kept going in/out the back door to play in the yard. “Back Door has been opened, Back Door has been closed, Back Door has been opened, you get the idea.” I wouldn’t configure chatty motion sensors either, but that’s up to you.

Have Fun!

Support the project
This SmartApp is free. Donations to support development efforts are accepted via (non-refundable, no gurantee of service/support):

ISSUES?
Please check the latest posts below for known issues and file bug reports / feature requests on GitHub for better tracking here:
https://github.com/rayzurbock/SmartThings-BigTalker/issues


NOTE: For Ubi, be sure to first install the Ubi Device Handler and App
https://github.com/jodyalbritton/smartthings/tree/master/theubi

NOTE: For VLCThing, be sure to first install the VLCThing Device Handler
http://community.smartthings.com/t/vlc-thing-a-poor-mans-sonos/5433

NOTE: For LANnouncer, be sure to install the LANnouncer Device Handler and Android App
http://www.keybounce.com/LANdroidHowTo/LANdroid.html

(updated post 5/25/2016 with 1.1.6 release)

26 Likes

I can’t seem to choose my sonos? Tap to set only gives me the option to connect new or shop now. I like the idea of the app though! I have multiple Sonos Labs app installed just to do what this app will do. Will be nice to delete the labs apps and clean up my ST.

Thank you Brian for this awesome app. works great with VLC thing.

This sounds great, but it looks like the Sonos player device isn’t set up for speech? Trying to add it…

Hey guys. I wrote and tested this with VLC Thing as I do not have a Sonos. I thought I read about Sonos working with speech synthesis on here. I’ll check into it. It’s looking for devices that match “capability.speechSynthesis”. If anyone knows the fix please let me know.

Sonos does not provide capability.speechSynthesis. You’ll have to use capability.musicPlayer 's playText(string).

2 Likes

I tried duplicating the Sonos Player device type and adding that capability, but it didn’t work. I’m sure there’s more to it :slight_smile:

It looks like, I can replace capability.speechSynthesis with capability.musicPlayer and .speak(string) with .playText(string) and VLC Thing still works. Thanks @geko

I have 1.0.1-beta1 up for testing if someone with a Sonos wants to give it a shot and let me know if it works with Sonos now.

1.0.1-Beta1 is up in the testing branch here:
https://github.com/rayzurbock/SmartThings-BigTalker/tree/testing

1 Like

1.0.1 beta works for me with Sonos!

Thanks Brian.

1 Like

Found a minor bug that breaks “custom speech devices” attached to a “Switch” event group. The default speech device is used instead of the desired custom device (which didn’t save).

Corrected in 1.0.1-Beta2: https://github.com/rayzurbock/SmartThings-BigTalker/tree/testing

If no further issues are found by me or the community in the next day or so, I’ll promote 1.0.1-Beta2 to 1.0.1 release.

Brian,

Not really an issue but a recommended tweak if possible would be to include the ability to resume music if it was being played when the notification came through.

I found some resume code in the “Sonos (Control)” SmartApp by SmartThings. I have seen a few posts though regarding resuming not working properly.

Can you test this version and see if it resumes? (1.0.1-Beta3)

https://github.com/rayzurbock/SmartThings-BigTalker/tree/resumemusic

It didn’t work to resume music. I tested one of my other apps that does resume music and that did work.

@greg,
Sounds like its just a matter of finding the right code/combo to make it work then.

You should be able to go to Live Logging in the https://graph.api.smartthings.com site, launch something on your Sonos, then cause Big Talker to talk, click on Big Talker in Live Logging and if it is able to see that something is playing prior to speaking, it should say “Talk: …” then “Resuming play.”

I did find some typos regarding resume in the code lines 1018 and 1027 of 1.0.1-Beta4.
cusomSpeechDevice.playTrack(currentTrack) should be customSpeechDevice.playTrack(currentTrack)
state.speechDeviceDefault.playTrack(currentTrack) should be settings.speechDeviceDefault.playTrack(currentTrack)

Corrected typos in 1.0.1-Beta5 if you care to test:
https://github.com/rayzurbock/SmartThings-BigTalker/tree/resumemusic

Great work.

v1.0 works with UBI but not sonos.
I tried your latest beta 5, with this I see sonos but not UBI.

For now I created 2 different app’s to handle ubi and sonos.

No Dice
EDIT - Brian, I’m happy to test sonos functions for you if you want. But I also understand why you may not want to if you don’t have a sonos. Either way I appreciate the app!

Beta 5 Big Talker Logs only generated two items

2:47:04 PM EST: debug BIGTALKER | Talk([Kitchen Sonos New]): Family Room is now on
2:47:04 PM EST: debug BIGTALKER | (onSwitchEvent): switch, 1, on

Pulled this from the Sonos Log

a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace Skipping event generation for sound file https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace status = stopped
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace Updated saved status to 'stopped'
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace Current status: 'stopped', coordinator: ''
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace NOTIFY /notify HTTP/1.1 2987 bytes, body = 2001 bytes, sid = RINCON_000E585234B401400_sub0000001857
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:29 PM EST: trace uuid; RINCON_000E585234B401400
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace Skipping event generation for sound file https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace status = stopped
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace Updated saved status to 'stopped'
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace Current status: 'stopped', coordinator: ''
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace NOTIFY /notify HTTP/1.1 2987 bytes, body = 2001 bytes, sid = RINCON_000E585234B401400_sub0000001857
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:08 PM EST: trace uuid; RINCON_000E585234B401400
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace Skipping event generation for sound file https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace status = playing
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace Updated saved status to 'playing'
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace Current status: 'playing', coordinator: ''
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace NOTIFY /notify HTTP/1.1 2987 bytes, body = 2001 bytes, sid = RINCON_000E585234B401400_sub0000001857
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:06 PM EST: trace uuid; RINCON_000E585234B401400
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace Skipping event generation for sound file https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace NOTIFY /notify HTTP/1.1 2995 bytes, body = 2007 bytes, sid = RINCON_000E585234B401400_sub0000001857
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace uuid; RINCON_000E585234B401400
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace HTTP/1.1 200 OK 591 bytes, body = 240 bytes, sid =
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace Skipping event generation for sound file https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace status = stopped
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace Updated saved status to 'stopped'
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace Current status: 'stopped', coordinator: ''
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace NOTIFY /notify HTTP/1.1 3471 bytes, body = 2363 bytes, sid = RINCON_000E585234B401400_sub0000001857
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace uuid; RINCON_000E585234B401400
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:05 PM EST: trace HTTP/1.1 200 OK 627 bytes, body = 266 bytes, sid =
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:04 PM EST: trace sonosAction(Play, AVTransport, /MediaRenderer/AVTransport/Control, [InstanceID:0, Speed:1])
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:04 PM EST: trace sonosAction(SetAVTransportURI, AVTransport, /MediaRenderer/AVTransport/Control, [InstanceID:0, CurrentURI:https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3, CurrentURIMetaData:])
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:04 PM EST: info setTrack(https://s3.amazonaws.com/smartapp-media/tts/family_room_is_now_on.mp3, null, 0 B})
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:47:04 PM EST: trace setText(Family Room is now on)
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: info Kitchen Sonos New is playing Lock Up the Wolves by Dio
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: trace status = playing
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: trace Updated saved status to 'playing'
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: trace Current status: 'playing', coordinator: ''
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: trace has XML body
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: trace NOTIFY /notify HTTP/1.1 10079 bytes, body = 7318 bytes, sid = RINCON_000E585234B401400_sub0000001857
a816a83f-61d0-4bdf-b956-80161c16cd3e 2:46:47 PM EST: trace uuid; RINCON_000E585234B401400

@coolcatiger I’ll come up with a solution for this soon so that you can do it all under 1 install (hopefully).

@greg Yes, I want to get it working with Sonos, Ubi, etc… I appreciate you helping troubleshoot and test.

I’ve posted up 1.0.1-Beta6.
I added some additional debug logging when talking to help with troubleshooting (hopefully) and switched from using playText() to playTextAndRestore().

No problem. I’ll PM the logs to keep this thread a little cleaner.

1 Like

Version 1.0.1 released here: https://github.com/rayzurbock/SmartThings-BigTalker

  • Sonos Support corrected
  • Resume playback after speaking (not supported for VLC-Thing until the Device Type supports it)
  • Corrected custom speech device save for Switch events
  • General cleanup
  • Icon change
  • More event support to come in new releases soon.
  • Special thanks to SmartThings community member @greg for help with testing Sonos functionality and making this release possible.
2 Likes