[RELEASE] Fully Kiosk Browser Device and Piston


#1

I wrote a DTH that was similar to a solution Fully Kiosk Browser Controller (DTH) but of course over time it merged into my own ‘thing’. My target was initially to just get FKB into a driver so I could change the brightness and screensaver timer then I figured out you could inject your own javascript into FKB and have it notify SmartThings of motion and more (photo capture).

Enter your IP address and it should be DHCP reserved. Note: I also found Fire HD tables do not handle WiFi channel jumping very well - so you might lock that too in the WAP.

The port is 2323 and set your own password.

The Allow Screen Off Command is used for Fire HD tablets since when they shut the screen down it is difficult to get back to FKB without jail breaking the device.

You can run the DTH on its own - but the real fun is when you add the webCoRE piston on a licensed version of FKB.

PISTON SPLIT: My first post had one large piston but users had problems with chunk size loading. I have split the piston into two with the first doing daylight and nighttime changes to the brightness and motion detection & the other the event piston.

PISTON 1 (Timer):

There are booleans to turn motion detection on during the day (myTurnMotionDetectionOnDay) and night (myTurnMotionDetectionOnNight) and screensaver timeouts and brightness values (0-255).

PISTON 2 (Events):

Select your Fully Kiosk Browser Device, save the piston then capture the External URL and go back and edit the piston saving that to the ‘myEndpoint’ variable.
58%20AM

INITIALIZE THE PISTON: Once you have the piston loaded you need to load the JavaScript by pressing the test button. This will execute piston and load the JS into FKB.

OR you can go back to the configuration screen of the DTH and ‘save’ the configuration again. That should trigger the touch and reload the the piston.

Once it starts working you should see the logs pulling back the report:
28%20AM

And the piston should update the Piston state with the ‘onUrlChange’ report back:
06%20AM

You can also see the JavaScript loaded correctly in the web browser of FKB:

Once the JavaScript injected triggers are working well it does function good as a motion sensor in a room during the day, not so much at night, but I also turn off the motion so it doesn’t wake people up without touching the pad.

You will see a lot more in the DTH about AWS. If you get this far with success we can talk about AWS and image uploads and using AWS Lambda, AWS API Gateway, and AWS S3. That is for AWS Rekognition to attempt facial matching. (you need a good working knowledge of AWS) and a different piston.

I really only tested on HD Fire tablets so your mileage my vary on Android.

One more thing, as of now - you should be running 1.39.3 or newer. There was a change in 1.35+ that put the WebView in FKB to pause/sleep and you need to turn off ‘Pause Webview while in Background’ if it was enabled. The setting is under 'Advanced Web Settings".

For those that are using Amazon Fire tables with the screensaver, it is best to update the brightness to 0 as shown below:

Updated: June 3, 2020: FKB 1.39.3 was released. updated instructions.
Updated: June 12, 2020: 9:00AM EDT - splitting the one piston in two.
Updated: July 5, 2020: Updated DTH to allow for screen brightness to be configured as ‘auto’.


#2

Being able to finally use a tablet as an ST motion sensor and trigger photos alone is pretty Epic! This solution actually does so much it’s going to take a while to learn all it’s capabilities! Still playin’ :rofl:


#3

Technically here are all the events that could be captured from the FKB device. I didn’t hook them all in this example, but you can add what you need in your own piston.


#4

Would it not be possible to convert this habitat code to smartthings?


#5

I would believe ‘Fully Kiosk Directory’ could be ported to ST and you could use the DTH from arnb since that was developed for both Habitat and ST.

It might be odd/difficult to have an Application (Fully Kiosk Director) and other Application (webCoRE) both controlling the same DTH.

I found you can do almost everything in webCoRE and avoid building special purpose Applications (like Fully Kiosk Directory). It does make the solution more in the advance user category, but allows the solution to be customized to specific requirements. That is what is cool about webCoRE, you can take other concepts from various pistons and tailor to your needs!


#6

Love the capability of this DTH but it doesn’t play as nicely with the new smartthings app

You cant control brightness or view battery from the new smartthings app but have some idea’s that I need access to these for, any way we can get them working? Be nice to have all the options but I know smartthings is a pain in the …


#7

As you say, the new app is a PITA. I do plan after the documentation is a little more comprehensible to give a pass on playing nice with the new app (before they shut down the groovy IDE). Hopefully they reverse that decision, but they seem determined to boil the ocean.


#8

I fixed the DTH was not handling the screensaver brightness or brightness itself when set to ‘auto’. New version posted to the same github location.