Driver enroll failed

I have multiple smartthings HUB, the firmware version of HUB is 000.044.0000x

My account A has added 2 HUBs, HUB1 and HUB2. HUB1 has been offline and HUB2 is active.
When I registered the first channel (its name is first_zigbee_sw), I enrolled it under HUB1 in ST Console by mistake.

Today I deleted the HUB1 in the Smartthings APP and executed smartthings edge:channels:enroll , but the ST Console showed the following error message:

PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels

Channel Id Name Description Terms Of Service URL Created Date Last Modified Date

1 781d6689-b523-467b-bd60-e08b728355fa zb_sw_2 add zbminil2 2022-09-25T10:38:15.003139199Z 2022-09-25T10:38:15.003139352Z
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings>
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings>
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings>
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:drivers:package zigbee-motion-sensor
Driver Id 65753d9c-7946-4166-9b1d-fabd1ebd22f5
Name Zigbee Motion Sensor
Package Key zigbee-motion-sensor
Version 2022-09-27T09:56:32.140935492
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels:create
? Channel name: zb motion sensor
? Channel description: add lvmi motion sensor
? Channel terms of service URL:
Channel Id a13e9e27-d9c9-4302-81fd-c1e71416a66d
Name zb motion sensor
Description add lvmi motion sensor
Terms Of Service URL
Created Date 2022-09-27T09:57:44.977766059Z
Last Modified Date 2022-09-27T09:57:44.977766204Z
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels:enroll -H ded7d146-aa03-4494-91f7-d273e3c010fc
Β» Error: Unexpected argument: ded7d146-aa03-4494-91f7-d273e3c010fc
Β» See more help with --help
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels:enroll

Name Channel Id

1 zb motion sensor a13e9e27-d9c9-4302-81fd-c1e71416a66d
2 zb_sw_2 781d6689-b523-467b-bd60-e08b728355fa
? Select a channel. 1
Error: Request failed with status code 500: {β€œrequestId”:β€œD12722B5-7504-41CF-81BE-E06933E5ABA5”,β€œerror”:{β€œcode”:β€œUnexpectedError”,β€œmessage”:β€œA non-recoverable error
condition occurred.”,β€œdetails”:}}
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings>

What could be the cause of this error? How to get back to normal?

I want to share the Driver Channels previously enrolled & installed to HUB2 (its name is zb_sw_2, add Zigbee device to HUB2, APP can correctly identify the device) to another new HUB3 (new HUB and new account B ).

After I execute smartthings edge:channels:invitations:create, it returns a unique URL, when I open the URL, log into account B of HUB3 and accept it, but then the channel info page shows as β€œfirst_zigbee_sw” and I click the [Enroll] button, The [Enroll] button cannot be switched to the [Unenroll] state.
Is this problem due to the first problem? Or do I need to do extra operations on the HUB3?

So, when you deleted the Hub you didn’t delete anything, right? Just deleted it from the SmartThings app.

Is this a channel you created or someone else’s?
Please, in the SmartThings app:

  1. Go to the Hub’s details page
  2. In the Menu (three-dot symbol in the upper-right corner) select the option β€œDriver”.
  3. Then, see the elements listed there and see if the channel isn’t still there.

If it is showing a different Channel name in the invitation I don’t think it is using the correct channel, you can confirm the channel ID assigned using:

smartthings edge:channels:invitations invitationID

The original problem is in HUB1 and, currently, your driver is only uploaded to HUB2, correct? I don’t know if the issue is related

Just as a reference, here are the instructions to correctly share your driver:

Yes,HUB1 is always offline in the APP, I only delete it in the Smartthings APP.
Now as soon as I execute the enroll operation it starts to have an error message (status code 500).
I remember that when I executed the enroll command for the first time, the ST Console would prompt me to select the target hub. After I select HUB1, I created a new channel and re-enrolled without prompting me to select the HubID, which is strange. How can I select or specify the target HUB every time I enroll?

I downloaded the edge drivers from the link below, and then I added some device information to the fingerprints.yaml of zigbee-motion-sensor for testing.

I deleted β€œzb motion sensor” from the drivers & channel list of the APP. Then, I recreated and enroll the new channel, but it keeps getting error now.

I execute β€œsmartthings edge:channels:invitations” in ST Console and it returns β€œno items found”.

PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels:invitations:create
? Invitation name: driver0928
? Invitation description: share the driver channels
? Invitation owner: sonoff
? Invitation termsUrl:
 Id          974d272b-d675-4e17-ab6f-4ac184c1e6b5
 Name        driver0928
 Profile Id  61a79569-e8fd-4a4d-9b9c-a4a55ccdd15e
 Accept URL
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings>
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings>
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels:invitations
no items found
PS G:\smartthings\SmartThingsEdgeDrivers\drivers\SmartThings> smartthings edge:channels:invites                          
no items found

This doesn’t seem right, have you reported this issue to Customer Support? They handle issues in the app (not customization-related) like a faulty Hub.

The command smartthings edge:channels:enroll accepts the Hub device ID as a parameter. This ID is the one you get executing the command smartthings devices --type=HUB. For example:

smartthings edge:channels:enroll xxxx-xxxxx-xxx...

Note: Remember you can see more details and samples of a command if you add --help at the end.

This is curious, it has happened to me before that having a faulty device caused me issues in some commands. If the Hub is faulty, it makes sense that retrieving the Hub’s list causes an error.

To see more info about the error, please, enable the debug mode for the CLI:

For Linux/MacOS

SMARTTHINGS_DEBUG=true smartthings <command>

For windows:


smartthings <command>

When you list the channels from the API (CLI), do you see the channel β€œzb motion sensor” missing?

smartthings edge:channels

This is weird, which version of the CLI are you using?
If you run the invitations command using the invitationID of the one you created, do you get a result?

I could not find the offline HUB1 at that time, it may have been in a state of power off, I have not reported the problem to Customer Support.

As you said, I specified the HUB2 ID after the enroll cmd, and it was able to enroll.
When I create a new shared channel, the name of the channel is still β€œfirst_zigbee_sw”. :rofl:

The version of CLI is 1.0.0-beta.17 win32-x64 node-v16.16.0 .
I am able to get the correct result if I specify the invitationID.

There is good news . If I create a shared channel on the new HUB3 and share it to HUB2, it’s work.
At the moment it looks like I have two problems with the operation:

  1. When I enroll for the first time, I enrolled the first channel to the offline HUB1. This operation caused the channel name I shared under this account to always be β€œfirst_zigbee_sw”.
  2. I deleted the offline HUB1 on the APP , which resulted in the error of β€œstatus code 500” being prompted during enroll.

Later I will follow your prompt to open the debug function to see if I can get more useful information.

Yes, this would be very useful to see if an error is thrown.
Also, if you use the command smartthings devices, do you get an error?

I apologize for taking so long to reply.

After I changed the default Hub and Channel in the CLI configuration (yaml) file to the Hub and target Channel in the active state, All operations are normal.

Thanks for your reply.

1 Like