CGavin Campbell rote 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.
- 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)
- 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.
- 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
- 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 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:
- 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.
- loadURL(‘URL’) input setting “URL to Load” is used when a URL is not included with the command
- mute() currently only in Hubitat beta version
- unmute() currently only in Hubitat beta version
- volumeUp() set volume up 10%
- volumeDown() set volume down 10%.
- 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.
Note there is an issue with adjusting sound volume in SmartThings. It may adjust the Audio or TTS, but not both
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
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
- 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:
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’ @tgauchat is aware of this issue, he says “… 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
DTH source on GitHub:
** Hubitat History:**
1.0: Initlal version
1.02: Added commands screenOn,screenOff,triggerMotion,startScreensaver,stopScreensaver. Added import url in metadata.
1.03: Added actuator capability so you can create custom commands in Rule Machine.(WebCore in SmartThings)
1.04: Added commands loadURL and loadStartURL
1.05: Added setScreenBrightness 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, otherwise post the issue on the Hubitat Forum
Modification or Enhancement requests should be posted on the Hubitat Forum. Should the request accepted and coded, it will eventually find it’s way over here. If not, feel free to ask here for the change, or fork the code and create your own version.