Gavin Campbell developed this driver for Hubitat when he found out that Fully Kiosk Browser had a REST API. This way you can use your tablet as a chime or using TTS in your apps. (without needing to install any additional phone apps such as LanNouncer, and without interfacing with Alexa or Google.)
This is my SmartThings port of the Hubitat app. I use this app to replace Lannouncer mainly on Fire devices running the Fully Kiosk Browser, but it also works well on standard Android devices. Lannouncer is a superb app, however on my system Fire OS seems to put it to sleep, so it goes mute, and stops talking. Many of us use Fully with ActionTiles, so it is usually in the foreground. There also seems to be a message queue in Fully, so messages speak completely, no more message chopping when multiple message arrive at the device. However, when a new sound file is sent when there is an active playing sound file, the new file takes precedence, stopping the playing file.
While posting this, I discovered there is already an existing ST App for controlling Fully, but it does not do TTS or play MP3s as far as i know. However, other functions may be duplicated.
The following is the Hubitat Documentation modified for SmartThings. I have only tested TTS and playing an MP3 file with BigTalker and SHM Delay Talker Child.
Features:
- Chime with custom audio file
- Text to speech
- Command to launch another app via FKB (custom command âlaunchAppPackageâ)
- Command to bring FKB back to the front (custom command âbringFullyToFrontâ)
- Commands to turn the screen on/off (custom commands âscreenOn/screenOffâ)
- Command to trigger motion. (custom command âtriggerMotionâ)
- Commands to start/stop the screensaver (custom commands âstartScreensaver/stopScreensaverâ)
- Commands to load the start URL or another URL
- Command to set the screen brightness (setScreenBrightness)
Requirements:
- A device running Fully Kiosk Browser with a plus license so you can enable the REST API (Fully Kiosk Browser Lockdown | Android Kiosk Mode App )
- Enable the REST api by launching FKB -> Settings -> Remote Administration (PLUS) -> Enable Remote Administration. Set your password and enable the Remote ADmin from Local Network. This will also list the IP and the Port you need.
Driver Installation:
- Copy the code from the GitHub link below or get it from repo arnbme/fullytts/master
- In the ST IDE, click âMy Device Handlersâ -> Create New Device Handler
- Paste the code into the new box and save it, or update from repo with module fullytts.
- Save, then Publish, for Me
Create Device(s)
- From the IDE screen click on My Devices -> New Device
- Fill in the Device Name and Device Network ID (at minimum)
- for âTypeâ scroll down and select Fully Kiosk Browser Controller
- Click Create
- Your new device will now be available and you can configure it from there in the Classic phone app. Click on gear to configure settings.
Settings: In ST phone app My Home â tap FKBC device nameâ>tap cog in upper right corner of screen
- Server IP Address: The IP address of the device running FKB. This IP address should be permanently reserved for the device in your router.
- Server Port: The port used for the FKB REST API. Default: 2323. *Note when the settings wont save add a digit to this field, save it then come back and reset it to 2323 or whatever port is being used.
- Server Password: The password set in FKB to connect to the REST API
- Tone Audio File URL: URL to a mp3 file to play when beep is executed. Note: URL is case sensitive.
- Application to Launch: application ID to launch (ex: com.ringapp will bring the ring app to the foreground)
- Logging Level: set to none after everything is working properly to avoid extra logging
Device Commands:
Device commands may be issued in a Groovy Smartapp as follows: devicename.command() or WebCore piston in âDoâ by selecting a command, then click Parameter and set Value, or set Value if directly displayed. The commands in no particular order:
- screenOn()
- screenOff()
- setScreenBrightness(0-255)
- speak(âtext of choiceâ)
- beep() or chime() play sound file defined in Tone Audio File setting
- launchAppPackage(âappNameâ) launch application in appName, when appName not coded, the name defined in the Application to Launch setting is used, an error notification is issued when neither is coded. How to find Application Names.
- bringFullyToFront()
- triggerMotion()
- startScreensaver()
- stopScreensaver()
- loadURL(âURLâ) input setting âURL to Loadâ is used when a URL is not included with the command
- loadStartURL()
- mute() currently only in Hubitat beta version
- unmute() currently only in Hubitat beta version
- volumeUp() set volume up 10%
- volumeDown() set volume down 10%.
- setVolume(0-100)
Note there is an issue with adjusting sound volume in SmartThings. It may adjust the Audio or TTS, but not both - refresh()
- playSound(âlocal sound file nameâ)
- stopSound() or off() stops any playing sound file and TTS
- alarm() loop plays file in setting Alarm Audio File URL.
- commands used to modify Fullyâs basic settings from code:
setBooleanSetting [string setting name,true/false]
setStringSetting [string setting name, string value]
Fullyâs (deeply hidden) setting names are found as follows:
- Using a web browser go to URI âfully deviceâs local ip addressâ:2323 (or your private port number)
example: 192.168.0.156:2323 - Login if required
- On the left top hamburger menu click âSettingsâ, Settings menu displays
- Select and click on any item in Settings menu
- Scroll down to end of page, then click âShow Keysâ box.
- Setting names display.
- When setting uses a string, click on itâs edit icon
Notes:
-
An easy method of getting files to your devices using Android with Google Drive
- Store the sound file onto Google Drive
- For each target device: download the fileâit goes into the Download folder
- File name setting would be file:///sdcard/Download/filename.mp3
-
Many free beeps, tone and chime MP3s available at https://www.freesfx.co.uk
http://soundbible.com/ -
Some useful sounds
chime.mp3
doorbell.mp3
siren.mp3
alarm.mp3 -
Using Windows to move files to target device
- First save any or all or the above to a Windows computer.
- Then connect the Android or Amazon Fire device via USB cable to the
Windows computer. - copy to the files to the target deviceâs Download folder. (You may use any folder, however be sure to adjust the folder name in the Tone Audio File setting.
- The case sensitive Tone Audio File URL is coded as:
file:///sdcard/Download/filename.mp3
or
/sdcard/Download/chime.mp3
A non local URL file is not recommended
-
The ActionTiles phone app does not work with this DTH, due to the lack of Fullyâs Plus options. ActionTilesâ is aware of this issue, â⌠though we tried (and may try again) we could not work out a âcustomer-friendlyâ royalty/licensing scheme for the PLUS featuresâ.
-
When using Big Talker V2 for custom speech messages, it must be set in âSpeech Synthesisâ mode
-
This version runs on SmartThings and Hubitat. The Hubitat version is Hubitat only
Embedding Googleâs Speech Synthesis Markup Language, SSML or Amazonâs SSML with TTS
-
When using SSML with TTS devices it may be necessary to enclose the text message with
<speak>
tags. HTML like tags are removed by Hubitat and perhaps by ST. The <> tags may be replaced by using brackets {}.
Using brackets requires using FBKC version 2.05 or higher
Example: delay speech for 3 seconds
<speak>Hello <break time="3s"/> goodbye</speak>
{speak}Hello {break time="3s"/} goodbye{/speak}
-
A sample 30 second countdown (timings may vary on your system)
{speak}Alarm system is arming in 30 seconds, please exit the facility. {break time="1s"/} 25 seconds{break time="3200ms"/}20 seconds{break time="3200ms"/}15 seconds{break time="3200ms"/}10 seconds{break time="3200ms"/}5{break time="750ms"/}4{break time="750ms"/}3{break time="750ms"/}2{break time="750ms"/}1{/speak}
-
Interrupting a message. Fully V1.38 or higher required along with the FBKC version 2.05 or higher. A leading exclamation point interrupts a currently speaking message, and clears the TTS queue. For example:
!System Disarmed
DTH source on GitHub:
App History
Mar 03, 2020 V2.05 Port commands Added setBooleanSetting, setStringSetting from HE
Feb 19, 2020 V2.04 add support for new sendTextToSpeech queue parameter
Feb 15, 2020 V2.04 add support for SSML adjustments, new Fully stopTextToSpeach command
Mar 22, 2019 V1.00 Ported Hubitat V1.00, Added chime command
Mar 23, 2019 V1.04 Ported Hubitat V1.04
Mar 24, 2019 V1.05 Ported Hubitat V1.05 added setScreenBrightness
Mar 25, 2019 Tiles added for testing most commands
Questions, Help and Modification requests
-
I have the OPâs approval to port his Hubitat Device to SmartThings
-
I will attempt to keep the ST version in sync with the Hubitat version, however I make no guarantees.
-
I have only tested the TTS and playing the sound file functions on SmartThings and Hubitat
-
Should you encounter any problems that are directly related to using this DTH on SmartThings, post them on this thread.
Tag @GavinCampbell