I’ve been working on integrating a custom-built Hubitat app running on a Hubitat hub with a SharpTools dashboard using a ST Custom tile I created for data visualization. The Hubitat app monitors motion sensors assigned to rooms and tracks & reports overall activity patterns and I can’t seen m to get the Custom tile and Hubitat app. to connect and start passing sensor data from Hubitat, collected through ST and onto my dashboard. I’ve attempted the following integration approach:
SharpTools IO (STIO) Direct Integration
Initially attempted to use SharpTools’ built-in STIO (SharpTools IO) system, which (as I understand it) is designed specifically for real-time communication between authorized Hubitat devices and SharpTools dashboards.
Implementation Steps Taken:
Created a SharpTools IO Bridge as a device on Hubitat
Modified my Hubitat GROOVY app to send data to this bridge
Added data-stio="true" attribute to the Custom Tile that I’m building to visualize sensor data
Browser console showed persistent “STIO not available” errors
Diagnostic tests confirmed STIO objects were not accessible in the tile’s JavaScript environment
Cross-origin restrictions prevented accessing STIO from parent frames
Is there something I am missing (or not properly configuring via Custom tile settings) that is causing STIO connection failures (unable to connect properly and start receiving sensor data from Hubitat app?
What are these steps from? Was this from an AI as I’m not aware of these steps and it sounds potentially hallucinated.
You can find the steps on using the stio JavaScript library for real time integration here:
If you want to try leveraging an AI for this, you might try feeding it the content from the page linked above as well as the content from the stio Library page as context, but in my experience the LLMs still tend to hallucinate for this kind of integration for some reason.
Thx for your response Josh. I’ve been seeing (Firefox) browser console errors related to establishing and maintaining STIO connection between my ST Custom tile & a hubitat driver (acts as a virtual device bridge utilityof sort) to poll motion data and it would just fail to connect & retry over & over. I do have a device bridge app on Hubitat meant to help in sending sensor event updates to my tile.
If I sent you my Custom tile code (and Hubitat app. if interested) - could you comment further? STIO vs.Maker API approaches are what I’m trying to better understand - hey I’m a curious newbie.
It appears to be from what I can tell. I’m starting to troubleshoot things further & will be sure to post addition questions as I work through the Custom tile I’m building that will be working in tandem w/a ST rule. I’m more experienced in writing rules in Hubitat & I’m wanting to create a rule that repeats using your Rules Engine. How can I set a rule to repeat every “X” minutes? Options available don’t seem to include this.
What I’m trying to achieve is to have this rule fetch data from a STIO device driver(seen as a virtual device) via Hubitat’s Maker API and populate variables for use by my Custom tile.
It’s not officially supported currently. Some community members have come up with creative workarounds, but it’s generally an anti-pattern if there’s some way to get the data in an event driven way.
For example, if you have a device that has data you are interested in, it’s generally better to create a rule that has a Trigger for your device’s particular attribute updating/changing and then react to that within your flow (for example, copying the data over to a variable if that’s your use case).
If you are building a SharpTools Custom Tile, then the stio Library can directly access data from a device attribute and use or display that data within the Custom Tile directly.
When editing your Custom Tile, you would need to setup a Thing setting in the Custom Tile which would let you pick your desired ‘Thing’ from a dropdown when configuring your actual tile instance on your dashboard. Then in your Custom Tile code, you would use the stio Library to reference your ‘Thing’ setting and subscribe() to your desired attribute if you need realtime data and then access the current attribute value or real time attribute update event values as needed.
The “Access to Things and Variables” release thread included some example custom tiles for reference: