I just lost all of my hubitat devices in sharptools after updating some devices in the Sharptools app. Is there something down or is this an issue on my side? Thanks.
This might have something to do with it? It seems like the devices are showing up slowly. Interestingly I was deleting devices from the connection - so reducing the amount of devices. Anything I can do to avoid this? Thanks.
What’s more concerning to me is what you reported in the SharpTools community that when you proceed through the (OAuth) authorization flow, you don’t see the categories or list of devices with checkboxes to authorize.
I have maybe 3-4 similar reports that have come through in the recent week about the OAuth screen being empty with no categories/devices and thus the authorization failing or synchronizing across 0 devices. But I don’t have enough details from these reports yet to see any common patterns between them.
What else has changed recently with your configuration? New hub software version? Hub migration? Major app / driver changes? Etc?
I’m not able to reproduce it on my Hubitat hubs running 2.4.1.177 and 2.4.1.146 and it’s not clear to me if it’s a hub software version or some combination or hardware and software or what is causing the issue.
Do you have other Hubitat hubs and are you able to reproduce it on ALL of the hubs? If not, it might be helpful to note significant differences between them.
Good (mine):
Bad (yours):
Sharptools is connected to two C8Pros. They are both running 2.4.2.125. Most of the interactions with Sharptools are through one hub.
Although I have seen this issue before it does seem like it showed up again in the past week or so. There have been a couple of updates to the hubs in recent weeks. However I can't point the finger at this as I am not always updating my devices being shared.
What brought this to the forefront is that I completely rewrote the Bond hub driver. So this mean't swapping out all shades and fans and making some wholesale changes to the devices shared. I would say about 35 total - deselecting the old devices and adding the new ones.
This morning I ran a test and changed a few devices in the Sharptools app on my main Hubitat. I got this. Now this could have been going on for some time and I just didn't notice it.
Then I went to the hub with only about 25 devices being shared and turned on logging and got this:
Both hubs are showing this in Sharptools:
Yet the devices are working in Sharptools.
I am continuing to test it. I just added and deleted some new devices. The Sharptools app has been working on it for several minutes now:
Apparently it took about 3 minutes:
Devices updated and are working. Still showing nothing under Manage Connections.
When you get to this screen on either hub, are you just proceeding with the Authorize button or are you going back to the SharpTools App on your Hubitat hub and updating your device selections there?
I'm wondering if this particular issue more of a Hubitat OAuth rendering issue and if you already had the devices selected, then even though the device categories and checkboxes for devices aren't showing up, they're still selected behind the scenes so it's keeping them selected when you tap Authorize to complete the process.
--
Do you still have your C7 and older hubs and are you able to check with those?
Device Sync: Large JSON / byte size response
The Large JSON response isn't a major concern for me and you can see what it's doing in your screenshot where you enabled the additional logging.
Device Sync Explanation (tap to expand)
During the device sync process, SharpTools gets the details of your devices in batches. From the bottom up, you can see that it:
- First request at
0
and asks for20
devices - Then the next sets of
20
starting at position20
, then position40
, then position60
- At position
60
the app logs a warning that the JSON response might be too big- And Hubitat logs its own error showing that it was too big.
- It retries position
60
with10
devices instead of20
as an attempt to get a smaller response and it succeeds - So then it continues on starting from position
70
with20
devices, fails, then retries at position70
with10
devices and succeeds - It looks like it finishes around position
80
with the final set of20
devices
The retrying during a device sync isn't a major concern since it's able to recover automatically. The most common cause of this is using a community driver that stores a significant amount of data in the device 'state'.
You could try to narrow down which devices are contributing to the issue through some trial-and-error of unchecking big blocks of devices (perhaps with similar drivers) and see if you still get the warnings and errors about JSON / byte size.
If it's your custom Bond drivers, you could try reducing the verbosity of the attribute state in the driver and try storing that information elsewhere to avoid bloating the device state.
The device sync process will retry the batches all the way down to a batch size of 1
device and if it's a single device that is too big to sync across, it will ultimately skip that device. Of course, having to retry the batches during the sync will slow the process down but it sounds like it's still ultimately completing for you.
I only manage the devices through the Sharptools app on the hubitat side. I only go the manage connections in Sharptools when something goes wrong.
I did not click the authorize button in Sharptools with no devices showwing/selected as I was afraid to wipe out the connections of devices selected in the Sharptools app in Hubitat? Would you recommend clicking authorize even though no devices are showing?
I do have a C7. It does not have any devices selected in the Sharptools app in Hubitat so I went ahead and selected one device and then proceeded to sync. It shows up fine in dashboards and shows the same thing:
I don't think it is specifically related to the Bond drivers. It just happens that I was adding them to the Sharptools Hubitat app when I noticed this issue. I was adding 1-2 devices in Hubitat, testing them, then adding them to Sharptools, repeat and rinse. This repeated adding in small batches was what highlighted that something was going on. Now, looking at the logs, it may be that it was still completing the sync from the previous addition of devices when I started to add more devices and this caused the dashboards all to switch temporarily to placeholders?
So - bottom line. The connection is working. I think I know what caused the temporary placeholder situation? Still not seeing any devices in the Authorize Sharptools to access your devices but that is not impacting me as I maintain the devices on the Hubitat side.
@gopher.ny and @bobbyD are there any additional diagnostics that users could gather about this issue or are there (server) logs you could access to help identify why the OAuth screen is blank where the categories and list of devices + checkboxes should be?
@Woodtimdoit let's consolidate the discussion regarding the blank OAuth screen here.
You mentioned that you recently updated your hub version to:
Does that imply that you did not have this blank OAuth screen issue before the version update? Which Hubitat platform version were you running previously?
You also mentioned that the OAuth screen is blank on any of your 4 hubs. The same questions I asked Simon apply here as well:
I have older versions installed on test hubs and I’m not able to reproduce the issue with these:
- C-4 with platform version 2.4.1.177
- C-5 with platform version 2.4.1.146
That being said, I only have 3-5 reports of this and it’s not clear to me if it’s just the hub version or some other factor (apps, drivers, etc) that are contributing.
I'm updating the C-5 to 2.4.2.126 currently to see if I can reproduce the issue after the platform version update and I'll update here once I've tested.
After upgrading from 2.4.1.146
to 2.4.2.126
, I am able to reproduce the issue:
There doesn't seem to be anything logged in the browser console and based on the network requests and a comparison against my other working test hub, it looks like the content of this page is rendered server-side... so hopefully Victor or Bobby from Hubitat are able to pull some logs or share some insights.
--
Edit: Interestingly, this does not seem to impact the OAuth flow for IFTTT, Google Home, or Alexa which just use a single generic Which Devices?
/ Select Devices
category.
Can you PM me the hub id?
I can reproduce the issue, and clicking Authorize indeed removes all previously selected devices. Checking it...
Fix coming in the next build.
Thanks for looking into it and the quick response!
I upgraded from 2.4.2.126
→ 2.4.2.129
and can confirm that it has resolved the issue as noted in the 2.4.2.128 release notes. Thanks again for the quick response!