[OBSOLETE] Fully Kiosk Browser Controller (DTH)

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:

  1. screenOn()
  2. screenOff()
  3. setScreenBrightness(0-255)
  4. speak(“text of choice”)
  5. beep() or chime() play sound file defined in Tone Audio File setting
  6. 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.
  7. bringFullyToFront()
  8. triggerMotion()
  9. startScreensaver()
  10. stopScreensaver()
  11. loadURL(‘URL’) input setting “URL to Load” is used when a URL is not included with the command
  12. loadStartURL()
  13. mute() currently only in Hubitat beta version
  14. unmute() currently only in Hubitat beta version
  15. volumeUp() set volume up 10%
  16. volumeDown() set volume down 10%.
  17. setVolume(0-100)
    Note there is an issue with adjusting sound volume in SmartThings. It may adjust the Audio or TTS, but not both
  18. refresh()
  19. playSound(‘local sound file name’)
  20. stopSound() or off() stops any playing sound file and TTS
  21. alarm() loop plays file in setting Alarm Audio File URL.
  22. 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:

  1. 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
  2. Login if required
  3. On the left top hamburger menu click “Settings”, Settings menu displays
  4. Select and click on any item in Settings menu
  5. Scroll down to end of page, then click “Show Keys” box.
  6. Setting names display.
  7. 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

    1. Store the sound file onto Google Drive
    2. For each target device: download the file–it goes into the Download folder
    3. 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

  1. First save any or all or the above to a Windows computer.
  2. Then connect the Android or Amazon Fire device via USB cable to the
    Windows computer.
  3. 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.
  4. 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

20 Likes

Sweet! May need to play with this. Thanks!

Nice Port and thanks for your work!

Couple of questions:
Does one install work for multiple tablets?
Will this make another “device” in ST for each tablet?
On Fire Tablets, if turning the screen off, will this overcome the lock screen issue?

I added “capability “Actuator”” just so it was easier to add to WebCoRE, rather than scrolling down to find “Speech Synthesis”.
I wonder if it would be possible to include Change Screen Brightness…
“?cmd=setStringSetting&key=screenBrightness&value=”
@rontalley each tablet has a unique IP address so this would be per tablet.

Acutator is in the latest Hubitat Version that I’m currently porting over.

Sure, but let me finish the next version. Meanwhile if you could, please add and test that command.

1 Like

I have 3 devices running Fully with ActionTiles that never sleep. Two are on 100%, one near the bedroom uses Fully settings for auto dimming, with sound, screen touch, and motion (camera) brightening the screen.

To enable never sleeping I use Android Developer options, then turn on Stay Awake, plus the Fully Device Mgt-> Keep Screen On. I never see the lock screen.

1 Like

Updated to correspond with Hubitat Version 1.04

It still gets stuck on the lock screen. One of the reasons I really don’t like the fire tablet.

Trying to figure out what speech synthesis is used as default. Tried on a galaxy tab4 I have and it doesn’t seem to use the one I have set as default in the android settings.

This was accepted by the OP and is now released and available in V1.05

Added setScreenBrightness. A value of 0-100 is accepted.

1 Like

Fully’s brightness range expects 0-255 and it doesn’t look like the values are being mapped to that range. As such, 100 will be pretty dim, not full brightness as expected.

Try type in 255. There is no limit on the command.

Ok - I was assuming there was a dimmer slider tile in the DTH which would only send 0-100. Looking at the code shows there is not. It’s just something to be aware of if anyone does add the switchLevel capability.

Currently no brightness tile in ST, and I have no idea how to set a value for the tile. If you know please let me know so that and other commands can be added.

There are a few options. First is to use the lighting muti-attribute tile that includes a slider for brightness (although the generic muti-attribute tile might be more appropriate here.)

Alternatively, a regular slider can be achieved with a Slider tile which allows setting the range to 0…255 (but is 0-100 by default)

Or you can keep it as a 0-100 dimmer and multiply the value by 2.55, round to the nearest whole number and send that to fully.

Updated version now available with Tiles to test most of the available commands.

Hello -
I have installed this DTH and when I click on “speak” it plays a message on the tablet so I assume it is working. I was hoping to use this play a chime if a door is opened (small children in the house) but not sure how to do this - any help would be appreciated
Thanks

Follow directions for adding a chime, beep, tone or any sound file of your choice to the target device as shown in Notes at the top of this thread, test it. Then use the device’s Chime or Beep command using WebCore or Groovy Smartapp.

Should you be using my SmartApp SHM Delay 2.0 there is an option in the Delay profile that does this.

To speak messages of your choice, try using BigTalker 2.0

Thank you for the fast reply. I am indeed using SmartApp SHM Delay 2.0 so do I just
select the Device I created in the “Beep/Chime these devices when real contact sensor opens” option?

If so, then it looks like I would need to create an additional profile for every door I wanted to chime when opened?

Also I added chime.mp3 to the Download directory on my Samsung Tablet but can not seem to find the correct path to it - I tried file:///Download/chime.mp3 and also file:///Device Storage/Download/chime.mp3 -any thoughts ?

Once again Thank you for taking the time to assist me !
Steve
Thanks -
Steve