Coder Social home page Coder Social logo

thingies's Introduction

thingies

Simple Node.js backed connected device manager

Usage

Register your device by adding an authorization key in key in Redis:

HSET authorized_keys <your_key> <your_app_name>

For instance, assuming I want to refer to my Raspberry Pi as my_raspberry_pi and git it the key:

HSET authorized_keys 5eec8e1caba298af9cb3ba60cf956c4f98ea2d1f my_raspberry_pi

On my Raspberry Pi, make sure to send a POST request on my server

POST /my_raspberry_pi?key=5eec8e1caba298af9cb3ba60cf956c4f98ea2d1f

With the following params sent in the request body:

  • private_ip
  • public_ip

For example:

curl -X POST 'http://example.com/my_raspberry_pi?key=5eec8e1caba298af9cb3ba60cf956c4f98ea2d1f' \
    -d 'private_ip=192.168.0.1' \
    -d 'public_ip=8.8.8.8'

You can put that in a cron or use the thingup.sh script. First argument is the URI pointing to your thing. Second argument is the key.

script/thingup.sh http://example.com/my_raspberry_by 5eec8e1caba298af9cb3ba60cf956c4f98ea2d1f

Install

Though ruby is not required to run the thingies server, Capistrano recipes are provided for an easy forever-based deploy.

thingies's People

Contributors

carbonaro avatar

Watchers

 avatar

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.