SmartThings API Browser+ ... Now Available to All

Are you going to collect feedback here or elsewhere? Just interested to follow along.

2 Likes

I am interested in wave 2 if there is room. Thanks for working on this. It is a shame that SmartThings did not finish this project.

The feedback is being collected in a private thread I have going for the wave 1 invitees. If you want to be in wave 2, youā€™ll eventually get access to it.

1 Like

Are you referring to the Rules Builder? Just to be clear, this app is not that. The browser can display and execute rules, but it doesnā€™t have the ability to create them. Now if Samsung would make that project open source, I could maybe look at integrating it!

4 Likes

Thanks, but I am good for now as I havenā€™t even started to delve into any of the API stuff yet. Hope it goes well!

Can this be used to create custom location modes? Right now that can be done through the IDE, but thereā€™s no way to do it in the smartthings app. Lots of people use these for things like ā€œguestā€œ, ā€œbaby sleepingā€œ, ā€œparty modeā€œ, etc.

At our house we use it because we have four main phases: home, away, night, and the custom location mode ā€œasleep.ā€ That is, we have a lot of automations set to run differently between sunset and midnight versus midnight and sunrise. In the evening when people are still up, for example, the motion sensor in the bedroom turns on the overhead light. But once people have gone to bed, the motion sensor in the bedroom turns on a nightlight on the wall, not the overhead light.

Anyway, just wondered if this project would allow you to create new location modes or not?

The answer to your question is no, if you read the first post again, itā€™s very well written and quite explicit on what can and canā€™t be done.

Iā€™m limited by what the API provides, and I donā€™t see any endpoints that allow for management of modes. This is actually a curious omission, so maybe modes as we know them today are going to change?

3 Likes

then we will have to create a virtual driver to get the global modes back. :frowning:

5 Likes

Thank you for this!! Iā€™ll work on adding this in. @JDRoberts

7 Likes

Iā€™ve been wondering that too. As mentioned previously there is the https://api.smartthings.com/locations/{locationId}/modes endpoint that has the usual CRUD functionality based on POST, GET, PUT and DELETE requests. There is also https://api.smartthings.com/locations/{locationId}/modes/current for the current mode.

https://github.com/SmartThingsCommunity/smartthings-core-sdk/blob/main/src/endpoint/modes.ts is the source of this information, and so much more.

5 Likes

@Mariano_Colmenarejo has virtual device appliance driver that has SwitchBoard that has option to work same way as Location modes; only one switch can be active at the time. Currently has up to 5 switches

Late to the game but Iā€™m interested in helping. Technical user (can use the CLI, postman, write code, etcā€¦)

ALL-

Iā€™ve just discovered that there is a limit of 30 participants in a private message thread, so Iā€™m going to move further feedback back to this public topic. My server seems to be holding up so far, so Iā€™m comfortable with giving more people access (at least for now!).

For any additional volunteers who want to try out this app, just direct message me and I will provide you some info and the link. Iā€™m still not confident enough in my server to just publicly post the link, so this is the way I want to handle things for now.

Iā€™m trying to make sure I proactively get back to those who already volunteered but hadnā€™t yet gotten the invite to the private thread. But if you donā€™t hear from me over the day or so, please DM me again.

Thanks.

8 Likes

Below are some general getting-started guidelines for new volunteers. As noted above, the link will be sent in a direct message to those requesting participation.


Firstly, make sure you have obtained a SmartThings Personal Access Token, as I explained in this post .

As I had mentioned, Iā€™m making this web application available via my own small server for now. This has some implications:

  • Iā€™m not sure how quickly the server will be overwhelmed, so if you click on the link and itā€™s not responding right away, just wait a few seconds and try it again. For the most part, the only time the server is needed is to retrieve the initial web page to your browser. After that, the application is executing within your browser on your machine (with one exception, explained later). Iā€™m anticipating that the only time there should be a problem is when several people just happen to click on the link at the exact same time.
  • There is no caching of the web page on geographically dispersed internet servers as there are for any commercial website. No matter where you are in the world, the page has to be loaded from my server.
  • If this application turns out to be popular, Iā€™m going to have to look into a professional web hosting serviceā€¦ which means costā€¦ which means I may have to solicit donations. But weā€™ll cross that bridge when we get to it.

About security

This is a real important topic, and security-minded folks will want to know that their SmartThings Token is safe, not being used nefariously by me, or shared with anyone else.

  • Your token is required in order to run requests against the SmartThings API. All requests are done using HTTPS, so transactions are encrypted.
  • I use cookies to store your token, current location, and last used namespace ID. Cookies are stored on YOUR computer, not the server.
  • There is only one case where your token is sent to my server, and that is when you request channel invites. This particular API request is not supported by the SmartThings servers yet from a browser-based client, so it must be submitted from a server. So this particular request, which must include your token, is routed through the server (using HTTPS) rather than made directly from your browser. I assure you that the token is not saved or displayed. If, despite those assurances, you are concerned about this, simply donā€™t select the channel invites button in the application.

Caveats

  • As you will soon realize, I am NOT an experienced front-end developer. Therefore the user interface here is fairly rudimentary and utilitarian. So go easy on me regarding the look and feel. But I do want your feedback on what I can do better. And if you are, or know, an experienced web developer, Iā€™d welcome help to improve this.
  • I have not implemented the ability to create/edit/delete for most things. A few exceptions are Virtual Devices and Modes, which you CAN create, and you can delete Devices, Rooms, Rules, and Modes.
  • Listing application subscriptions is not currently working and will likely be removed
  • Although this app should be usable on all device types from desktop to tablet to smartphones, Iā€™d recommend a landscape orientation if using smartphone.

Virtual Devices

The ā€œVirtual Devicesā€ in this app under the Devices dropdown menu are SmartThingsā€™ own new virtual devices which can now be created for 17 different device types. If you use other virtual devices created using community-created drivers (like my vEdge driver), then to see those, you will need to go to Devices ā†’ Drivers, find the applicable driver, and then list the devices for that driver. The new SmartThings virtual devices that you can create in this app are ā€œdriverlessā€ and use a new device type of ā€œVIRTUALā€.

Feedback

Iā€™d love to hear back from you regarding the following:

  • How is the general usability? Is it intuitive?
  • Is any data missing that you expected to see?
  • Are there any must-have functions missing?
  • How is it working for you on different devices? (desktop/tablet/smartphone)
  • How is the performance: during initial page load and in normal use?
  • What could be done to make this more useful (within the confines of the SmartThings API)?

Instructions for Use
Iā€™m not going to say too much here because Iā€™d rather see if you can figure it out on your own.
However, to get started, do these 2 things once youā€™ve brought the page up for the first time:

  1. Click on the gear icon and provide your SmartThings token
  2. Click on the ā€˜Current Locationā€™ dropdown box (under the gear icon), and select a location from the list.

One last thing: please do not share the link with anyone else so that I can maintain access control and manage the load on my server.

4 Likes

If thereā€™s room for an additional volunteer Iā€™d love to help out as I look to clean-up some of the older SmartApps DTHs etc - run single-hub with just over 100 devices.

Iā€™ll try to keep adding folks until the server chokes :slight_smile:

Iā€™d like to join too.

Iā€™m a basic user (I donā€™t know how to code) if you need precise tests, ask and Iā€™ll do. Iā€™m using it to look at disconnected devices mainly, and everything works fine. Even devices with low battery works, notifies them when they are at 22%, I think monitor under 25% but I can not certify it. I can say that a sensor with 22% battery is detected as a discharged device, even if the SmartThings app does not detect it as discharged.