Skip to content

Info & files needed for PI-based IOT devices connecting to Samsung SmartThings

Notifications You must be signed in to change notification settings

sskinnider/rpi-st-device

 
 

Repository files navigation

Create Raspberry PI-based IOT devices that can directly connect to Samsung SmartThings

This repository holds everything needed to set up a Raspberry Pi to act as a SmartThings direct connected device.

What is a direct connected device?

The SmartThings platform is evolving. In the not-too-distant future there will be three methods for IOT devices to integrate with SmartThings: 1) zwave and zigbee devices that talk directly to the SmartThings hub, 2) cloud-connected devices, and 3) direct-connected devices. Former devices that were developed in the SmartThings IDE using device type handlers with Groovy code will need to be migrated to one of the those three new options.

  • Hub-connected: an option realistically only available to manufacturers of zigbee and zwave devices; not likely an option for the home-automation do-it-yourselfer
  • Cloud-connected: requires you to run your code on a cloud server - either your own, self-managed server or on AWS. Most hobbiests will not want to open their home LAN to the internet, which would be required to host your own cloud server, due to complexity and security risks. The AWS alternative may be more practical, but having your devices running from cloud to cloud may not give the best performance.
  • Direct-connected: this alternative allows you to connect directly to SmartThing's cloud, without an intermediate cloud server as in above. In this approach, your device apps are running on your own computer (i.e. Raspberry Pi), on a local LAN with internet access, using an SDK API to talk to the SmartThings platform.

SmartThings's concept for "direct-connected" devices are wifi-enabled microcontroller-based IOT devices. In fact the SDK that was developed in support of this very much revolves around MCUs like the popular ESP32 system-on-a-chip microcontroller with integrated wifi. However with modifications, the SDK can be implemented on a Raspberry Pi as well. The only downside to this approach is the way devices must be individually provisioned. However, what direct connected devices enables is an environment where you can write and run applications totally under your control, with full integration with SmartThings. No cloud server to manage, no IDE, no Groovy code - just a simple API to send and receive commands and attributes for whatever kind of IOT device application you can dream up and implement on a Raspberry Pi using either C or Python.

Pre-requisites

Hardware

  • Raspberry Pi Model 3 or 4
    • must include the standard capabilities including integrated wireless with AP (Access Point) capability

Accounts

Software

  • Raspberry Pi O/S (Version 10 Buster preferred, but as far back as Jessie can also work) - Python 3.5 or later (required for SDK tools: keygen and qrgen)

    • additional packages: pynacl, qrcode, pillow (via pip installer)
    • limited testing has been done on 64-bit Raspberry Pi OS (which is currently in beta)
  • RPI SmartThings device enabling package (this repository)

  • SmartThings core SDK (will be installed by the setup script, including additional dependencies)

Useful reading

Two Ways to Proceed

  1. Use a fully-automated bash script to quickly get up and running ('mastersetup')
  2. Follow step-by-step MANUAL configuration guide

For either option, start here ==> http://toddaustin07.github.io

Work in progress

  • Beta testing - volunteers wanted!

About

Info & files needed for PI-based IOT devices connecting to Samsung SmartThings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 58.5%
  • Shell 33.4%
  • Python 8.1%