Unable to attach log listener

I followed the instruction for the Hello World edge driver sample. Everything went smoothly except attaching to the hub to see logs.

PS C:\sample\HelloWorld> smartthings.exe edge:drivers:logcat --hub-address=192.168.1.12
    Error: Request failed with status code 403

Apparently I need to tell the hub to allow log listening. How do I do that?

This issue could be related to the generated Access Token. If you run the command smartthings edge:drivers, do you get a result or the same error?

I get a result. As I mentioned all steps went smoothly. I installed the driver to the hub, I just cannot attach the log listener.

PS \DayPartDriver> smartthings.exe edge:drivers
β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ # β”‚ Driver Id                            β”‚ Name        β”‚ Version                    β”‚ Package Key                β”‚
β”œβ”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1 β”‚ 47fb3018-ff74-3099-ab3f-8830be5fa830 β”‚ Hello World β”‚ 2021-09-17T15:02:25.696774 β”‚ com.smartthings.helloworld β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I also have exactly same problem here.

I have two ST hub. One works fine, but only the newly installed hub has this problem.

I can install the driver, and get the list of the installed driver, but only logcat fails.
(which means, there’s no problem with the token)

This is a V2 hub and the hub firmware version is 43.4.

think@utility:~$ smartthings edge:drivers:installed
β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ # β”‚ Label              β”‚ Name               β”‚ Device Id                            β”‚
β”œβ”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1 β”‚ Smartthings Hub V2 β”‚ SmartThings v2 Hub β”‚ c1cba303-52ef-4344-b9d0-027a7d831f04 β”‚
β”‚ 2 β”‚ Sub Hub            β”‚ SmartThings v2 Hub β”‚ e09cd8a8-4a97-4bd8-870c-40e7968aef52 β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
? Select a hub. 2
β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ # β”‚ Driver Id                            β”‚ Name                   β”‚ Description β”‚ Version                       β”‚ Channel Id                           β”‚ Developer                            β”‚ Vendor Summary Information β”‚
β”œβ”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1 β”‚ ba6d83e8-6d7a-4559-b5ea-c08d8c6d8ba9 β”‚ Zigbee Switch by iquix β”‚             β”‚ 2022-06-24T12:42:09.448573395 β”‚ 4c1b2a74-f52f-4f5e-bf7b-462d0cdf63e3 β”‚ 53b520de-9819-8e38-dce1-811c5b1ecbf8 β”‚                            β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
think@utility:~$
think@utility:~$ smartthings edge:drivers:logcat --hub-address=192.168.254.65
β”Œβ”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ #  β”‚ Driver Id                            β”‚ Name                             β”‚
β”œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1  β”‚ 49a06f66-77a5-4cad-b71b-b7a65fa221a7 β”‚ HA.Motion                        β”‚
β”‚ 2  β”‚ 97cd8778-c0f3-4e15-a350-4607e7102e02 β”‚ HA.Switch                        β”‚
β”‚ 3  β”‚ 5964d4b5-2741-40da-8e21-42e1ae6f53a2 β”‚ Hue Dimmer Switch                β”‚
β”‚ 4  β”‚ 9d00eaef-fd7f-4719-9af3-1392a23a0592 β”‚ Hue Motion Sensor                β”‚
β”‚ 5  β”‚ 5e8e298f-706e-4c71-8f0f-888a4111972b β”‚ LUMI Illuminance Sensor          β”‚
β”‚ 6  β”‚ b713725a-a2ed-448e-b274-e6a23894a1e5 β”‚ Power Trigger Switch             β”‚
β”‚ 7  β”‚ e977cb81-1021-41a6-a9e6-6a641989fd12 β”‚ Temperature Humidity TVOC Sensor β”‚
β”‚ 8  β”‚ 2ccd5a45-9748-457e-8833-9bfd076e2a69 β”‚ Tuya Window Shade                β”‚
β”‚ 9  β”‚ 3fb97b6c-f481-441b-a14e-f270d738764e β”‚ Zigbee Button                    β”‚
β”‚ 10 β”‚ aa79374d-a9a1-44e2-856c-d914f40d0bfb β”‚ Zigbee Button                    β”‚
β”‚ 11 β”‚ ae11bc43-2992-4d21-aaac-1d5d32a4ae6a β”‚ Zigbee Button                    β”‚
β”‚ 12 β”‚ 408981c2-91d4-4dfc-bbfb-84ca0205d993 β”‚ Zigbee Contact                   β”‚
β”‚ 13 β”‚ 002b960f-0ea4-4776-b517-c9a6a582b193 β”‚ Zigbee Counter Sensor V3         β”‚
β”‚ 14 β”‚ 89fc289e-607a-49ba-95c5-a7beccbc9516 β”‚ Zigbee Motion Sensor             β”‚
β”‚ 15 β”‚ f2e891c6-00cc-446c-9192-8ebda63d9898 β”‚ Zigbee Switch                    β”‚
β”‚ 16 β”‚ ba6d83e8-6d7a-4559-b5ea-c08d8c6d8ba9 β”‚ Zigbee Switch by iquix           β”‚
β””β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
? Select a driver. (all)
connecting... done
think@utility:~$ smartthings edge:drivers:logcat --hub-address=192.168.254.104
connecting... failed
    Error: Request failed with status code 403
think@utility:~$

You can see that the ip address of the hub given to the CLI is correct

Update:

After I create a new location, and then add the hub to that new location, then logcat works.

It seems that if there are multiple hubs in a location, then logcat raises error with the second hub.
I think it does not allow multiple certificate fingerprints of multiple hubs in one location.

It seems that there’s a bug in CLI dealing with it.

Thank you for bringing this to our attention. I’ll create a report for further investigation. Once I get more info, I’ll let you know.

Following up, @iquix. Can you provide the following info, please?

  • Does the original location belong to you or you’re only a member?
  • Which version of the CLI are you using?

We’ve seen there are differences in the CLI between location owners and members…

  1. The location belongs to me
  2. I was using 1.0.0-beta4, linux version.

After creating a new location and adding the hub to that new location, I got following message about certificate fingerprint (instead of the 403 error as I mentioned above)

and then it works fine, even if I re-added the hub to my original location. (updated info)

I can’t regenerate the error now, since certificate fingerprint of the new hub is correctly added to the CLI thereafter.
(I have no idea where that certificate fingerprint and list of know hub is stored though)

It seems that there might be some bug handling certificate fingerprints when new hub is added.

These are the folders where the files generated by the CLI are saved:

  • $HOME/.config/@smartthings/cli on MacOS or Linux
  • %LOCALAPPDATA%\@smartthings\cli on Windows

There’s a file called β€œknown_hubs” but if it’s working now, I suggest you don’t modify those files as I don’t know how it could affect the CLI.
I’ll create the ticket mentioning your observations to try to replicate it on our side, if we need your help, I’ll let you know,

1 Like