GithubHelp home page GithubHelp logo

smartthingscommunity / smartthings-cli Goto Github PK

View Code? Open in Web Editor NEW
220.0 220.0 101.0 9.64 MB

Command-line Interface for the SmartThings APIs.

Home Page: https://developer.smartthings.com/docs/sdks/cli/introduction

License: Apache License 2.0

JavaScript 0.66% Batchfile 0.01% TypeScript 99.26% Python 0.07%

smartthings-cli's People

Contributors

bflorian avatar dependabot[bot] avatar doczillar avatar github-actions[bot] avatar jeztucker avatar jodyalbritton avatar john-u avatar patshiab avatar rankin-tr avatar rossiam avatar saulfloresbluetrail avatar sitlintac avatar smartthingspi avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smartthings-cli's Issues

Login flow does not work on a headless machine

Describe the bug
The login flow on Linux attempts to use xdg-open to open a URL. This results in an error if the tool is being used on a headless machine, which likely does not have this software on the path.

To Reproduce
On a headless machine (e.g. on SSHing to a Raspberry Pi):

# No credentials have been configured at this point 
$ ./smartthings apps
logging in... done
node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: spawn xdg-open ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://localhost:61974/start' ]
}
$ echo $? 
1

Expected behavior
The login flow should fall back to requesting that the user opens a given external URL in their browser (outside of the headless machine), and then it requests the code to be returned (e.g. via interactive input submission).

Actual behavior
Failure due to missing xdg-open command (and ability to conduct login on the machine CLI is being used on).

Additional context

$ ./smartthings --version
@smartthings/cli/1.1.2 linux-arm node-v16.16.0

Stdout and Output file from rules differ. Neither can be consumed as input.

The output of the Rules API via the CLI can not be used as the input to the Rules API via the CLI.

> smartthings rules RULEID --output=RULEID.yaml

> smartthings rules:update RULEID --input=RULEID.yaml

[2021-02-18T13:07:37.646] [ERROR] cli - caught error Error: Request failed with status code 422: {"requestId":"4C153BEC-0CCB-42F6-92D0-ACC3E9C58FB6","error":{"code":"ConstraintViolationError","target":null,"message":"The request is malformed.","details":[{"code":"BodyMalformedError","target":"id","message":"Unknown field on line 1","details":[]}]}}

I guess that might be an API issue rather than specifically a CLI issue.

I also note that the standard output of smartthings rules ends with.

id: RULEID
status: Enabled
executionLocation: Cloud

The above is the same as the output of the API called directly. As mentioned it can not be consumed as input by the API with these lines present.

Howver the RULEID.yaml is not the same as the standard output.

id: RULEID
status: Enabled
executionLocation: Cloud
locationId: LOCATIONID
locationName: LOCATION

That seems counter-intuitive.

Device:Commands not working when executed in linux by cron or other systemd started services

Describe the bug
In Linux (at least Debian) devices:commands and devices:update will only work if typed on the terminal. This prevents running device commands or updates at certain time intervals for example.
It appears any script started by Systemd will result in Error: did not get any data from stdin

To Reproduce
edit 'cron' jobs with crontab -e
* * * * * /home/<user>/./smartthings devices:commands <device ID> --token <token> > /dev/tty1 2>&1
OR
* * * * * /home/<user>/./smartthings devices:commands <device ID> switch:on --token <token> > /dev/tty1 2>&1
/dev/tty1 2>&1 is to display error message.
Wait 1 minute

Expected behavior
1st case: Command dialog for specified device printed on tty1
2nd case: Device with switch capability switched on and Command executed successfully printed on tty1

Actual behavior
Error: did not get any data from stdin printed on tty1

Additional context
Version: @smartthings/cli/1.0.0-beta.20 linux-arm node-v16.16.0
Smartthings-CLI functions flawlessly from terminal.
Creating a service to be ran by systemd results in the the same error.
Other commands such as devices <Device ID> work flawlessly with cron.

feature request -> mssing data in devices output

I am missing a few data points from devices when using the CLI vs what's available inte the IDE

Command:
smartthings devices {n} [-y|-j]

Would it be possible to add this data in the response?

  • route
  • metrics

Please check saved answers are valid, then say if they are being used.

Is your feature request related to a problem? Please describe.
When a fellow user demonstrates a problem where they aren't being prompted to select a channel it is not unusual to completely forget that there is such a thing as 'saved answers', especially when they have saved a channel that either doesn't exist or doesn't belong to them and there is a prominent error message that distracts you.

Describe the solution you'd like
Let's consider the case of channels. I'd like you to check the saved channel is valid for the command being performed, and if it is I'd like you to say it is being used.

Describe alternatives you've considered
Alternatively just stop saving defaults. I'm easy ...

Additional context

devices:commands argument parsing error with enum type?

If I am missing the proper syntax I apologize, but I feel like I've tried all potential ways of supplying a string argument to the command. I know this is a "custom" capability and not in the documentation so I'm not sure if the parsing issue (if there is one) is with devices:commands or with the capability itself.

For an OCF robot cleaner (Samsung) there is a capability samsungce.robotCleanerCleaningMode with command setCleaningMode(cleaningMode<enum {stop, auto, manual, spot, area, object, map, pet uncleanedObject, patternMap}>) . Attempting to pass "auto" (in many permutations) results in this syntax error:

.\smartthings.exe devices:commands <DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode(auto)
SyntaxError: Unexpected token a in JSON at position 1
.\smartthings.exe devices:commands <DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode("auto")
SyntaxError: Unexpected token a in JSON at position 1
.\smartthings.exe devices:commands <DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode('auto')
SyntaxError: Unexpected token ' in JSON at position 1
.\smartthings.exe devices:commands<DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode([auto])
SyntaxError: Unexpected token a in JSON at position 2
.\smartthings.exe devices:commands <DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode(["auto"])
SyntaxError: Unexpected token a in JSON at position 2

But supplying "null" or an integer does not result in a syntax error:
.\smartthings.exe devices:commands <DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode(null)
Error: Request failed with status code 422: {"requestId":<REQUEST ID>,"error":{"code":"ConstraintViolationError","message":"The request is malformed.","details":[{"code":"NotNullError","target":"commands[0].arguments[0]","message":"commands[0].arguments[0] cannot be null.","details":[]}]}}

.\smartthings.exe devices:commands <DEVICE ID> samsungce.robotCleanerCleaningMode:setCleaningMode(0)
Error: Request failed with status code 422: {"requestId":<REQUEST ID>,"error":{"code":"ConstraintViolationError","message":"The request is malformed.","details":[{"code":"UnprocessableEntityError","target":"commands[0].arguments[0]","message":"commands[0].arguments[0]: integer found, string expected","details":[]},{"code":"UnprocessableEntityError","target":"commands[0].arguments[0]","message":"commands[0].arguments[0]: does not have a value in the enumeration [stop, auto, manual, spot, area, object, map, pet, uncleanedObject, patternMap]","details":[]}]}}

Which would seem to indicate a parsing issue with string arguments? Potentially in the JSON.parse assignment of the args? Or I am completely misunderstanding on how to supply a value for the enum.

Access certain features only(?) available in the app

Is your feature request related to a problem? Please describe.
I am trying to get my Samsung HW-S61A sound bar integrated into my home automation (Openhab) via the SmartThings CLI. The sound bar has 2x features that are only(?) available through the phone app (not the remote control) and I cannot find a way to change their setting through the CLI. These features are "Night Mode" and "Voice enhancement", which are listed under "Advanced Sound Settings" in the phone app. (The equalizer and individual volume levels per speaker are also much easier to manage in the app, but these dont appear to be exposed via the CLI either).

I cannot, unless I'm missing it, find any way to view or change these individual settings through the CLI, but they must exist otherwise the phone app couldn't change them. For what it matters, I do not have a SmartThings hub, only the cloud option.

Basic, overall volume level does appear to be supported. I'm guessing many other devices have similar issues where features are not exposed via API/Command line or other.

Describe the solution you'd like
Many people in the home automation communities are discussing the current changes in the SmartThings API e.g. []https://community.openhab.org/t/smartthings-binding-eol/138750 as are other communities (Home Assistant etc).

I think all these people, including myself, would like to be able to easily interact with SmartThings devices in a simplistic way, and have all device features/capabilities that the SmartThings app can offer, exposed, at least via the CLI, so that we can automate as needed. This would also include pulling current status of all these settings by JSON (for example) so that we could pull in changes back to our home automation system e.g. someone used the remote control to alter the volume of a device, which is reflected in the SmartThings app/cloud and then pulled back through a JSON query to our home automation (again, just an example of one scenario that would work).

If I'm wrong and these settings are exposed already (or other such settings for other devices) it would be great to have an example of how to both find and interact with these settings within the CLI.

Additional context
Ultimately, I think people would love a local (linux/windows) daemon that could communicate with their SmartThings devices over the LAN and probably work with MQTT commands. I know this is probably beyond scope of current plans though.... but that would be amazing!!

Other settings missing "Sound Mode", "Equalizer/Tone", "Bass/Treble", "Woofer Volume", "Channel Volume" AKA "Side Speaker Volume" &"Rear Speaker Volume".

For reference, here is the command line VS the settings I mentioned in the APP

image

Thanks!

CI: separate alternative pkg builds from main build pipeline

Is your feature request related to a problem? Please describe.
We currently build executables during every release and run functional tests against the major 3 supported platforms (win, macos, linux). However, several other build targets can now be built such as ARMv7, which can be useful for developers, but are only supported by pkg and us on a best-effort basis.

Having such a large list of build targets slows down our main release build. It also adds risk that the release will fail even if only one of the alternative targets has an issue, when the main supported builds could have been tested and released.

Describe the solution you'd like

  1. Refactor the release workflow so that we only depend on the successful build of major supported OS pkg targets for functional tests and release.
  2. Fork a secondary pkg job that runs best-effort builds and waits for the release to be created before updating it with the alternatives.

Additional context
#409

How to change default user organization from the CLI?

What is your question? Please describe.
Is it possible to change the default user organization from the config profiles?

Additional context
Would it be possible to add this as a feature if it is not available?

I would like to be able to dump the routine script to a file or standard out

Is your feature request related to a problem? Please describe.
The problem is I can't get a smartthing app routine to work the way I think it should.
The routine runs once and stops. It should trigger every time I have a trigger set.

Describe the solution you'd like
I would like to be able to dump the routine script to a file or standard out so I can see what it's doing or not doing.

Describe alternatives you've considered
Is there a way to turn on debug logging in smartthing app.

Additional context
Add any other context or screenshots about the feature request here.

remove command aliases

We have several command aliases which results in a lot of noise in the command line help and the README file. The current version of the notfound oclif plugin works much better than it once did so these aliases aren't really necessary anymore.

edge:channels list has too much information

Is your feature request related to a problem? Please describe.
The output of the edge:channels command in list mode is way to wide for any reasonably-sized terminal window.

Describe the solution you'd like
Limit the output to channel id, name, creation date, and last modified date. Users can query a single channel to get more details.

Package name change

"name": "smartthings-cli",

A thought – perhaps this should be @smartthings/cli so it's underneath the @smartthings organization umbrella. This doesn't affect the environment command name or repo name at all.

Bad URL for getting an access token in documentation

The documentation (smartthings-cli/packages/cli/doc/configuration.md) has a reference to URL
https://smartthings.developer.samsung.com/docs/auth-and-permissions.html. This URL is now obsolete and I get forwarded to
a generic page that has no obvious way to get an access token. I found this discussed in a commuity forum discussion where someone recomended this URL https://account.smartthings.com/tokens. This URL worked for me; I was able to get a functional access token.

help command is broken.

When running the command "smartthings help" after using the windows msi installer, you receive the following response:
» Warning: help is not a smartthings command. Did you mean apps? [y/n]: » Error: Run smartthings help for a list of available commands.

Version: @smartthings/cli/1.0.0-beta.15 win32-x64 node-v16.16.0
OS: Win10 21H2 build 19044.1889

question: Why do I get an error on creating a custom capability?

I am trying to create a custom capability using the CLI. I want to create a basic capability with a single string attribute and a setter command for the same. I have tried multiple names and followed the pattern rules from the smartthings-cli/packages/cli/src/commands/capabilities/create.ts file. The error is not descriptive and I am not able to figure out why the error is caused.

error

Device handler

Why cant I find the menu for device handler there I can put in my code for my new device Xiomi motion sensor? The hole setup look as at my phone in the app and all helpguides are showing me web version.

rules:update always gives Error: Location ID not defined

Describe the bug
Using @smartthings/cli/0.0.0-pre.16 win32-x64 node-v12.18.1, running smartthings rules:update will always return
cli - caught error Error: Location ID not defined

To Reproduce
smartthings rules:update --location-id=\<LOCATION UUID\> --input=\<RULE\>.yaml

Expected behavior
N/A

Actual behavior
N/A

Additional context
Using smartthings rules:create is fine. Only rules:update has the problem.

Review the help text for --assign and --install.

It might be easiest to skim through https://community.smartthings.com/t/edgeinstall-not-listing-all-my-drivers/256656 to get the background to this. If nothing else it validates issue #445 and PR #453 which is always satisfying.

The bottom line is that the help text for edge:drivers:package implies that --assign will prompt for the channel to assign the driver to. However what it really means is that it will run the equivalent of edge:channels:assign {{driverId}} which won't actually prompt if there is a valid saved channel.

I haven't tried it (or seen others try it) but I guess the same issue might apply with hubs and --install?

I can't immediately suggest better wording, but I do see how it might mislead.

Opening CLI to a command prompt instead of running individual commands.

Is your feature request related to a problem? Please describe.
I run the CLI from a Windows CMD shell. Generally I am using a knackered old laptop to do so. I find there is a significant startup overhead when using the CLI, even if no arguments are given and the CLI is just providing a list of commands. By significant I mean of the order of five or six seconds. Even on a newer and more powerful laptop there is still a noticeable pause of a second or so before anything happens. It is quite frustrating when you have a batch of rules to update.

Describe the solution you'd like
I am hoping it would be possible to open up the CLI to a command prompt so the startup overhead only happens once.

question:

What is your question? Please describe.
I'm writing a linux script to update a web page periodically with temperature/humity sensor values. I'd like each row to have room name (to identify the sensor), temperature and humidity. I can get list of sensors and properties (e.g. temperature) from smartthings devices and smartthings devices:status. In the ST app, get this info along with a room name for each sensor. "smartthings locations:rooms" gives me a list of room name, location IDs, and room IDs. Is there a way to get a room ID for a device in the CLI?

Additional context
I apologize if I overlooked something obvious.

Need windows zip file

Guys - I noticed you've started to post a tar file in the Release assets for the Windows executable instead of a zip. A lot of Windows users aren't going be able to extract a tar file. Can you please provide a zip file?

Can I interact with my phone with this?

What is your question? Please describe.
Anyhow can I use this to "Find My Phone"? I'd like to be able to acquire my phone's (last) known location, but it's not showing up in between devices. (Devices are only for devices not joining to the phone via Bluetooth?)

Why do I still see "unenrolled" channels and their drivers?

Why do "unenrolled channels" (and their drivers) still appear in the lists with smartthings edge:channels:drivers?

I've installed (and then uninstalled) a few different drivers, and after deletion of the drivers I also unenrolled from their channels. Confirmed with edge:drivers:installed and edge:channels:enrollments (and they don't appear in lists with edge:drivers:delete or edge:channels:delete).

Maybe I'm missing something? Maybe remembering all channels is by design?

smartthings edge: commands result in error

I'm embarking on converting my existing devices to edge. Having trouble with the basics of the CLI.

Example:

PS C:\Users\paull\OneDrive\Documents\SmartThings> smartthings edge:channel:create
 »   Warning: edge:channel:create is not a smartthings command.

Actually any command that begins with smartthings edge: fails with a similar error.

Is this a problem with the version of my CLI? I have tried npm update -g @smartthings/cli.

Current version is: @smartthings/cli/0.0.0-pre.26 win32-x64 node-v12.18.1

Having trouble to authorize cli access

I downloaded the binary and trying to get it to work.

I'm having trouble authorizing access for cli, when I run any command it pops up my browser and i authenticate and grant access. Then I get a message that states that I can close the window, but nothing happens in the command prompt (just ticking dots)

Any advice?

Environment:

  • Ubuntu 18.04
  • smartthings/cli/0.0.0-pre.6 linux-x64 node-v12.18.1
  • I'm authenticating using Samsung account.
  • I have 2FA activated.

image

image

image

CLI doens't export all device history

Describe the bug
When using smartthings.exe devices:history -L 20000 , this does retrieve all history. When exporting to json again this does not export all history. What is the expectation here? I can see full history via the command line by entering Y each time to load more data.

To Reproduce
As per above

Expected behavior
All device history data to be exported.

Actual behavior
Limited subset of data exported (same day, few hours)

Additional context

save IP address

Is your feature request related to a problem? Please describe.

every time I want to get a log using

smartthings edge:drivers:logcat

there is a prompt

Enter hub IP address with optionally appended port number:

Describe the solution you'd like
it would be great if the app can save this information after a first input. The majority of users have only one hub and the IP address is rather constant.

Describe alternatives you've considered

as an alternative, there could be a key for
edge:drivers:logcat -IP 192.168.0.11

Are changes not supposed to reflect in the Developer Workspace?

Hi,

I've tried creating a new profile using smartthings deviceprofiles:create -j -i <myfile>.json. It responds back with the JSON that includes the new profile's ID. And when I list it with smartthings deviceprofiles it shows up. However when I go Developer Workspace I don't see it. Is it not supposed to show up there?

Also if I create a profile from the UI and add a capability (even a standard one) to that profile from the CLI tool, the change doesn't show up in the UI even though the CLI will report that the profile does indeed have that capability.

I'm wondering if I'm missing some step to "commit" those changes or something like that? Or am I misusing this tool altogether?

Thanks!

Sunrise, sunset, location 'attributes' and the services endpoint.

When using Rules (or mobile app Routines) we can work with Sunrise and Sunset times for our Locations, as well as a selection of Location 'attributes' covering things like temperature and current weather as well as the current modes and security status.

It would help development of Rules if we could get the current values assembled in one place via the CLI. Sunrise and sunset is particularly important as users have become used to seeing that in the IDE with the legacy platform.

(This issue originally had two separate requests. The deleted one has been moved to #493.)

smartthings edge:channels:unenroll unenrolls hubs from channels they weren't enrolled in to start with

Describe the bug
I don't know if you'd call this a bug or just an odd feature. However smartthings edge:channels:unenroll will allow you to 'unenroll' any hub you can manage from any channel your account is subscribed to, regardless of whether it is enrolled in it or not.

To Reproduce

  • smartthings edge:channels:unenroll
  • Pick a channel you aren't enrolled in.
  • You'll get a list of all your hubs that you can manage.
  • Whichever hub you choose is 'unenrolled' from the channel.
  • Rinse and repeat.

Expected behavior
I'd probably expect to be presented with a list of hubs, and then a list of channels that the hub is enrolled in, and then I'd expect that hub to be removed from that channel. So rather like smartthings edge:channels:enrollments with the extra step to unenroll tucked on the end.

Actual behavior
If you type smartthings edge:channels:unenroll you get a list of all the channels you own or are subscribed to (including ones you'd love to unsubscribe to if only you could, but that's another issue). Regardless of which one you select you will get a list of all your hubs, and regardless of which hub you select you will apparently successfully unenroll that hub from the channel even though the hub isn't enrolled in that channel to start with, and you can do it again and again.

Update: Corrected the command to say 'unenroll'.

Additional context
This arose from a discussion in https://community.smartthings.com/t/unenrolling-from-subscribed-channels/258175 which mentioned 'unenroll' a lot but was probably really about not being able to unsubscribe your account from channels you no longer have any interest in. For example I followed an invite in a PR to test a driver and now I'm not being allowed to forget it. While preparing an answer for that thread I got diverted to this issue instead.

./smartthings edge:drivers returns strange list

Describe the bug

subj

To Reproduce

edge:drivers

Expected behavior

see list of lua edge drivers

Actual behavior

───┬──────────────────────────────────────┬────────────────────────────────────────────────┬────────────────────────────┬─────────────┐
│ # │ Driver Id │ Name │ Version │ Package Key │
├───┼──────────────────────────────────────┼────────────────────────────────────────────────┼────────────────────────────┼─────────────┤
│ 1 │ 4aee6bda-b9d9-41fa-b2d3-319d52a7b0a4 │ aonghus-mor/Aqara Wired Wall Switch No Neutral │ 2021-02-12T12:35:56.423355 │ │
│ 2 │ 2c728178-8b63-43f8-a45f-25c5412bd1e3 │ aonghus-mor/Aqara Wired Wall Switch No Neutral │ 2021-02-11T22:44:35.90924 │ │
└───┴──────────────────────────────────────┴────────────────────────────────────────────────┴────────────────────────────┴─────────────┘

I have removed all the aonghus-mor/ from groovy IDE

Text-to-speech to connected sonos speaker question:

What is your question? Please describe.
Is it possible to use the CLI to have text read aloud by a connected Sonos speaker similar to how the Android app works? I am able to play a sound file, but I was hoping that the TTS function would be built in. Perhaps this is a feature request?

Additional context
image

Tarke me

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what actually happens.

Additional context
Add any other context about the problem here. Please include output of smartthings --version. Screenshots can be helpful too.

What's the state ot this package?

I see that this package has never had any release (all are pre release) and since its creation two years ago, it is in constant beta state. What is the state of it? Is it usable?

SThings

Requesting features and support

question: how to launch nextflix on smart tv using postman or cli

What is your question? Please describe.
I have the smarthings cli setup, and can turn my tv on, off, mute/unmute fine
but I can't see how to launch the built in apps, like Netflix, or make it search Netflix for something
Are there lots of example commands for things like this somewhere? In like a Postman collection or something?

NOTE: I have found this collection, but was looking for more TV oriented examples if possible: https://www.postman.com/smartthings?tab=overview

Or a nice simple wrapper script that shows common usages in bash?
Thanks in advance!

Add Label to devices:delete default output.

Is your feature request related to a problem? Please describe.
Consider ...

> smartthings devices:delete
┌────┬─────────────────────┬─────────────────────────────────┐
│ #   │ Name                    │ Device Id                            │
├────┼─────────────────────┼─────────────────────────────────┤
│ 1   │ basic-switch            │ 12345678-1234-1234-1234-123456780001 │
│ 2   │ basic-switch            │ 12345678-1234-1234-1234-123456780002 │
│ 3   │ basic-switch            │ 12345678-1234-1234-1234-123456780003 │
│ 4   │ basic-switch            │ 12345678-1234-1234-1234-123456780004 │
...
? Select device to delete.

Might I suggest that if you don't already know the Device Id you aren't going to be able to make a wise choice, and if you do know the Device Id you'd be better off including it as a command line argument.

Some users (like me) may find it tempting to use the smartthings devices command to see which device is which and then note the index in the table. If you use that in smartthings devices:delete you will delete the wrong device.

Describe the solution you'd like
Add the Label to the default output and sort on that so that it is useful as it is and also matches the default smartthings devices display.

Describe alternatives you've considered
Looking what I am doing next time.

Additional context
I suspect you may already have this on your list of snags but it caught me out and I deleted a device I didn't intend to. I'd like to think I am not the only one.

question: List of FingerPrints supported by a driver

What is your question? Please describe.
I've looked on all the CLI commands exists. I was unable to find a command that show all the fingerprints in a driver. Can you please point to the CLI command for that.

Additional context
Please note that most of the developers not always share the fingerprint.yml file in GitHub.

can't be installed on 64bit Debian 11

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what actually happens.

Additional context
Add any other context about the problem here. Please include output of smartthings --version. Screenshots can be helpful too.

CLI commads list

The command smartthings edge: drivers: publish is missing from the CLI command list in README.md FILE

command request malformed

I'm most likely entering the command wrong:

smartthings devices:commands 9 1:2                                                     

[2020-12-21T23:22:03.632] [ERROR] cli - caught error Error: Request failed with status code 422: {"requestId":"60B2BB99-82E4-40BE-BBBF-4509D8905CA5","error":{"code":"ConstraintViolationError","message":"The request is malformed.","details":[{"code":"NotValidValue","target":"[0].capability","message":"1 is not a valid value.","details":[]}]}}

My intention with above command was to send a command to:

device: 9
capability: 1
command: 2

Which would turn a light on in my case. The help screen says COMMAND the command [<component>]:<capability>:<command>([<arguments>]) which I interpreted as component and arguments are optional, while capability and command are required and must be separated with a :

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.