Advice on custom text display through Hubitat

I am trying to figure out the best way to get custom, variable driven text, into my dashboards from Hubitat (and ultimately from Homeseer). I have Homeseer and Hubitat linked through a plugin.

For example, I want to display a tile that shows the number of people home 1-5. I have this information in Homeseer in a device. I can easily update any device in Hubitat with this information.

So I wanted to see what the recommended approach for Hubitat to Sharptools was for this? Then I can work back to Homeseer from there. Thanks for the help.

If it’s just display of the values in a dashboard and you already have it synced over to an attribute in a custom device, then you can use the Hero Attribute Tile layout to display an attribute from a device.

For now just for display - I am sure I will want to trigger things in the future based on some of these valuables. I am trying figure out which device in Hubitat makes the most sense. I figured it had to be one of the virtual devices but none of them seem to lend themselves well to this process. It seems like most people are using the Virtual Omni Sensor variable to pass strings of text. This seemed like a weird way to do it as it creates all of the other attributes and you only use the one text variable. But would this do the trick?

Yeah, basically any device which has an attribute which roughly fits your needs. For example, if you just wanted to know if something was active or not, then a Virtual Switch or Virtual Motion Sensor could work well. For something numeric, Temperature, Virtual Thermostats, or even dimmable Virtual Switches are popular choice.

Or you could create a custom driver (as long as it implements one of the capabilities that SharpTools can authorize). For example, I made a Custom Values Driver as a proof of concept for this a while back. It has options for a string, numbers, and switch.

Here’s an example post on the Hubitat community where the driver is used to display a Hubitat Rule Machine global variable. The same concepts could be applied here too:

1 Like

That seems like a much better way of doing things. I can create as many devices as I want and pass information to Sharptools. I am going to give that a try tonight.

One related question. Can I pass a string through this that can be placed in a variable. For example, I have the now playing artwork for my home audio system stored in image files that are accessible in my homeseer setup. Then use that variable for image display in Sharptools. So I can pass the web address through to Sharptools to display on a tile.

Yes, using the SharpTools Rule Engine, you can copy data out of a device attribute and into a SharpTools variable.

We don’t currently have a way to display a Text Variable as a Media Tile, but that sounds like a great Feature Request if you want to create one! :slight_smile:

Side note: There’s also a feature request for HTTP Triggers for SharpTools Rules that could enable you to post data directly from Homeseer into SharpTools Variables using SharpTools Rules that you may wish to cast a vote on.

Edit: :tada: HTTP Triggers for Rules are now released!
New Feature: Rule HTTP Trigger

Since SharpTools supports the display of album art for Music Player devices, you could write the image URL directly to a device in Hubitat which implements the Music Player capability.

For the Album Art Tile, the device would need to implement the Music Player capability.

Within that capability, there’s an attribute called trackData (or audioTrackData in SmartThings) which is a string version of a JSON object which should have at least the following fields:

   image: "http://your.album/artwork.png", // 'albumArtUrl' and 'trackImage' are valid alternative property names 
   title: "Track Title" // 'name' is a valid alternative
   album: "Album Name",
   artist: "Artist Name",
   source: "spotify", //optional, 'mediaSource' is a valid alternative property name; icons are displayed for 'spotify', 'google play music', 'apply music', 'pandora', 'amazon music'
1 Like