Maker API Base URL to access Global hub variables

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?

https://cloud.hubitat.com/api/[Hub ID]/apps/[Maker API ID]/globalVariables?access_token=[Maker API Token]

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.

You could also look into a solution like this (adjusting for hub variables instead of RM global variables, an older feature similar in concept): How to export HE Global Vars to Sharptools? - #23 by James - SharpTools.io (web) - SharpTools Community

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?

Hub variables are not at all related to any variables you may use in custom app code (though there is an API for accessing them if you want to).

Then which API are you referring to? I would like to better understand how one would access such variables.

This one: Hub Variable API | Hubitat Documentation

1 Like

I do see Hub Mesh variable changes over the event web socket. I hadn't gotten that far down the event socket rabbit hole yet.

Unknown Event: variable:heartbeat on Photodrome C-7 (0): 370
Unknown Event: variable:heartbeat on Photodrome C-7.2 (0): 918

This may not apply to Sharptools but it did get an "interesting" and raised eyebrow out of me. :slight_smile: