smartthings_exporter

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

smarthings_exporter Build Status Coverage Status Go Report Card

Smartthings_exporter is a command line tool to export information about your SmartThings sensors in a format that can be scraped by Prometheus. The tool uses the GoSmart library to talk to SmartThings and collect sensor data and exposed the metrics over http.

Installation

The installation instructions assume a properly installed and configured Go development environment. The very first step is to download and build Smartthings_exporter (this step will also download and compile the GoSmart library):

$ go get -u github.com/kadaan/smartthings_exporter
Smartthings Setup

Before you can use Smartthings_exporter, you need to register it with Smartthings.

The first step is to setup the API that Smartthings_exporter uses to communicate with Smartthings. Follow the GoSmart Smartthings API setup steps.

Take note of the client_id and client_secret of your SmartThings app that you just created.

Smartthings_exporter configuration

We now need to register Smartthings_exporter to with your Smartthings app.

Run:

$ smartthings_exporter register --smartthings.oauth-client=[client_id] --smartthings.oauth-secret==[client_secret] > .st_token

Follow the prompts to authorize the app.

Running

Now we can start Smartthings_exporter by running:

$ smartthings_exporter --smartthings.oauth-client=<client_id> --smartthings.oauth-token.file=.sttoken

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL