Giter Site home page Giter Site logo

etrousset / kuzzle-iot-board Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.18 MB

The multi sensor device based on a raspberry pi to demonstratre Kuzzle usage as IoT backend

License: Apache License 2.0

Python 20.69% JavaScript 78.63% HTML 0.30% Shell 0.38%

kuzzle-iot-board's Introduction

Kuzzle IoT demonstration board

The Kuzzle IoT board is based on a raspberry pi to demonstrate Kuzzle as IoT backend

See http://kuzzle.io for more info about Kuzzle

Sensors

Each sensor connected to the RPi will publish its own state to act as they were really independent sensors. Thus, each sensor will have its own device_id built as "the_sensor_base_id" + "the_RPi_UID"

The RPi UID is taken from the serial number found in /proc/cpuinfo

For example if RPi serial is "00000000c9591b74", then le light sensor will have the following device_id: "light_lvl_00000000c9591b74"

Light sensor Tept5700

Light level is measured using TEPT5700 ambient light sensor, datasheet is available here: http://www.vishay.com/docs/81321/tept5700.pdf

The light level acquisition is done using a 12bits DAC (MCP3208) through SPI bus

Device ID: "light_lvl_" + RPi base ID

State published in Kuzzle:

{ 
    "level": light_level
}

light_level is the measured light level in almost Lux.
light_level in a float

NFC

An PN532 NFC/RFID module is used to read RFID cards, connected to UART '/dev/serial0'

Device ID: "NFC_" + RPi base ID

State published in Kuzzle:

{
    "card_id": "12AADDCCD",  // The hexadecimal ID of the RFID sensed tag/card 
    "in_field": True/False   // True if the card is entering the field, False if leaving
}

Buttons

4 buttons are connected to GPIOS [6, 13, 19, 26]

Device ID: "buttons_" + RPi base ID

State published in Kuzzle:

{
    "button_0": "BTN_STATE",
    "button_1": "BTN_STATE",
    "button_2": "BTN_STATE",
    "button_3": "BTN_STATE",
}

With BTN_STATE in ["PRESSED", "RELEASED"]

Motion sensor

A motion sensor is connected to GPIO 5

Device ID: "motion_" + RPi base ID

State published in Kuzzle:

{
    "motion": True/False   // True when mouvment is detect, False when no more
}

Configuration

There is a webserver that allow configuring the multi-sensor, for now allow configure the host and port where to find Kuzzle. The webserver is accessible through http://kuzzle-sensor.local

There is also a dashboard that allow visualising the state of the sensor. The dashboard is using Kuzzle JS SDK available here: https://github.com/kuzzleio/sdk-javascript and uses the data recorded on Kuzzle to display the dashboard

kuzzle-iot-board's People

Contributors

etrousset avatar

Stargazers

Jérôme Cohonner avatar

Watchers

James Cloos avatar

Forkers

jcohonner

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.