Home

Awesome

Kaa application based on Raspberry Pi and DHT11 sensor

This sample RaspberryPI application collects temperature measurements from DHT11 sensor and uploads it to Cassandra using Kaa.

Kaa is an open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.

Installation instruction

  1. Get Rasberry Pi 2 Model B, DHT 11 sensor and 3 Male-Male jumper wires.

  2. Install third-party components for C SDK using this steps.

  3. [Raspberry Pi] Install the WiringPi library.

    git clone git://git.drogon.net/wiringPi
    cd wiringPi
    ./build
    
  4. [Raspberry Pi] Clone the repository of the Kaa Cassandra sample.

    git clone https://github.com/kaaproject/kaa-cassandra-sample.git
    
  5. [Raspberry Pi] Generate the Kaa C SDK based on this log schema and put it to the kaa-cassandra-sample/client/c/libs/kaa directory.

  6. Connect wires using following schema.

DHT11 7. [Raspberry Pi] Build the client demo based on the Kaa C SDK.

cd kaa-cassandra-sample/client/c
./build.sh deploy
  1. [Raspberry Pi] Observe console output.

    Data collection demo started
    Going to add 1th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
    Going to add 2th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
    Going to add 3th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
    Going to add 4th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }
    Going to add 5th log record: { id: 'Sensor 1', region: 'Region 1', model: 'DHT11', val: 25 }