Am I publishing my channel invitations correctly?

I recently shared a driver that I wrote.

I used smartthings edge:channels:invite to publish it.

Here is the link:

[Subscription URL] (SmartThings. Add a little smartness to your things.)

If I review my local setup, I see:

smartthings edge:channels:enrollments

 721a4912-8629-4ae3-ac89-ff8e36bf03cf  VRCS4                       LEVITON 4-port switch                                                                             2023-01-13T15:19:07.616000279Z  2023-01-13T15:19:07.616000413Z

but my meta info states:

henryrobinson@RobinsonFamily smartthings % smartthings edge:channels:metainfo    
 #  Name   Channel Id                           
 1  VRCS1  175fe0f8-d398-4fc7-b9de-2dcb69313bd9 
 2  VRCS4  721a4912-8629-4ae3-ac89-ff8e36bf03cf 
? Choose a channel to get meta info for. 2
 #  Driver Id                             Name                                      Version                        Package Key         
 1  4301547f-5a15-44e2-8f17-f147eccc9608  Z-Wave Leviton 4-Button Scene Controller  2023-02-23T16:26:07.029134998  zwave-leviton-VRCS4 

If you look at the last modified dates, they don’t agree. My local driver seems to be 1 month different. My question is: how do I confirm that my latest version of the driver has been published?

That way I can verify that people will be reporting issues on the latest copy?


With cli command

smartthings edge: channels:drivers

This the list of all CLI commands

1 Like

Hi, @harobinson
Just to be clear, the command β€œedge:channels:invite” doesn’t publish a driver, it β€œenables” an invitation where users can enroll their hub to your channel.

If you package a new version of the driver, you need to assign that new version to the channel required with the command smartthings edge:channels:assign .

I just made a test and the command β€œedge:channels:metainfo” showed a previous version because I only packaged the driver but didn’t publish it to the channel, so, that could be happening in your case.

1 Like

When you do smartthings edge:channels:metainfo you are getting the metadata of the drivers assigned to the channel. The date that you see in the default output is the version number of the drivers that are in the channel or in your case a single driver.

When you do smartthings edge:channels:enrollments you are getting metadata of the channel itself. The modified date you see doesn’t reflect the contents because a channel doesn’t actually contain anything as such. It’s not like a folder.

Thanks for the info. I did as recommended and added the command β€œsmartthings edge:channels:assign” which I think was redundant as the -I option in the β€œsmartthings edge:drivers:package -I” should automatically do this.

As recommended, I invoked β€œsmartthings edge:channels:drivers” and it gave me info on the latest driver installed.

I would suggest that SmartThings look at whether the enrollments and metainfo options should be updated to reflect the latest edition of the driver installed. Otherwise, I’m not sure what the β€œLast Modified Date” is useful for. That’s just my comment.

But learning as I go.

The edge:channels:metainfo option does reflect the latest version of the driver assigned to a channel.

The edge:channels:enrollments gives you a list of the channels that one of your hubs is currently enrolled in. It says nothing about the drivers currently assigned to that channel at all.

Bad link doesn’t work

That is the β€˜Subscription URL’ that is used once you’ve accepted an invite to a channel. The one you need to publish is the β€˜Accept URL’ which is somewhat more anonymous. You’ll find that using smartthings edge:channels:invites.

I don’t know if β€˜Accept URL’ and β€˜Subscription URL’ are the official terms or just what the CLI team decided to call them.

1 Like

The command that can help you package, assign to a channel and install the driver (on your Hub only) in a single line is:

smartthings edge:drivers:package driver_path --channel=channelID --hub=hubDeviceID

If you want to get the latest version of a driver installed (in your Hub only) use this command: smartthings edge:drivers:installed

Note: You can see the usage of each flag when you add --help at the end of any command.

To clarify, these are a few things you need to consider:

  1. When you assign a driver to a channel, you’re not installing it on people’s Hubs or yours. It only β€œpublishes” this new version.

Note: Users can check the version they have installed by following these steps:

  1. Open the app and go look for the device.
  2. Enter its details and click on the menu (three-dots symbol in the upper-right corner.
  3. Select the option β€œDriver” and they will see the version there,
  1. In the case of users enrolled in your channel that installed your driver, they will get the latest update up to 12 hours after you publish it.
  2. For your Hub, you need to install it directly (edge:drivers:install)