Sign inSign up

sawdog/smartthings-rethinkdb-bridge

By sawdog

Updated almost 8 years ago

A pyramid python 3 bridge between smartthings and the NoSQL database rethinkDB

Image
0

263

sawdog/smartthings-rethinkdb-bridge repository overview

A Python Pyramid web app acting as a simple bridge between Samsung Smartthings and the NoSQL rethinkDB database. This will be extended to support rethinkDB pushing db changes to influxDb. All will eventually be packaged as part of a larger suite that's stitched together via docker-compose.

This container uses the jfloff/alpine-python base image. To run this container, see the following example command: docker run -d --rm --name rethinkdbridge --net dataops_bridged --link rebirthdb:rethinkdb -p 6543:6543 -v $PWD/etc/pyre.yml:/app/pyre.yml rethinkdbridge

You do not have to override the pyre.yml -- but if you do not, you need to setup your rethinkDB as follows:

create a rethinkdb called smartthings: r.dbCreate('smartthings')

create a table named events with the primary key as 'uuid': r.db('spaceX').tableCreate('dragon', {'primary_key': 'uuid'})

create a smartthings user with a password of sm@rt!3s: r.db('rethinkdb').table('users').insert({id: 'smartthings', password: 'sm@rt!3s'});

grant the necessary permissions to the smartthings user: r.db('smartthings').table('events').grant('smartthings', {read: true, write:true, config: false});

Now with the rethinkDB container linked to your bridge as --link rebirthdb:rethinkdb the 2 containers will be able to connect and any json document sent to the bridge will be inserted into the rethinkDB

Tag summary

Content type

Image

Digest

Size

92 MB

Last updated

almost 8 years ago

docker pull sawdog/smartthings-rethinkdb-bridge:0.3.0