I wrote this quick driver when I 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.
- Chime with custom audio file
- Can be used as an Alarm device
- Text to speach
- 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)
- Commands to mute/unmute FKB
- Commands to play/stop custom sounds (playSound/stopSound)
- 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.
- In the Hubitat web admin click on Drivers Code -> New Driver
- Paste the code into the new box and save it.
- From the Hubitat main screen click on Devices -> Add Virtual Device
- Fill in the Device Name and Device Network ID (at minimum) and select Fully Kiosk Browser
- Controller from the Type drop down box.
- Select Save Device
- Your new device will now be avialable and you can configure it from there.
- Server IP Address: The IP address of the device running FKB.
- Server Port: The port used for the FKB REST API.
- 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.
- Siren Audio File URL: URL to a mp3 file to play when the alarm is triggered
- Siren Volume: Volume to set FKB to when alarm triggered. Previous volume will be restored when siren stopped.
- Volume Stream: Volume stream on device to use for setting the volume. You may need to test and see what works for you.
- Logging Level: set to none after everything is working properly to avoid extra logging
- I was also able to save an MP3 file directly to my tables sdcard and reference the audio file like this "file:///storage/sdcard1/mysound.mp3". This should cut down on any delay when using an URL.
Driver source on my GitHub:
[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.
[1.04]: Added commands loadURL and loadStartURL
[1.05]: Added setScreenBrightness command
[1.10]: Implement mute/unmute commands
Added volumeStream setting to choose what volume to control.
Added alarm capability. Includes settings for alarm volume and file.
Changed the volumeStream setting to a drop down with names (streams 1-10).
Changed lauchAppPackage command to accept the package as parameter to allow more flexibility.
Made adjustements to setVolume to properly test for volumeStream value
Added playSound/stopSound commands.
Added the AudioVolume mute attributes.
Set default attributes when installed.
[1.20]: Changed the speak command to use the Hubitat TTS methods. Has faster response and allows voice changing via the Hub Details settings page.
[1.21]: Changed the importUrl to the proper URL.
[1.22]: Updated sendcommand calls to have the parameters properly encoded.