HAVEN8
February 14, 2018, 8:02pm
83
That was exactly what I was looking for. So far, in my limited testing, it seems to work well. This probably is not the most elegant solution, so ways to make this more efficient, please let me know.
From my android tablet, I now have a button which launches the MQTT Alarm Control Panel App. From the MQTT Alarm panel app, I press the home button within android (not the home button within the app). It them brings me back to my dashboard.
Fully Kiosk Settings:
I have Fully Kiosk Browser running in Kiosk Mode.
Enabling Kiosk Mode (Plus) allows you to set the Fully Kiosk app as your launcher.
I’ve whitelisted the com.thanksmister.iot.mqtt.alarmpanel android application within Fully under Kiosk Mode.
I also turned off Load Start URL on Home Button under Web Browser Settings, but that may just be personal preference
Here are the snippets from my setup.
This switch runs the command to launch the application:
# switches.yaml
- platform: command_line
switches:
launchmqttalarmpanelapp:
command_on: !secret mqttalarmapplaunch
command_off: ""
I used the secrets yaml for the curl command:
# secrets.yaml
mqttalarmapplaunch: /usr/bin/curl -k "http://[IP_ADDRESS]:[PORT]/?cmd=startApplication&package=com.thanksmister.iot.mqtt.alarmpanel&password=[password]"
When I exited the Alarm App, I wanted the switch to be off, and ready to be pressed again. This was my solution:
# scripts.yaml
load_mqtt_alarm_panel:
sequence:
- condition: state
entity_id: switch.launchmqttalarmpanelapp
state: 'off'
- service: switch.turn_on
data:
entity_id: switch.launchmqttalarmpanelapp
- delay:
seconds: 1
- service: switch.turn_off
data:
entity_id: switch.launchmqttalarmpanelapp
This is the entry in my home.dash file.
# home.dash
alarm:
widget_type: script
state_text: 1
title: Alarm
icon_on: mdi-security-home
icon_off: mdi-security-home
entity: script.load_mqtt_alarm_panel
1 Like
Fezile
February 15, 2018, 6:08am
84
Thank you. This opens up a number of possibilities. How does one go about determining the [pkg] portion of an android app to be launched?
HAVEN8
February 15, 2018, 2:13pm
85
I forgot to mention that. There are probably other ways, but the way I did it was I went to the remote website on my computer. In the Fully Kiosk App, if you enable Remote Administration, set an Admin password, and then also enable Remote Admin from Local network, there should an IP address and port you can visit. Something like http://192.168.x.xxx:2323 . Enter that in the web browser and enter the password you created to log in.
On the tablet, go to the app you wish to find the pkg name for. Go back to the Fully Remote Admin website (http://192.168.x.xxx:2323 .) You may need to refresh it once or twice. Scroll down to Foreground app and the application name should be there. I’ve only done this with the MQTT Alarm Control Panel app so far, but it worked for me.
1 Like
Slightly OT.
Do you guys use the webcam from Fully Kiosk? Which is the URL to access the video and/or still images? Can’t find it …
rabittn
(Ryan)
February 16, 2018, 10:10pm
87
1 Like
rabittn
(Ryan)
February 16, 2018, 10:11pm
88
Almost wish there was a platform for Fully.
Sensors from the json.
Notify services for the TTS
camera from the motion cam.
1 Like
rabittn
(Ryan)
February 16, 2018, 11:26pm
90
I was able to create a notify service for Fully.
My script now looks like this.
#!/bin/bash
foo=$(cat)
bar=${foo// /+}
/usr/bin/curl -s "http://IPADDR:2323/?cmd=textToSpeech&text=$bar&password=pass" > /dev/null
and notify looks like this,
notify:
- name: fully
platform: command_line
command: "/root/tts.py"
4 Likes
davedan
(Dave Dan)
February 18, 2018, 7:00am
91
that’s cool … I’m one step closer to move to this for all tablets
I’m interested in understand how the motion works. Anyone have any example?
I’d really like to have a motion sensor to understand motion in the rooms I have this.
You enable it in the settings and that’s it…
I’ve managed to create a script
in home assistant that uses the REST API of Fully Kiosk to open the camera feed in the browser window. It also stops the screensaver before opening the camera feed.
My wall mounted tablet is displaying a photo’s slideshow (from google photo’s) and I would like to have a view of my front door when my doorbell is triggered.
You can use the following shell script to do this. Change tablet-living
to your ip or host of your device, xxxx
to your password, and camera.outside
to your camera entity.
I still run lannouncer on it for the doorbell sound itself, since I don’t think Fully Kiosk can play audio files via the REST api.
#!/bin/sh
curl "http://tablet-living.local:2323/?password=xxxx&type=json&cmd=toForeground"
JS="document.querySelector('home-assistant').shadowRoot.querySelector('home-assistant-main').fire('hass-more-info',{entityId:'camera.outside'})"
curl -g "http://tablet-living.local:2323/?password=xxxx&type=json&cmd=loadURL&url=javascript:$JS"
EDIT: you need a minimum of Fully Kiosk 1.22.1-beta-1 for this.
3 Likes
Nope. Just the official docker image. Why?
I am in hassio trying to figure how to run the script (newb here)
For those who are interested, I’ve created the initial version of a platform and component:
I have created a new Display platform with an initial Fully Kiosk Browser component.
It’s very young and currently only supports turning the display on and off using ‘display.turn_on’ and ‘display.turn_off’ services. I have plans on expanding it to include more functionality, such as loading URLs, TTS, accessing the tablet webcam, etc.
It already returns some information from Fully Kiosk, such as battery level, manufacturer, model, etc.
[10%20am]
Repo is at https://github.com/daemondazz/home…
9 Likes
JKW
(Kolja Windeler)
April 7, 2018, 8:29pm
98
Hi, this is really cool, do you also have a way to close the more-info dialog via command?
Thanks JKW
This thread is awesome! Building upon these posts, I was able to get this working without using curl, control the tablet display using a light template (on, off, brightness). I can select which dashboard (appdaemon/hadashboard) to display with input select and templated rest_command
Video demo
packages/tablet_master_bedroom.yaml
homeassistant:
customize:
sensor.tablet_mbr_screen_brightness:
hidden: true
binary_sensor.tablet_mbr_screen_on:
hidden: true
input_number.tablet_mbr_temp_screen_brightness:
hidden: true
light:
- platform: template
lights:
tablet_mbr_screen:
friendly_name: "Master Bedroom Tablet"
level_template: "{{ states('sensor.tablet_mbr_screen_brightness') }}"
value_template: "{{ is_state('binary_sensor.tablet_mbr_screen_on', 'on') }}"
turn_on:
service: rest_command.tablet_mbr_screen_on
turn_off:
service: rest_command.tablet_mbr_screen_off
set_level:
service: script.tablet_mbr_screen_value
data_template:
brightness: "{{ brightness }}"
rest_command:
tablet_mbr_screen_on:
url: 'http://KioskIP:2323/?cmd=screenOn&type=json&password=KisokPassword'
method: post
tablet_mbr_screen_off:
url: 'http://KioskIP:2323/?cmd=screenOff&type=json&password=KisokPassword'
method: post
tablet_mbr_screen_value:
url: 'http://KioskIP:2323/?cmd=setStringSetting&key=screenBrightness&value={{states("input_number.tablet_mbr_temp_screen_brightness") | int }}&type=json&password=KisokPassword'
method: post
tablet_mbr_url_bed:
url: 'http://KioskIP:2323/?cmd=loadURL&url=http://DashboardIP/{{ states("input_select.tablet_mbr_dash_select") }}&type=json&password=KisokPassword'
method: post
input_select:
tablet_mbr_dash_select:
name: Dash Display
icon: mdi:tablet
initial: "-"
options:
- "-"
- bedroom
- laundry
- doorbell
- fire_menu
- den
input_number:
tablet_mbr_temp_screen_brightness:
name: tablet_mbr_temp_screen_brightness
initial: 128
min: 0
max: 255
step: 1
sensor:
- platform: rest
name: tablet_mbr_battery_level
json_attributes:
- batteryLevel
resource: http://KioskIP:2323/?cmd=deviceInfo&type=json&password=KisokPassword
value_template: '{{ value_json.batteryLevel }}'
unit_of_measurement: '%'
- platform: rest
name: tablet_mbr_screen_brightness
json_attributes:
- screenBrightness
resource: http://KioskIP:2323/?cmd=deviceInfo&type=json&password=KisokPassword
value_template: '{{ value_json.screenBrightness }}'
binary_sensor:
- platform: rest
name: tablet_mbr_screen_on
json_attributes:
- isScreenOn
resource: http://KioskIP:2323/?cmd=deviceInfo&type=json&password=KisokPassword
value_template: '{{ value_json.isScreenOn }}'
- platform: rest
name: tablet_mbr_plugged_in
json_attributes:
- plugged
resource: http://KioskIP:2323/?cmd=deviceInfo&type=json&password=KisokPassword
value_template: '{{ value_json.plugged }}'
media_player:
- platform: mpd
name: mbr_tablet_mpd
host: KioskIP
automation:
- id: tablet_mbr_change_url
alias: Tablet Master Bedroom Change URL
trigger:
platform: state
entity_id: input_select.tablet_mbr_dash_select
condition:
condition: template
value_template: '{{ not is_state("input_select.tablet_mbr_dash_select", "-") }}'
action:
- service: rest_command.tablet_mbr_url_bed
entity_id: rest_command.tablet_mbr_url_bed
- service: input_select.select_option
data:
entity_id: input_select.tablet_mbr_dash_select
option: "-"
- id: tablet_mbr_display_doorbell
alias: Display in Master Bedroom when doorbell activated
trigger:
platform: state
entity_id: binary_sensor.door_bell
to: 'on'
action:
- service: input_select.select_option
data:
entity_id: input_select.tablet_mbr_dash_select
option: "doorbell"
script:
tablet_mbr_screen_value:
sequence:
- service: input_number.set_value
data_template:
entity_id: input_number.tablet_mbr_temp_screen_brightness
value: "{{ brightness }}"
- service: rest_command.tablet_mbr_screen_value
group:
tablet_mbr:
name: Tablet Master Bedroom
control: hidden
entities:
- light.tablet_mbr_screen
- input_select.tablet_mbr_dash_select
- sensor.tablet_mbr_battery_level
- binary_sensor.tablet_mbr_plugged_in
13 Likes
myle
(StePhan McKillen (Other kiwi Here))
April 8, 2018, 5:30am
100
I put a Sonoff in it
Wrote this audomation
if <30 turn it on >99 turn it off
- action:
- data:
entity_id: switch.kitchen_tablet
service: switch.turn_off
alias: Kitchen Charger Off
condition:
- condition: state
entity_id: switch.kitchen_tablet
state: 'ON'
id: '1518744680799'
trigger:
- above: '99'
entity_id: sensor.display_kitchen_tablet_battery
platform: numeric_state
- action:
- data:
entity_id: switch.kitchen_tablet
service: switch.turn_on
alias: Kitchen Charger On
condition: []
id: '1520537778107'
trigger:
- below: '30'
entity_id: sensor.display_kitchen_tablet_battery
platform: numeric_state
Do like the way you passing difference dashboard to the tablet Now Thats thing out side the Square
2 Likes
MPopt
April 8, 2018, 11:30am
101
Aw that nice, right now I’m passing them via automation but all the tablets change at the same time on the same dashboard
I like that post! Gonna read it deeper tonight tks
You need to specify null as entityId.
1 Like
myle
(StePhan McKillen (Other kiwi Here))
April 8, 2018, 5:43pm
104
sound like you have all your tablet point to the same “input_select”