[RELEASE] BigTalker 2.1.0

Big Talker 2

Last Major Edit: 5/24/2019

Version 2.1.0 released 5/24/2019
See this post: [RELEASE] BigTalker 2.1.0 - #64 by rayzurbock

Version 2.0.8.5 release 4/6/2019
See this post: [RELEASE] BigTalker 2.1.0 - #4 by vjv

Version 2.0.8.4 release 1/6/2019

This app is a "community app" and is not supported by Hubitat. Contact @rayzurbock for support.
Use at your own risk.

BigTalker 2 Information and Instructions (link)


Introduction

Have you ever wanted a talking house? Now you can! With the Big Talker SmartApp [ (2.x branch)

When Hubitat is paired with a compatible audio device (such as a Sonos, Ubi, LANnouncer, VLCThing, etc) and the BigTalker SmartApp, your house can say what you want it to say when events occur.

Author's Hubitat Community Profile: Hubitat

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 or Held ** I do not have a button and I understand Hubitat works differently than the original platform that BT2 was written on. Does this work?
  • Power Meter: High, Normal, Low Wattage
  • Alarm: Off, Siren, Strobe, Both
  • FilterStatus: Normal, Replace (Needs testing, supported in HE?)
  • OvenMode: Heating, Grilling, Warming, Defrosting (Needs testing, supported in HE?)

Phrase Tokens/Variables
Voice phrases support the following variables (will be replaced with actual phrase when triggered)

  • %date% = Current date; January 01
  • %day% = Current day; Monday
  • %devicename% = Triggering devices display name
  • %devicetype% = Triggering device type; motion, switch, etc…
  • %devicechange% = State change that occurred; on/off, active/inactive, etc…
  • %description% = The description of the event that is to be displayed to the user in the mobile application
  • %groupname% = Play Device group name (ie: group/room name that you have setup for this set of events)
  • %locationname% = Hub Location name; home, work, etc…
  • %lastmode% = Last home mode; home, away, etc…
  • %mode% = Current home mode; home, away, etc…
  • %mp3(url)% = Play hosted MP3 audio file from url. Example: %mp3(http://www.somesite.com/audio.mp3)%
    • musicPlayer devices only (Sonos, etc). Does not support speechSynthesis devices such as Ubi and LANnouncer among others.
    • Cannot be mixed with any other text in the event's phrase
  • %time% = Current time; HH:mm am/pm
  • %value% = Wattage value (only applicable in Power Meter events)
  • %weathercurrent% - Current/Today's US weather for your hub location
  • %weathertoday% - Current/Today's US weather for your hub location
  • %weathertonight% - Tonight's US weather for your hub location
  • %weathertomorrow% - Tomorrow's US weather for your hub location

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 simulated 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 group tied to that switch’s ON event that speaks " Good Morning. Today is %day%. The time is %time%. %weathertoday% ", or find an MP3 news stream for your daily briefing and use the speech phrase "%mp3(http://path/to/mp3)%

Keep in mind, if you configure highly active or too many devices, it may get annoying or cut a previous message off!! 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!


The code for the Hubitat SmartApp is found on the GitHub site:

LATEST VERSION (2.0.8.5 4/6/2019)
PARENT APP CODE
CHILD APP CODE
Revision History

Installation via Hubitat

Update via Hubitat

  • Login to your Hubitat web interface
  • Click Apps Code
  • Select BigTalker2-Child (and/or BigTalker2)
  • Click Import
  • Paste the proper code URL
  • Save

Attributions:

  • Update notification code added in 2.0.8.4 inspired by @Cobra (I modified from original version)
  • NOAA Weather retrieval inspired by @aaron 's NOAA Weather Alerts app.
14 Likes

Watching this with interest as I’ve yet to decide on what “networked speaker” to tinker with.
I’ve got a Squeezebox wired into in the lounge system but it’s not always ON. (Well it is but not the amplifier it’s conndcted too. )
I’ve got an All in One PC in the kitchen island which is also not always ON.
I believe that Amazon’s not fully capable “down under” and I’m very tempted by the new Google Hub/screen thing but that’d likely have to go on the kitchen island so may not be readily accepted.
Oh the stress of it all. :stuck_out_tongue_closed_eyes:

App crashed, Below is log

app:1622018-11-18 12:05:15.383 am errorjava.lang.NullPointerException: null on line 3593 (pageTalkNow)

app:1622018-11-18 12:05:15.263 am debugBIGTALKER2(P2.0.7) || [PARENT] TALK(Talk Now.TalkNow)|mP| Living Room Sonos | cT<>null | cS/cT<>playing | Sending playTrackAndRestore() | CVol=0 | SVol=80

app:1622018-11-18 12:05:15.261 am debugBIGTALKER2(P2.0.7) || [PARENT] Sending playTrackandRestore() 3 - to Living Room Sonos - cVol = 0

app:1622018-11-18 12:05:15.217 am debugBIGTALKER2(P2.0.7) || [PARENT] TALK(Talk Now.TalkNow)|mP| Living Room Sonos | Current Status: stopped, CurrentTrack: [audioSource:Hubitat, station:null, name:Rule Vannassa Arrival False, artist:Hubitat, album:TTS, trackNumber:null, status:stopped, level:52, mute:unmuted, uri:http://192.168.1.189:8080/tts/3de4a861465bc4ba56d99c0e05233945.mp3, trackUri:http://192.168.1.189:8080/tts/3de4a861465bc4ba56d99c0e05233945.mp3, transportUri:http://192.168.1.189:8080/tts/3de4a861465bc4ba56d99c0e05233945.mp3, enqueuedUri:http://192.168.1.189:8080/tts/3de4a861465bc4ba56d99c0e05233945.mp3, metaData:http://192.168.1.189:8080/tts/3de4a861465bc4ba56d99c0e05233945.mp3Rule Vannassa Arrival FalseHubitatTTSobject.item.audioItem.musicTrack, trackMetaData:http://192.168.1.189:8080/tts/3de4a861465bc4ba56d99c0e05233945.mp3Rule Vannassa Arrival FalseHubitatTTSobject.item.audioItem.musicTrack], CurrentTrack.Status: stopped.

app:1622018-11-18 12:05:15.216 am debugBIGTALKER2(P2.0.7) || [PARENT] TALK(Talk Now.TalkNow)|mP| Living Room Sonos | Volume: 0, Desired Volume: 80

app:1622018-11-18 12:05:15.199 am debugBIGTALKER2(P2.0.7) || [PARENT] TALK(Talk Now.TalkNow)|mP| Last poll: 0:4:19 am

app:1622018-11-18 12:05:15.165 am debugBIGTALKER2(P2.0.7) || [PARENT] TALK(Talk Now.TalkNow)|mP| Resume is desired

app:1622018-11-18 12:05:15.164 am debugBIGTALKER2(P2.0.7) || [PARENT] TALK(Talk Now.TalkNow)|mP@|80 >> Time for Bed

app:1622018-11-18 12:05:15.154 am debuggetMyVoice[parent]: settings.speechVoice=Emma(en-gb)

app:1622018-11-18 12:05:15.153 am debuggetMyVoice[parent]: deviceVoice=Emma(en-gb)

Get the Lenovo 10 inch or the 8 inch, on special at Best Buy right now.

BestBuy doesn’t ship to Aus. :upside_down_face:

Thanks for the report and the related log. I'll check on this later today and get back to you.

Watching this as the current version I have works and don't want to have a problem.

Summary status:

  • speechSynthesis mode is working - no issues reported
  • musicPlayer mode may have issues prior to 2.0.8
    • VLCThing tests ok in 2.0.8+
    • Sonos may have issues, 1 error report so far in 2.0.7 - 2.0.8b

Details:
There have been some unforeseen issues with BigTalker 2.0.7 and Sonos. I've pushed 2.0.8 for testing which have also had issues reported. My initial testing was in speechSynthesis mode which was working fine for me, but Sonos uses musicPlayer mode and is where the reported issue is occurring which prevents speech. I do not have a Sonos so I am testing musicPlayer mode using a port of VLCThing. VLCThing is currently working on P2.0.8b of BigTalker2 in the development branch so I hope that translates to Sonos success as well..

I split BigTalker2 branches on GitHub so that I have a Hubitat regular release branch and a Hubitat development branch for troubleshooting/testing changes.
I've adjusted the links in the main post at the top of this thread to include both sets of published code.

Release Codebase Links:
Parent App Codebase
Child App Codebase

Development Codebase Links:
Parent App Development Codebase
Child App Development Codebase

2 Likes

First off @rayzurbock I am very happy to see you back into development!

So installed and have been testing with some window contact sensors. When I open the window it seems to take about 5 seconds before an announcement occurs. Also if I open up a window and then another window shortly after the announcements get cut off.

Any way to allow for configuration of delay to speak and delay between speak?

If Lannouncer is being used for TTS, unfortunately this is "normal". Without some sort of a priority queueing system, or a feed back busy signal on the target device, there is not much that can be done to stop message interruptus.

For whatever reason sending Lannouncer imbedded commands,@|ALARM=CHIME does not work in Hubitat so I added some code. All my testing was using contacts, some additional identical logic needed for all sensor types. Please consider adding this the live Hubitat version.

In the Parent module TALK added code to directly execute the Lannouncer commands. Also wanted a delay on TTS messages so I could do a chime wait then a message, so I added a delay parameter in Milliseconds. It takes two groups working on the same event to do this

  1. |Chime| with no delay
  2. %devicename% is now %devicechange% delay 1500 Milliseconds
    The Commands are coded alone as a message, as follows
    |siren|
    |off| shuts off siren
    |chime|
    |doorbell|

Using Contacts for testing I added an input field for TTS that is an optional delay in milliseconds

if (parent.returnVar("speechDeviceType") == "capability.musicPlayer") {
player input fields
}
else
input name: "contactDelay", type: "number", title: "Delay in MilliSeconds", required: false

Then added the following to onContact1Event processing

if (contactDelay && contactDelay > 0)
runOnce(new Date(now() + contactDelay), processEvent, [data:[deviceType, deviceState1, deviceState2, deviceState3, deviceState4, index, evt]])
else
processEvent(deviceType, deviceState1, deviceState2, deviceState3, deviceState4, index, evt)

In parent TALK added the following>

  		if (phrase[0]=='|')
  			{
  			def soundType=phrase.toUpperCase()
  			if (soundType == '|SIREN|')
  				{
  				it.siren()
  				return false
  				}
  			else
  			if (soundType == '|OFF|')
  				{
  				it.off()
  				return false
  				}
  			else
  			if (soundType == '|CHIME|')
  				{
  				it.chime()
  				return false
  				}
  			else	
  			if (soundType == '|DOORBELL|')
  				{
  				it.doorbell()
  				return false
  				}
  			}	
  		it.speak(phrase)

)

I am using Samsung M3 and Sonos devices.

@rayzurbock I've been migrating from ST to Hubitat. I've enjoyed a few of Big Talker's sounds in ST, but I'm having some difficulties getting BigTalker to configure. I loaded BugTalker 2.0.8 parent and child app in the Apps Code section. When I select BigTalker under Apps, the "Talk with:" configuration window appears behind the "Talk with these text-to-speech devices" button.
Before selecting the button:
image
After selecting the button:
image

BTW, I tried this using Firefox and Edge browsers with the same outcome. Thoughts?
Luke

I'm pretty sure that is just a visual effect and nothing is behind the button. I believe the mode you are installing in (musicPlayer or speechSynthesis) doesn't have devices. Try installing and moving the switch to the opposite mode of what you are trying here and see if your target device(s) show up.

Nevermind. I goofed something up when importing. Sorry to bother you about that.

1 Like

BigTalker2 version 2.0.8.4 has been released.
Post #1 updated

  • BigTalker2 Parent App Improvements:

    • App Version Update Code (Using Hubitat Community @Cobra's code that I have modified)
    • Cosmetic adjustments to the "About" section of the start page, inclusion of app version status
    • Ability to change app mode from "musicPlayer" to "speechSynthesis" or vice versa. CAUTION: selected speech devices may need to be re-selected at the Configuration Defaults page as well as any overrides selected within each event
    • Modified "Debug logging" switch to auto-disable after 30 minutes. If the switch is enabled, debug logging is enabled for up to 30 minutes. Visiting the Configuration Defaults page anytime during/after that extends the debug logging period unless the switch is toggled to off which ends debug logging immediately.
  • BigTalker2 Child App Improvements:

    • Event type Alarm added, supports reaction to Off, Siren, Strobe, Both
    • Event type FilterStatus added, supports reaction to Normal, Replace
      • Needs testing, I do not have a device with this capability, not even sure it exists in Hubitat
    • Event type OvenMode added, supports reaction to Heating, Grilling, Warming, Defrosting
      • Needs testing, I do not have a device with this capability, not even sure it exists in Hubitat
    • App Version Update Code (Using Hubitat Community @Cobra's code that I have modified)
    • Talk On Home Mode Change > Restriction > End Time changed from required to not required (debugging?)
    • Smoke alarm test variable corrected to match thrown event (defaultSpeechTest1 > defaultSpeechTested1)
    • Cosmetic issue with pageConfigButton (Configure talk on button presenceS > Configure talk on button press)
    • Default suggested speech phrase correction with pageConfigButton (%devicename% button presenceSed > %devicename% button pressed)
    • Subscription for mode changes adjusted to only receive mode changes; previously received all location events causing errornous speech when other location events occur such as receiving sunrise/sunset time (home mode has changed from home to home).
    • Null check added for day restriction
    • Corrected issue with personality enablement/disablement introduced in C2.0.7
    • Corrected issue that prevented scheduling a speech time that was introduced in C2.0.7
    • Corrected issues with debug logging
4 Likes

Also, I need to know if it works or if it's broken. Don't be silent. PM me if you want, if you have other users with the same issue, I may group you up in a chat to work on it. Hit that checkmark if you like it and don't have anything to say or don't want to say anything but acknowledge usage. Even a "Version x.x.x.x works for me" is an excellent reply or "with version x.x.x.x, so and so doesn't work". Is BigTalker2 something I should continue to develop for HE? There are other apps/ways to fill this need now as well, native even (rule machine and various others; although they may be more complex with configuring), so I don't want to waste time developing if it's not used, but I also don't want to give up on my followers/users. What HE supported capabilities do you want that are missing? I had a great following in ST, I'm not sure here as my porting was slow. I'm working on streamlining code to add future features at ease and minimize impact on your environment.

Let me check it out as I splashed out on a Google Home Mini for TTS. :slight_smile:

What is the correct format and syntax to use in time fields ?
6AM
06:00
thx

Should be hh:mm am/PM. On Android it comes up with a clock for you to select the time and fills in the value with this format.