Struggling with getting devices live

Hi,
I’m writing a schema integration (just a sandbox test for now). I did follow the WebRTC tutorial and got it working (except that on second try, the invitation did not work for whatever reason).

Then I’ve written my own implementation from scratch to make sure I understand it all.

I create the schema app and a device profile. I’ve created an invitation and the authentication required to accept it. I’ve implemented all webhooks and don’t get any error responses (“interaction results”) anymore.

On my phone, I’ve accepted the invitation and I can see the device in the grid. But it’s disabled, and if I click it I get the error:

“Can’t connect to device. Check device and try again.”

I do get a “command request” webhook when I click it:

{"externalDeviceId":"1000","deviceCookie":{},"commands":[{"component":"main","capability":"st.imageCapture","command":"take","arguments":[]}]}

I’ve made sure to setup the device profile exactly like in WebRTC example, and the states I report are also exactly the same.

Any idea how to continue debugging this? I can’t find any logs or anything else to help me at this point.

I’ll be glad to post whatever code or request/response captures that could be useful in debugging this. I would also prefer to create a much simpler device profile and device than the WebRTC example, but since that’s the only example I’ve seen working, I did an exact copy of that.

All I want at this point is some basic but statble “hello world” implementation.

Tagging @nayelyz

Hi, @jomag

I haven’t gone through the sample completely, but when you cannot open the device’s detail view, you need to verify:

  1. The device appears in the API (devices endpoint)
  2. All the properties are set correctly (the main to verify are capabilities, presentationId, profileId)

I think for testing purposes, you can create the schema connector in the Developer Workspace and then “deploy it to test”. This should make it available in your catalog (Add device - Partner devices - Recommendations - My testing devices).
These instructions can help you go through the registration process: Schema Devices and Custom Capabilities

Remember you need to enable the developer mode in your ST app.

Thanks for the tag, @Andrew_Bartlett

1 Like