Basic Fully Kiosk commands to play sounds or run commands

Here’s a very simple (3-4 line?) way to use Fully Kiosk’s API. I use it to play doorbell sounds and do basic TTS.

For more advanced functionality, check out @thomasloven’s great stuff here: https://github.com/thomasloven/lovelace-fullykiosk and https://github.com/thomasloven/lovelace-player

Or some clever info gathering if you need this: Fully Kiosk Browser

Two different commands. A generic command option and a playsound option.

rest_command:
  fully_kiosk_kitchen_cmd:
    url: !secret fully_kiosk_kitchen_cmd
  fully_kiosk_kitchen_playsound:
    url: !secret fully_kiosk_kitchen_playsound

Store your sound file in www/. If you choose to put them in a subfolder, be sure to modify the url section in fully_kiosk_kitchen_playsound below.

In your secrets.yaml make sure to have the URL.

fully_kiosk_kitchen_cmd: "http://192.168.1.100:2323?password=KIOSKPASSWORD&{{ url }}"
fully_kiosk_kitchen_playsound: "http://192.168.1.100:2323?password=KIOSKPASSWORD&cmd=playSound&url=https%3A%2F%2Fhomeassistant.yourhostname.com%3A8128%2Flocal%2F{{ sound }}"

Usage in a script or automation:

  - service: rest_command.fully_kiosk_kitchen_playsound
    data:
      sound: 'doorbell-2.wav'

Or run any command from https://www.ozerov.de/fully-kiosk-browser/#rest

  - service: rest_command.fully_kiosk_kitchen_cmd
    data:
      url: 'cmd=textToSpeech&text=Hello%20how%20are%20you'
6 Likes

Thanks for this - but am I right that I’m SOOL if I use DuckDNS? Meaning my instance is only accessible via HTTPS not HTTP? I couldn’t get it to load the file (it never progresses past “loading the file” or whatever it says) but I CAN play the file in my browser from the location where it’s saved in my HA www directory.

Thanks for this, very helpful!! Aren’t you missing a / after your port though? http://192.168.1.100:2323/?password=KIOSKPASSWORD

Mine works without, but maybe that’s more compliant.

1 Like

Should still work. Make sure your full URL is encoded correctly.

Hi, I have set up things like you described. But I can’t get sound or tts to play on my kiosk device… :grimacing:

I have enabled remote admin in fully (anything else that has to be done here?) and put the IP address in ha config and sound files in www

I get no errors from my scripts, only info that they are executed, but no sound on kiosk device.

As you can probably hear I am pretty new at this… So if someone could push me in the right direction I would really appreciate it!

Ok, so I can type this: http://myipadress:2323/?cmd=textToSpeech&text=[Hello%20how%20are%20you]&password=[mypassword]

And I get tts output on the kiosk device.
So my error must be in HA…

That may be so, but in the absence of seeing what you have configured, and your log, no one can help.

So i got the time to look at this again. but still no luck
I will try to show here what i did and where, and post my log wich is not showing any errors about this command as far as i can tell.

when i type this in a browser: http://xx.xx.xx.45:2323/?cmd=textToSpeech&text=[test%20test]&password=[MYPASSWORD]
I get a tts output from fully device that says “test test”

In configuration.yaml i have this:

rest_command:
  fully_kiosk_kitchen_cmd:
    url: !secret fully_kiosk_kitchen_cmd
  fully_kiosk_kitchen_playsound:
    url: !secret fully_kiosk_kitchen_playsound

In secrets file i have this:

fully_kiosk_kitchen_cmd: "http://xx.xx.xx.45:2323/?password=MYPASSWORD&{{ url }}"
fully_kiosk_kitchen_playsound: "http://xx.xx.xx.45:2323/?password=MYPASSWORD&cmd=playSound&url=http%3A%2F%2Fxx.xx.xx.191%3A8123%2Flocal%2F{{ sound }}"

xx.xx.xx.45 is the device running fully kiosk
xx.xx.xx.191 is my HA ip adress. I am not sure if this goes here though…?

I made this script called test tts with UI to test it:

service: rest_command.fully_kiosk_kitchen_cmd
data:
  url: cmd=textToSpeech&text=Alarm%20ude%20tilkoblet 

I also tried the playsound command but no output.

nothing happens when i execute the script. i get a pop up that says the script was triggered, thats it.

Here is the log:

2020-11-19 21:41:21 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for adaptive_lighting which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-11-19 21:41:21 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-11-19 21:41:23 WARNING (MainThread) [homeassistant.components.lovelace] Lovelace is running in storage mode. Define resources via user interface
2020-11-19 21:51:54 WARNING (MainThread) [homeassistant.components.script.1605116528209] test tts: Already running
2020-11-19 21:51:54 WARNING (MainThread) [homeassistant.components.script.1605116528209] test tts: Already running
2020-11-19 21:51:54 WARNING (MainThread) [homeassistant.components.script.1605116528209] test tts: Already running
2020-11-19 21:51:54 WARNING (MainThread) [homeassistant.components.script.1605116528209] test tts: Already running

the warnings in the end I believe was becouse i executet the script multible times in succession.

I hope all info is here for anyone kind enough to try to help me.

Your configuration looks correct.

Can you trigger it from the command line on your HA server?

I am sorry, I wish I knew how to do that … Its something I have to run from command promt?

I should maybe mention that my HA is running in virtual box on windows 10

So from within the container, use wget/curl or potentially even telnet depending on what’s available to connect to the web server and see if that works.

Use Google to find some examples of how to do it.

Could someone please tell me how to integrate the rest command but for two tablets?

I have this on my configuration.yaml

# Kiosk
rest_command:
  kiosk_command:
    url: !secret rest_url_kiosk_command

And this in the secrets.yaml file:

rest_url_kiosk_command: 'http://192.168.0.xxx:2323/?cmd={{ cmd }}&url={{ url }}&key={{ key }}&value={{ value }}&url={{ url }}&type={{ type }}&password=*******'
tablet_settings: 'http://192.168.0.xxx:2323/?cmd=listSettings&type=json&password=**********'
tablet_info: 'http://192.168.0.xxx:2323/?cmd=deviceInfo&type=json&password=**********'

How do I add another tablet/URL in these files?

(Sorry, English is not my native language)

What’s is the use ok key / value data in rest_command ?
What is the goal of these two datas ?
Why 2 url parameters ?
In the case of playSound we must have cmd, url, loop and strem parameters in acordance with the rest api of fullykiosk…
Thanks for your help

I’m guessing!

rest_command:
  kiosk_command_tablet_1:
    url: !secret rest_url_kiosk_command_tablet_1
  kiosk_command_tablet_2:
    url: !secret rest_url_kiosk_command_tablet_2

and the corresponding 2 secret entries

rest_url_kiosk_command_tablet_1: ...
rest_url_kiosk_command_tablet_2: ...