[RELEASE] Virtual SharpTools Image Tile device driver

I have been looking for a realtime image display solution for project and after some thought came up with a modification of the SharpTools Premium Art Tile as a 'workaround' to suite my requirements.

Generally, this will allow you to display REAL TIME images local or web and use it as a button controller from a SharpTools dashboard.

This DTH was originally just a test harness to prove the solution can work, but it should have some legs to run on its own. I put hooks in the configuration to allow for various use case configurations:

  • The basic default configuration is just a On/Off switch that you can assign an image to each. This can be disabled if you want to use webCoRE, Rule Machine or SharpTools Rules to update the images directly.

  • The "Enable Switch to act like Momentary button" configuration will bounce the On/Off switch back to 'Off' after 1 second.

  • The SharpTools tile allows you to 'press' or 'double press' so those are translated into 'push' or 'doubleTap' button types - again usable in webCoRE, Rule Machine or SharpTools Rules.

  • If you turn off 'Toggle Switch when Tile is single tapped' and/or 'Toggle Switch when Tile is double tapped' you can then enter images to be displayed on those actions.

  • The metadata1 and metadata2 fields allow for you to set for use in (again) in webCoRE or Rule Machine.

  • The description command can be used with the SharpTools Hero functions as a simple realtime text tile.

The commands you should use are:

  • off
  • on
  • push
  • doubleTap
  • toggle
  • updateDescription (string)
  • updateImage (string)

Enjoy!

https://github.com/bloodtick/SmartThings/blob/master/devicetypes/bloodtick/virtual-sharptools-image-tile.src/virtual-sharptools-image-tile.groovy

2 Likes

Nice work! And creative use of the Album Art Tile!

1 Like

Sounds cool. Would you be able to describe a use case so that it’s easier for me to understand what can be done with this?

I'll give it a look and report back! Thanks!

This is amazing! Thanks!

Just need a way to reliably host some images now, locally.

Any suggestions? =)

The local storage on the Hubitat hub works great. (I have been requesting Groovy access to this area, please bump this thread to help!):

Goto "Settings"->"File Manager"->"Upload" and store your image file. Then click on it and you can copy the URL directly into the DTH.

This works great, but the images will not be visible on the SharpTools outside of your home network. I use GitHub for hosting items outside of network.

1 Like

Done =)

Also, have you seen this?

I have reviewed and it is an innovative idea, but as the author points out it has a lot of working requirements to make it functional. Hoping at some point they open that area up directly for Groovy access to make an 'easier' solution available. I do have a AWS solution using API Gateway, Lambda and S3 for private external storage, but it is an advance solution beyond scope here for sure.

1 Like

Quite. It's just melted my mind, just reading it. Ta tho =)

I have found that Fully Kiosk Browser will update its camera capture (if you allow permissions) and you can toggle by putting an alternating time value in the access URL. Suggest your first get it working in a browser window but it should look something like this:

http://192.168.1.37:2323/?cmd=getCamshot&password=1234446&time=1

Note the &time=1 and &time=2 parameter changes.

Cheers man. I'll go with the github hosting I think. More on my level =)

1 Like

Cool. You can see some of my objects here:

You will want to use the raw image by right clicking on the image itself and 'open in a new browser window'.

Should look something like this to copy into the device handler:

https://raw.githubusercontent.com/bloodtick/SmartThings/master/images/icon-channel-cbs.png

to display something like this:

Awesome. Off to work so I'll have a proper peek later and post back. It's kinda been on my list for a while - essentially having a traffic light style visual to let me know if there's been motion in a particular area now, 5 mins ago, 10 mins ago, longer. That kind of thing. Not sure how I'll integrate just yet.

Kinda off-topic, but I'd played with a virtual thermostat tile (which I've yet to sort out fully). Use webcore/age Piston to alter the virtual value. Then sharptools can colour automatically depending on that value.

It's a huge shame sharptools can't run local.

Would this allow you to dynamically generate URLs for images based on real-time changes to other devices? I'm thinking of updating a map with location POIs for people based on GPS coordinates.

Not sure I follow the question. You can use the updateImage( string ) command to display any image in near realtime, so if you have a webCoRE piston (or Rule Machine) that captures or builds an image, send that URL location and it should display on the SharpTools dashboard.

So this is returning the actual image, not a URL to an image?

I'm thinking of when you use a mapping API to generate a dynamic map, like here:

It's easy to encode POI into the URL to show up on the map, but I want to dynamically do that when something like a GPS sensor updates with Lat / Long so I update the image URL and the image tile in Sharptools will be mapped to that attribute and update.

I'd also be interested in capturing images from my tablet on motion and putting those somewhere where Sharptools can show the latest.

Do you use SmartTools? [yes] and Fully Kiosk Browser?

I use SharpTools with FKB. I figured out a way to capture the image and send it to myself using Node-RED

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.