Now that I am developing the SmartThings connector, I am about to pass the certification. I have a few questions. I hope someone can help me.
1. Can I change the range of ColorTemperature in SmatrThing APP
2. Our color temperature is graded ( five leve ), will it affect certification?
3. Can you provide us with complete the Interaction types documentation? because I found some Interaction Types in github, but not found in Official document.
4. Do the following interaction types require authentication before they can be accessed? ( grantCallbackAccess, integrationDeleted, interactionResult )
5. As <Self-test guidelines> amention, we need implement ‘Device must be unpaired/deleted from the SmartThings app properly’, but we can't recieve integrationDeleted request, how we do it?
6. How to unlink our account in ST APP?
It is a pleasure to hear that you’re about to proceed with the certification of your ST-Schema Connector. About your questions, I’ll leave below some information that I hope you find useful.
You can change the range values of your Device Profile uploading a custom UI Manifest JSON. For better reference, you can download the default UI Manifest and apply the changes needed at your Developer Workspace /Device Profile section.
As long as your integration’s reliablity and consistance is guaranteed, it is not a blocker.
Below, some information about these interaction types:
Once your OAuth2 server has completed its workflow, your connector will receive the next Interaction types:
- Discovery Request.
- State Refresh Request.
- Grant Callback Access (which will contain a code to request an Authorization token and use it with State Callbacks and push device status from your cloud).
To trigger an Integration Deleted interaction, delete your Connector from Settings / Connected sevices at the SmartThings app (This also responds to your 5th question).
The Interaction Result is mainly for notifying your cloud that an error in the data exchange has occurred, e.g. a typo of any value at your response, etc.
About your last question, do you mean to unlink you Connector or Sign Out from the SmartThings app?
As you advise, I run some test. And I still have some confuse!
About the range of Color Temperatur
I create a device profile like this:
Set basic Info: Name: D1 Type: Light
Add three components:
Color temperature
Switch Leve
Switch
Set UI Display stat: connection State Default action: Do not display any
I save this device profile, and download it.
I didn’t find any entry(item) to configure the range of Color Temperature.
About Grant Callback Access
We build an OAuth 2.0 server, And it seems successfully link with ST Schema connector.
Our OAuth 2.0 Server received request for refresh token and access token, and I can successfully go through the account link process in ST APP.
But I checked the ClouldWatch, I can only found these two of interactions ( discovery Request, stateRefresh Request ), I can’t found grantCallbackAccess interaction.
In this case, do you have any suggestion to help us solve this problem?
By the way! My compute is archlinux, and my chrome version is Google Chrome 80.0.3987.116,
my firefox version is Mozilla Firefox 71.0, And I can’t create Submit a Ticket. because I can’t select the category.
Below is an example of the Color Temperature section at the UI Manifest JSON with a range attribute included. It will determine the new range values following the Color Temperature capability specifications.
To give you further assistance regarding the Grant Access Callback, it would be very helpful if you could share with us how is that you’re handling the Interaction Types.
A didn’t find the field of range, and this document didn’t contain order:4, order:5, order:6.
And I just need add the range field and don’t need to care order field. right?
About Grant Access Callback
Here is my Node.js Code. and put it in AWS Lambda.
exports.handler = (evt, context, callback) => {
console.log( `event -> ${JSON.stringify( evt, null, 2 )}` )
if( ROUTER_INTERACTION[ evt.headers.interactionType ] ){
ROUTER_INTERACTION[ evt.headers.interactionType ]( evt, callback )
return;
}
}
var ROUTER_INTERACTION = {
'discoveryRequest': lfDiscoveryRequest,
'stateRefreshRequest': lfStateRefreshRequest,
'commandRequest': lfCommandRequest,
// 'grantCallbackAccess': lfGrantCallbackAccess,
// 'integrationDeleted'
// The Interaction Result is mainly for notifying your cloud that an error
// in the data exchange has occurred,
// e.g. a typo of any value at your response, etc.
// 'interactionResult':
}
I can find event -> ... discoveryRequest ...event -> ... stateRefreshRequest ...event -> ... commandRequest ... in AWS Cloud whatch.
But I can’t find event -> ... grantCallbackAccess ... in AWS Cloud Whatch.
Regarding the UI Manifest, as you’ve said, just add the range field at every JSON that specifies the Color Temperature capability and you can leave the rest of the values as default.
As for the Grant Callback Access, verify that the ARN’s region matches the region at the Developer Workspace, e.g.: