I am working on my own bed side tablet running Fully Kiosk and Floorplan for a clock (and other HA controls). I find the motion sensor in Fully Kiosk to be unsatisfactory since it simply monitors changes in the camera (ie. change in lighting can trigger motion since the image from the camera has changed). My current attempt uses a motion detector already in the room (Phillips Hue Motion Sensor) as well as the Movement sensor in Fully Kiosk (utilizing adjustments in the accelerometer and/or compass, although I disable compass).
I have @pkozul 's fully-kiosk.js version 1.0.7.50, but I don’t know javascript to get send movement state back to HA as a sensor the same way motion does.
Has anyone else figured this out?
My reason, so I can create an automation that is triggered from room motion (during daytime) or screen touch (utilizing movement sensor) to turn on the screen and start a timer to turn screen off. Since I am using the motion sensor in the room, I can not just use the Fully Kiosk built in timer to turn the screen off.
Edit: Clarification: I can write the automation just fine in node-red. I am trying to figure out how to gain access to the movement state, provided by Fully Kiosk.
Thanks @lerroy_b. Your second link has been very helpful for most of my Fully Kiosk work, but I haven’t been able to find any help to gain access to the Fully Kiosk Movement Sensor through HA.
So far I have:
a HA switch to turn the Fully Kiosk screen on/off
a Philips Hue Motion Sensor in the room
Fully Kiosk set to turn screen on when device movement is detected
an automation to turn Fully Kiosk screen on when motion is detected in the room during day time
an automation to turn the Fully Kiosk screen off, 90 seconds after the screen turns on
Why I am not satisfied with this setup:
If I am tapping the screen on the tablet (the movement sensor detects this and turns the screen on), my automation detects the screen has turned on and starts the 90 second timer to turn it back off. Now if I am navigating the tablet for a brief time (longer than 90 seconds), the screen will turn off before I am done because my automation starts the timer when HA notices Fully Kiosk screen has turned on.
What I want:
HA to restart the 90 second timer with each movement / screen touch detected by Fully Kiosk. To do this, I need HA to be able to access the Fully Kiosk Movement Sensor.
I also want all automations to happen through HA (actually using Node-RED).
@ronsum, I have no clue what your reply is referring to. I was not seeking automation help, but direction to utilize the movement state within Fully Kiosk.
I want to automate the on/off from Home Assistant / Node-Red, not let Fully Kiosk turn off the screen when it wants, and Home Assistant to turn it off when it wants.
I need the movement state in Home Assistant to correctly start/stop the countdown when either activity starts/stops.
What you are looking for sounds more like a script than an actual automation. So when the 90 sec automation gets triggered (and movement detected) it should reset the timer. The only way I can think of is using scripts.
I use scripts for my toilet lights, so that whenever motion is detected again (while the light is still on) it will reset the script and start over again (meaning the light will stay on another 90 sec)
Clarification: I can write the automation just fine in node-red. I am trying to figure out how to gain access to the movement state, provided by Fully Kiosk.
I was referring to how you describe your “screen off” automation:
generally speaking motion sensors that turn ‘on’ a device with a timed ‘off’ work as follows:
motion sensor event: On → device turns On
every time the motion sensor detects - in effect keeping it On/Active/Alive
motion sensor event: Off → start timer for device Off
logically, you don’t start turning off the device when something is detected, you start that process when the motion sensor is no longer detecting (has gone Off.)
I have retired Node-RED for some time now, and suspect this is one of those automations that is actually simpler to design in HA.
Regarding how to get your Fully Kiosk motion sensor into HA, have a look at Browser Mod.
I currently have an old Galaxy S5 as my Kitchen Kiosk. The automations in HA look like this:
alias: Motion - S5 Screen On
trigger:
- platform: state
entity_id: binary_sensor.s5
to: 'on'
action:
- condition: template # Halts when light just turned off via automation.motion_s5_screen_off
value_template: >-
{% set lastOffTrig=(as_timestamp(state_attr('automation.motion_s5_screen_off', 'last_triggered') | default(0) )) %}
{{ (as_timestamp(now()) - lastOffTrig | default(0) | int > 2 ) }}
- service: light.turn_on
data:
entity_id: light.s5
brightness: 100
alias: Motion - S5 Screen Off
trigger:
- platform: state
entity_id: binary_sensor.s5
to: 'off'
for:
seconds: 20
action:
- service: light.turn_off
data:
entity_id: light.s5
I have been trying to use the Fully Kiosk MOVEMENT sensor. As my first post states, I find the Fully Kiosk motion sensor to be unsatisfactory. If I tap the tablet screen, this triggers the Movement sensor, and I want to access this Movement State from Home Assistant.