Git Product home page Git Product logo

st-edge's Introduction

st-edge

SmartThings Edge Drivers

Deployment

Deployment from Public Channel

TODO.

Deployment from Private Channel Built from Source

These instructions are written for a Linux platform. Similar steps may be taken for MacOS or Windows.

Get the source from this repository.

git clone https://github.com/rtyle/st-edge.git

All commands documented here are executed from this directory.

cd st-edge

Update all submodules of this repository.

git submodule update --init --recursive

Install the latest smartthings-cli.

curl -L https://github.com/SmartThingsCommunity/smartthings-cli/releases/download/%40smartthings%2Fcli%401.6.0/smartthings-linux-x64.tar.gz | tar xzf - | install /dev/stdin smartthings

If needed, create a new distribution CHANNEL for these packages.

./smartthings edge:channels:create

Assign these DRIVER packages to a distribution channel.

./smartthings edge:channels:assign

Enroll your SmartThings HUB in this distribution channel.

./smartthings edge:channels:enroll

Install this package on your SmartThings hub.

# create private.mk as makefile suggests and
make install

Development

Command line lua

SmartThings uses an old version of lua (5.3) that is likely not to be supported by your Linux distribution. Build from the source.

curl https://www.lua.org/ftp/lua-5.3.6.tar.gz | tar xzf -
(cd lua-5.3.6; make linux)
(cd lua-5.3.6; make install INSTALL_TOP=$(realpath ..)/tools)

Luarocks

Build luarocks from our submodule.

(cd modules/luarocks; ./configure --help)
(cd modules/luarocks; ./configure --with-lua=$(realpath ../../tools) --prefix=$(realpath ../../tools))
(cd modules/luarocks; make install)

tools/bin/luarocks init

lua_modules

Install SmartThings supported modules (https://luarocks.org/modules/azdle/st).

./luarocks install cosock
./luarocks install dkjson
./luarocks install logface
./luarocks install luasec
./luarocks install luasocket

Install luacheck tool.

./luarocks install luacheck

Example luacheck usage.

./lua_modules/bin/luacheck src/init.lua

Visual Studio Code

Debug as much of the code in the development environment as possible. Visual Studio Code workspaces are provided. Set the LUALOG environment variable to see log messages through the DEBUG level.

LUALOG=DEBUG code workspace.code-workspace
Extensions: Search: Lua Debug (actboy168): Install

st-edge's People

Contributors

rtyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

baranauskas

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.