Is this the proper base URL (Cloud) to use for a SharpTools dashboard tile to display variable changes taking place in real-time from RM rules that manipulate those hub variables?
No, where did you find that? Maker API does not support hub variables.
A Rule Machine rule can use an HTTP endpoint to set a hub variable, but I can't think of any existing way to get the value directly over a similar endpoint. You'd probably need to create a connector (of whatever type works for your particular application) and then use that device in Maker API -- if you're just looking to display the value. It's not clear if that's what you mean.
I will definitely look into that approach as I'm certainly struggling with Hubitat/SharpTools integration currently. My RM rules are manipulating variables to calculate metrics made from movement & door opening patterns, & its that information that I'm trying to use to create data visualization charts using SharpTools Custom tiles. Not as easy as it sounds.
Since Hubitat Globals aren't exposed via maker API, if I create a Hubitat user app. that creates its own variables, do I also have to replicate those same variable entries in Hubitat/Settings/Hub Variables?
Data Flow as I understand it.
Sensor Events → Hubitat Parent/Child App → Event-Driven Hub Variable changes → Hub Variable API → SharpTools Dashboard rcvs. Real-time Updates
So if I want to fully leverage the Hub Variable API to send event-driven variable updates to a SharpTools dashboard as they occur, its my understanding that I have to bind/map those hub variables with SharpTools directly (event-driven updating vs. SharpTools polling Hubitat for data using HTTP calls via Maker API).
What I'm struggling with is getting SharpTools Custom Tile dashboards to easily & correctly subscribe to/bind with hub variables and update in realtime when those variables update their values over time.
Is it correct that if I hard code Parent/Child Groovy apps. (or create Rule Machine rules for that matter) that declare & manipulate hub variables to perform variable math, set variable values, etc. I ALWAYS have to manually add the same variables within Hubitat Settings/Variables simultaneously as well.
@josh - In order to properly integrate Hubitat hub variables directly with SharpTools (stio?)using only the Hubitat Hub Variable API (& not treating them as “connector devices” or THINGS, nor using Hubitat Maker API):
If all hub variables are declared upfront in that 1st code block section at the top of a Custom tile HTML/JS/CSS file, do I also need to manually declare each variable in ShartpTools (Manage Resources/Variables) even though the 1st code block section in a Custom tile's “tile settings” already references those same variables?
What is the correct naming convention that SharpTools requires those hub variables to be on order to bind/subscribe correctly? Hubitat prefers using snakecase i.e: wellness_score; I think SharpTools works with camelCase i.e: wellnessScore.
I'm hoping someone can help me demystify how to get this Hubitat/SharpTools integration up & running ... I feel I'm getting close!
This seems like the same question you asked in your other topic [EDIT: these are both now merged together since that was indeed the case], and as been explained to you there, hub variables are a feature entirely distinct from any Groovy variables you might create in your own app (or driver) code. If you want to use hub variables in your app, you'll need to use the hub variables API that we have discussed in that topic. If you create Groovy variables in your app, they are just that.
I'm not sure about the SharpTools side of things that forms the other part of what sounds like your ultimate question.
If it would be helpful to have hub variables accessible via Maker API, that could be looked into, but I'm really not sure what the issue is here. SharpTools itself could also be updated to allow direct access to hub variables using the same API as above if the developer is interested.
Thanks for clarifying. I'm now trying not use Maker API for my use case since I don't want SharpTools to poll for data. Instead, I want to be able to update a SharpTools dashboard from event-driven variable updates as they occur in real-time from either Groovy apps. or Rule Machine. Its my understanding that the Hub Variable API is the way to go to accomplish this. The correct method for binding/subscribing Hubitat hub variables to a SharpTools Custom tile using the Hub Variable API is the goal (& where I'm having difficulty doing so successfully).
i.e: I created a Custom tile that uses dummy data to prove charts/graphs/external JS libraries load & render properly (which they do). Now I simply want to replace that dummy data with actual event-driven updates as they take place (hub variables updating themselves as governed by Groovy apps and/or Rules) to now drive my dashboard's data visualizations/charts/graphs. Any & all advise on how to do just that welcomed ...
I'd suggest by starting to the post on the SharpTools forum that I linked to in your other topic:
You don't need the hub variable API for that unless you're writing a custom app to replace the rule. I wouldn't recommend starting there if you are not already familiar with that.
I'm also going to merge all these topics into your original post to eliminate confusion since this all looks like the same question.