As @h0ckeysk8er comments the driver probably cannot pair with the fingerprints of this button. Your OP made me reply suggesting this driver, as lately it has been a common request, but maybe this is not a device that can pair, Tuya being a world on its own. Have you tried changing the driver on the app?
Going back to square one maybe you should specify model of the device and (Rule Nº 1 - always specify make and model as clearly as possible!) probably somebody could make another suggestion.
Sorry, I’ve been tied up and haven’t been able to look at this. I’ll try to investigate when I have some time, but in the meantime, let me know if there is a code change I need to make.
Graham’s post suggested needing to filter the list of drivers for a device so that only drivers the device can use is displayed. His post said to filter the list using ?deviceId={{deviceId}}
.
I think adding the filter to this call const drivers = await fetchdata(
hubdevices/${device_hubid}/drivers);
as suggested here API | Developer Documentation | SmartThings although I think the syntax might be just const drivers = await fetchdata(
hubdevices/${device_hubid}/drivers/${deviceID}`
Have you made this work? I tried your syntax and it didn’t filter. The API doc says to just add the deviceID itself like this:
https://api.smartthings.com/v1/hubdevices/2ca01359-7f67-XXXX-XXXX-172e72b0423f/drivers/77cc71e2-XXXX-XXXX-82b3-8fecacf24ae9
I get this:
{
"error": {
"code": "NotFoundError",
"message": "Driver (77cc71e2-XXXX-XXXX-82b3-8fecacf24ae9) is not currently installed on hub 2ca01359-XXXX-XXXX-9887-172e72b0423f",
"details": []
}
}
Have you made this work? I tried your syntax and it didn’t filter. The API doc says to just add the deviceID itself like this:
I tested it (though I never use the /v1 in the path) and it is how the CLI does it too. It is also what the API says to do.
I really don’t understand why they don’t actually show the path templates for the API calls. You have to look at the pseudo-example to find out.
Basically they have an API Reference that doesn’t usefully show the API.
That’s the syntax to get info on a particular driver that is installed on the hub.
I really don’t understand why they don’t actually show the path templates for the API calls. You have to look at the pseudo-example to find out.
Basically they have an API Reference that doesn’t usefully show the API.
Yeah, that would be helpful. Turns out I was fat-fingering the case in deviceId
Turns out I was fat-fingering the case in deviceId
Oh I do that all the time. It doesn’t help that I personally use all lower case for my own code.
The similar ‘locationId’ appears a lot in the API as a query string variable name. Except once in the /activities endpoint where it appears to just be ‘location’.
Another formatting request. For the Fingerprints in the Details of drivers that support Matter, can you change the output for the vendorId, productId, and deviceTypeId to hex like you did for the Device Details?
Thanks!
@TAustin ,
I can’t open https://toddaustin07.github.io/browser/
, I tried many times but it is always " This site can’t be reached"
and "DNS_PROBE_FINISHED_NXDOMAIN"
Can you please help ?
Did you try other browsers or disable any blockers you may have? I just tried it and it works without any issues.
Try this direct link also: https://api-browser-plus.pinsky.us//
Thank you for answering. It was a problem with DNS server. I never touch this setting and leave in auto mode, but when I change it to:
Everything works again.
This is fixed…for now. The API endpoint I’m using isn’t officially supported, so I may have to adjust this again in the future.
Now might be the time.
When I tried disabling a rule via the API Brower+ today, it threw an error. However, I found that enable/disable is now available through the api.smartthings.com
endpoint, although it still responds with 204 No Content.
Not sure how long it’s been that way, as I haven’t had tried either of these commands in a while.
However, I found that enable/disable is now available through the
api.smartthings.com
endpoint
So it is. It is good to have it back. It always seemed a bit odd that it stopped working in the first place.
Can you please add to HUB details also the information that can be found here:
https://api.smartthings.com/v1/installed-hubs/{hub-id}
The most relevant fields in my opinions are:
"driverCountLimitStatus":"Ok",
"driverMemoryLimitStatus":"Ok"
You can add others as well… This is the only place that can give you some information about hub memory usage. I was unable to find those on Location → Hubs → Select your hub → Details
This is the only place that can give you some information about hub memory usage.
Here you go:
Thanks,
But I prefer this tool. SmartThings® API Browser+
This is the only place that can give you some information about hub memory usage.
To a Personal Access Token, yes.
I’ve been using that endpoint for years and it has always given the impression of being a bit of a relic. The same content is now split between the device object and the hub characteristics, the latter being where the Advanced Web App reads the memory information. Sadly PATs don’t currently have the security scope available that will allow the characteristics to be read as that would be a neater solution, yet curiously you can grant Smart apps the necessary scope.
grant Smart apps the necessary scope
Wow, I didn’t know that there are Smart App that able to give info. regarding the Hub Memory in use. Can you please share some of them…
Personal Access Token,
I though that PAT is the key you enter in API Browser + in the settings screen , and if I can get the information via (http://api.smartthings.com) command this can also be display in API Browser +.
I though that PAT is the key you enter in API Browser + in the settings screen , and if I can get the information via (http://api.smartthings.com) command this can also be display in API Browser +.
Anything you can get using a PAT could also be added to the API Browser+ if Todd feels it is appropriate.
PATs can only be created with a limited range of security scopes and that doesn’t get you everything. Unless they have added more scopes lately it won’t get you https://api.smartthings.com/hubDevices/{{deviceId}}/characteristics
which is where you’ll find the bits of /installed-hubs
that aren’t in /devices
.
The SmartApps I was talking about are community created Webhook SmartApps. You are only offered a limited range of scopes when creating them in the Developer Workspaces but you can add in some extra ones via the API. You are limited to accessing the Location the app is installed in, whereas a PAT allows you broader access at the User level.
I haven’t messed about extracting the token from a Webhook SmartApp lately, but there is some low hanging fruit in the form of the CLI. Run a CLI command and then look in %LOCALAPPDATA%\@smartthings\cli\credentials.json
(in Windows) and you can grab an accessToken
valid for the next 24 hours that you can try using instead of a PAT. It certainly turns a request for the hub characteristics from a 403 to
{
"driverMemoryLimitStatus": "Ok",
"zwaveAvailability": "Available",
"zigbeeAvailability": "Available",
"failoverAvailability": "Unsupported",
"matterAvailability": "Available",
"backupEncryptionPublicKey": {
"kty": "EC",
"crv": "P-521",
"use": "enc",
"kid": "XXXX",
"n": "XXXXXX",
"generationDate": 1695404222
},
"remoteFactoryResetAvailability": "Available",
"matterSoftwareComponentVersion": "1.3-0",
"threadRequiresExternalHardware": false,
"matterRendezvousHedgeSupported": true,
"edgeDriversAvailability": "Available",
"lanAvailability": "Available",
"hubLocalApiAvailability": "Available",
"hubReplaceAvailability": "Available",
"zigbeeDeviceDiagnosticsAvailability": "Available",
"batchedInventoriesAvailability": "Available",
"localVirtualDeviceAvailability": "Available",
"hedgeTlsCertificate": "-----BEGIN CERTIFICATE-----\nXXXX\n-----END CERTIFICATE-----\n",
"primarySupportAvailability": "Unsupported",
"secondarySupportAvailability": "Unsupported",
"childDeviceAvailability": "Unsupported",
"matterDeviceDiagnosticsAvailability": "Available",
"zigbeeRequiresExternalHardware": false,
"zwaveRequiresExternalHardware": false,
"inventoriesSupportMatrix": {
"inventories": [
{
"name": "BEHAVIOR",
"version": 1
},
{
"name": "DEVICE_MQTT",
"version": 1
},
{
"name": "CAPABILITY",
"version": 1
},
{
"name": "DEVICE_LAN",
"version": 1
},
{
"name": "DRIVER",
"version": 1
},
{
"name": "DEVICE_MATTER",
"version": 1
},
{
"name": "PERMISSION_POLICY",
"version": 1
},
{
"name": "DEVICE_HUB",
"version": 1
},
{
"name": "PROFILE",
"version": 1
},
{
"name": "DEVICE",
"version": 1
},
{
"name": "PERMISSION_PRINCIPAL",
"version": 1
},
{
"name": "DEVICE_ZWAVE",
"version": 1
},
{
"name": "HUB_GROUP",
"version": 1
},
{
"name": "DEVICE_ZIGBEE",
"version": 1
},
{
"name": "HUB_CONFIG",
"version": 1
}
]
},
"zigbeeManualFirmwareUpdateSupported": true,
"driverCountLimitStatus": "Ok"
}
That’s too much… All I wanted is the memory usage in API Browser +. If @TAustin can add it, this will be great. Nothing else.