Mastering a power outage in the smart home
Bad Condition
Programming with the SmartThings API is recommended only for hobbyists with a great deal of patience. Samsung's SmartThings department seems to be the unloved stepchild of the organization's other divisions. Not only is the documentation inadequate and at times contradictory, even the source code of the hub core is inaccessible. Even worse, Groovy's own self-inspection mechanisms have been undermined so that not even go-getters can discover the true names of incorrectly documented attributes.
In the case at hand, a simple API call to ask the hub whether it currently is powered by the grid or the reserve batteries would have sufficed to solve the problem, instead of having to resort to Rube Goldberg-esque solutions such as the one I just described. If the hub code were open, dedicated hobbyists could fill in the gaps in the API on GitHub and make it a much better product.
The app keeps crashing, the web page for developing SmartApps has been cobbled together rather haphazardly, and serious functional flaws are evident (e.g., the Update button for changing a SmartApp's metadata does not work). If you think that developer access will work via graph.api.smartthings.com, you will discover in the forum that you need to stipulate graph-na02-useast1 instead of graph in the United States and graph-eu01-euwest1 in the UK; otherwise, the API won't find the user's hub equipment, who is no doubt busy tearing their hair out in frustration. They should be using the industry standard of sharding via the username instead.
However, there is a dedicated community that molds the breadcrumbs uncharitably thrown to it into working applications. The only correct strategy for Samsung has to be opening up the entire project, including the communication protocols used, and leaving it to the community to transform it into a maintainable platform with a future. There is certainly enough potential.
Infos
- "How-to Geek: How to Select a Battery Backup for Your Computer": http://www.howtogeek.com/161479/how-to-select-a-battery-backup-for-your-computer/
- "IFTTT Home Automation" by Mike Schilli, Linux Pro Magazine, issue 189, August 2016, pg. 60, http://www.linuxpromagazine.com/Issues/2016/189/Perl-IFTTT-Home-Automation
- SmartThings Hub by Samsung: https://www.smartthings.com
- "Video Preview" by Mike Schilli, Linux Pro Magazine, issue 195, February 2017, pg. 52, http://www.linuxpromagazine.com/Issues/2017/195/Perl-Video-Preview
- SmartThings API tutorial: http://docs.smartthings.com/en/latest/getting-started/first-smartapp.html
- Listings for this article: ftp://ftp.linux-magazine.com/pub/listings/magazine/198/
- "WiFi Connect Messages" by Mike Schilli, Linux Pro Magazine, issue 186, May 2016, pg. 64, http://www.linuxpromagazine.com/Issues/2016/186/Perl-WiFi-Connect-Messages
- Prowl: https://www.prowlapp.com
« Previous 1 2 3 4
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.