Quantcast
Jump to content


Introducing the New SmartThings Core SDK for JavaScript.


Recommended Posts

stCoreSDK_banner9.png

The new SmartThings Core SDK for JavaScript is now available as a developer preview. With the new Core SDK, you can easily integrate the core SmartThings REST APIs into your JavaScript applications. We’ve built the SmartThings Core SDK with professional developers and hobbyists alike in mind - so that you can freely control and automate thousands of Works with SmartThings devices from your web server, Express app, and more.

Let’s say you wanted to build a dashboard and display all of your SmartThings devices. Here is a sample Node app to get you started - you can use the below code with an OAuth or PAT token to get a list of devices:




Getting Started

If you want to jump right in, we recommend using npm to install the Core SDK for JavaScript.

npm install @smartthings/core-sdk

You can use the Core SDK for JavaScript Wiki to learn more about all of the endpoints available. If you are not sure where to start, visit the SmartThings Community for video tutorials and ideas.

The SmartThings development team has put a lot of effort into building this SDK - we are excited to share it with you. Now, we invite you to start building, ask questions on the SmartThings Community, and provide open feedback.

Thank You!

View the full blog at its source

Link to comment
Share on other sites



  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Similar Topics

    • By STF News
      View the full blog at its source
    • By STF News
      Samsung Electronics Co., Ltd. held its annual Samsung Developer Conference (SDC) today in San Francisco, bringing together developers, creators and designers to explore seamless, connected experiences powered by Samsung.
       
      During the event, Samsung shared more about its commitment to creating simplified, game-changing customer experiences, including the company’s updated vision for SmartThings as it evolves from a connectivity platform to an enabler of smarter lifestyles. From deeper integration with Bixby to seamless connectivity with Matter-compatible devices, SmartThings is creating a richer, more open world that empowers all users to streamline their connections and their daily lives.
       
      “At Samsung, we continuously innovate our devices, platforms and services to be simpler and more convenient. I am proud to share the next generation of our work, like SmartThings, to further our collaboration with partners and developers,” said Jong-Hee (JH) Han, Vice Chairman, CEO and Head of Device eXperience (DX) Division at Samsung Electronics. “As technologies become more complex, we will always search for ways to make life easier, more connected, and more flexible, so our consumers can focus on what matters most.”
       
       
      Connecting Platforms and Devices With Calm Technology
      Samsung’s vision of seamless connectivity is inspired by the philosophy of Calm Technology — where devices instantly work together, so consumers can save time on setup and get right into the experience. To realize this vision, Samsung reimagined SmartThings and its connected services and partnerships, including Samsung’s Hub Everywhere, extending its capabilities to the entire smart home with audio and visual data as well as SmartThings Energy, SmartThings Pet and SmartThings Cooking. Samsung also partnered with Philips Hue to integrate Philips Hue Sync right into Galaxy devices so smart home lighting can match with music.
       
      The seamless experience will extend beyond Samsung’s ecosystem through SmartThings’ integration with Matter and Samsung’s membership in the Home Connectivity Alliance. Google and Samsung have worked together to enable users to find and link their devices across platforms by building multi-admin feature on Matter devices. The collaboration will bring more devices and users into the connected home in the future.
       
      Bixby has been integrated more deeply with SmartThings, a tool for developers to build more intelligent voice user interface experiences. As Samsung’s representative voice assistant platform, Bixby has evolved to become the on-device AI solution able to control individual Galaxy devices, as well as the cross-device experience throughout the Samsung ecosystem. With the new Bixby Home Studio, developers can now build differentiated, customized experiences for the SmartThings platform. In addition, Bixby will be even more widely available to users with support for Latin American Spanish, starting in November.
       
      As the smart home is becoming more advanced, Samsung is introducing a new security paradigm, enabling Samsung devices to protect each other. Samsung Knox Matrix1 is a private blockchain based platform that turns eligible Samsung devices into a shield to protect users’ entire device ecosystem — from Galaxy devices to TVs and home appliances. Plus, users can customize personal privacy settings with the new Security and privacy dashboard, which scans for vulnerabilities, recommends security updates and gives users data management options to keep privacy and security top of mind.
       
       
      Personalized Services for Better Experiences
      In the past year, Samsung TV Plus — Samsung’s free, ad-supported streaming TV and video (FAST) platform available on Samsung Smart TVs2 and mobile devices — reached 100% growth in viewership,3 and projects three billion hours streamed by the end of the year. To build on this momentum, Samsung TV Plus has expanded its offering by adding partnerships with Lionsgate and Vice Media, providing 8K video on demand. Samsung TV Plus has also gone through a redesign, to reflect its extraordinary variety of content with more than 1,600 channels across 24 countries. Samsung TV Plus is the premium choice for a seamless ad experience, where stream stitching makes ad playback simpler than ever.
       
      After 10 years of service, Samsung’s Tizen operating system (OS) continues to offer best-in-class user experiences. The Samsung Gaming Hub brings better, faster and more convenient access to gaming on Samsung Smart TVs, provided by industry-leading partners, such as Xbox, NVIDIA GeForce NOW, Utomik and Amazon Luna. Samsung Gaming Hub bridges expertise in hardware and software to integrate features like AI Upscaling and multitask functions to make gaming on Samsung Smart TVs an immersive, optimized experience.
       
      Tizen OS is also expanding to offer NFTs support with partners like Art Token, laCollection and Nifty Gateway. For B2B customers and developers, Samsung is providing B2B APIs specific to industries and use cases like Syncplay, which allows content to be synchronized and played in multiple signages. Tizen is also introducing SALT, a new content conversion solution to display the highest-quality HDR10+ content on supported TVs.
       
       
      Your Galaxy, Your Way With One UI 5
      By introducing the new One UI 5, Samsung has empowered users to easily customize their device’s look and feel, while enhancing productivity and providing amazing experiences across devices and platforms. One UI 5 brings more personalized experiences with custom-built Modes and Routines, and a Dynamic Lock screen that displays multiple visuals on your phone, your Galaxy Watch and other One UI 5 devices. With the new Bixby Text Call feature, Bixby Voice will answer calls on your behalf and share typed messages with the caller, speaking aloud as if you had answered. One UI 5 also introduces new daily health solutions to help track health and wellness in one place. This includes the Samsung Privileged Health SDK, which enables developers to build apps that leverage the BioActive Sensor on the Galaxy Watch.4
       
       
      Future-Forward Investment and Research
      Samsung Research is looking beyond today’s horizon to innovate for a better tomorrow, full of relentless innovation and open collaboration. Samsung Research is making its robot arm manipulation code available on GitHub, enabling academics, researchers and developers to examine new ideas in robotic manipulation.
       
      The team at Samsung Research was also inspired by the new wellness features Samsung has introduced, particularly on the Galaxy Watch5. To find new use-cases leveraging these features, Samsung Research is working with universities and healthcare institutions that will explore areas like heart health, stress, blood pressure, lung health and neuroscience. As a result, Samsung is offering a full stack SDK — the Samsung Health Stack — which will jumpstart research into important health fields and spark new development.
       
      Samsung invites developers, creators, partners and more to join in on its commitment to open collaboration and seamless experiences. For more information about the Samsung Developer Conference (SDC) 2022, please visit developer.samsung.com.
       
       
      1 Starting as early as late 2023, Samsung Knox Matrix will be initially available on selected Samsung devices. Support for other manufacturers’ products will follow later.
      2 Samsung TV Plus is available for selected Samsung Smart TVs only.
      3  Viewership from September 2021 to August 2022 compared to viewership from September 2020 to August 2021
      4 Available on Galaxy Watch4 series and Galaxy Watch5 series.
      View the full article
    • By STF News
      After a two-year hiatus, Europe’s biggest home appliances trade show is back and better than ever. IFA 2022 took place offline on September 2 in Berlin, Germany, where Samsung Electronics showcased its latest lineup in the Samsung Town exhibition hall. With various zones, such as the SmartThings Life Zone and Everyday Sustainability Zone, visitors could experience the latest products in visual display, home appliances, mobile and memory categories.
       
      Samsung Newsroom takes you to the scene of Samsung Town in this three-story series. In this first story, we’ll cover Samsung’s eco-conscious efforts for sustainable daily lives. In the second story, we’ll share the integrated connected experience enabled by SmartThings Home Life. In the third story, we’ll give you a tour of Samsung’s latest products in the exhibition hall — making you feel as if you are actually there.
       
      At its SmartThings Home booth, Samsung Electronics showcased its vision for the future of home living. The booth featured a setup of seven real home spaces, such as a bedroom, living room and kitchen, allowing visitors to experience and learn about the capabilities of SmartThings.
       
      SmartThings presents a fully integrated home experience by connecting not only Samsung products and services but also third-party devices such as lighting and window blinds to cater to your own lifestyle. SmartThings also helps consumers live a more sustainable life by suggesting ways users can save energy around the home by analyzing energy usage patterns and more.
       
       ▲ When Good Morning Mode is activated, the curtains open and the lights turn on automatically. The air conditioner switches to auto mode and The Frame TV automatically turns on, displaying a photograph to ease you into the morning.
       
      ▲ Visitors can experience the Movie Mode in the Living Room exhibition space. Once Movie Mode is activated, the TV turns on automatically, the curtains close and the lights darken simultaneously. The air conditioner and the air purifier switch to WindFree mode to help focus on the movie. With a single, simple step, the living room turns into a theatre right before your eyes.
       
       ▲ Experience your own home office created with SmartThings. After activating Work From Home mode on the Smart Monitor, the light brightens and the air conditioner and air purifier switch to WindFree mode.
       

       
       ▲ In Home Gym area, the air conditioner and air purifier automatically turn on once Workout Mode is activated, freshening up the space. You can compare your form with the workout videos of your choice using the Multi-View function on the TV. By checking your form in real-time, your workout can be more effective. Once you complete your daily workout, you can check your workout results using Galaxy Watch.
       
       ▲ When you put beef in the Family Hub Refrigerator and save it under the Food List, the SmartThings Cooking recommends personalized recipes and meal plans based on users’ tastes, dietary needs and groceries on hand. The recommended recipe for tonight is steak. Press the Send to Oven button, place the meat inside the Smart Oven and your meal prep for dinner is done.
       
       ▲ When Game Mode is activated, the illuminance lowers and colorful lights fill the room. The air purifier switches to Soundless mode to help make gamers feel as if they’re actually in the game.
      View the full article
    • By STF News
      By Patrick Barrett, Robert Masen, and Zach Varberg
      How we got here
      Last month, we announced the launch of SmartThings Edge! Looking back, SmartThings provided a few different ways to integrate devices onto the platform. For Hub Connected devices we have always used Device Type Handlers (DTHs). These were written in Groovy and would run in a sandboxed environment on the SmartThings Cloud. While Groovy DTHs helped us launch SmartThings, they presented special challenges for local execution on the hub.
      With the ongoing work to modernize the platform and move away from legacy systems, we wanted to provide a better way to handle devices. Similar to DTHs, we looked to provide a way for developers (both internal staff and partners) to define the behavior of a Hub Connected device through some combination of data and code. Given that one of our primary goals is to support the execution of these on hubs—which we see as the edge of the SmartThings platform—we decided to call these “Edge Drivers.”
      We set out to engineer a solution that would be able to deliver the developer and user experience that we were looking for. As you may have guessed from the title, Edge Drivers are built around Lua © as the programming language... So why Lua?
      Simple
      The Hub is a resource-limited environment. With the need for users to potentially run many Edge Drivers at a time, we were looking for something lightweight.
      Lua has a small set of core structures and functionality. This leads to a small footprint, which works well for executing on hubs. With the core language being pretty small, it is pretty easy for developers to learn. Additionally, as an interpreted language, developers building Edge Drivers do not need to worry about compiling their code.
      Embeddable
      It should not come as a surprise that the SmartThings hub platform software is a complex system. It is responsible for managing many aspects of how devices connect and execute within the SmartThings platform. Most of this software is written in Rust and C (stay tuned for more on this in the future!) and we needed something that would work well in this environment.
      When looking for solutions, we began by investigating “prior art” to answer the question: Are there other complex systems out there that needed to solve a similar problem, and if so, what did they do? We have a set of core functionality that needs to execute in a performant manner (HubCore), but want to allow extensions that give developers the tools to build unique use cases (Device Drivers).
      We found that Lua had been extensively used in the video game industry (along with other non-video game software) as a way to allow developers to extend existing functionality—which is exactly what we were looking for! This means that Lua could work well with C and Rust, allowing your Hub to run extensions with a minimal impact to the existing hub software.
      Safe
      Historically, all locally executing DTHs were either written or reviewed by our engineering teams. Allowing users to run code locally on their hub that we did not write, review, and test brings up complex questions about boundaries and guardrails. As a result, it was important to identify a solution that we could sandbox—that is, lock the untrusted code in a room where it cannot hurt anyone else.
      Lua itself provides some opportunities to tweak and limit the runtime. In addition to this, we wrap all Device Drivers in a second, more secure sandbox layer, with a coherent API to further protect hubs in instances where we did not believe the built-in options were enough.
      Learn more
      You can visit the SmartThings Community to learn more about integrating your Zigbee, Z-Wave, and LAN devices with SmartThings Edge. Lua is free software distributed under the terms of the MIT license. If you want to learn more about developing with Lua, we recommend getting involved with the Lua Community.
      View the full blog at its source





×
×
  • Create New...