Git Product home page Git Product logo

raspi-spark-streaming-mqtt's Introduction

raspi-spark-streaming-mqtt

The basic purpose of this project is that the raspberryPi sends the temperature event to the server and spark streams the data using the spark streaming

##What we'll build A solution where the Dev_Raspi can send events to the broker and then we can consume these events using the Spark-streaming Api

##Steps to get started: 1.This project will use Mosquitto as a broker. So if you have not installed mosquitto please follow the links here (https://mosquitto.org/download/) 2. We are considering here two device solution : Dev_Laptop(for SparkStreaming ) and Dev_RasberryPi (MQTTPublisher) (Note: You can use the RaspberryPi for both the SparkStreaming and as the MQTTPublisher as well. 3. So start your Mosquitto on Dev_Laptop. 4. Configure the application.conf with the port and the url of the mosquitto server. 5. Make a assembly jar of this project using the following command.

  sbt assembly
  1. Copy the jar to RaspberryPi using the scp command.

    scp raspi-mqtt-client.jar pi@<pi-ip-address>:/home/pi/Projects/scala
    
  2. Run the Publisher on Dev_RaspberryPi using the following command

    java -cp raspi-mqtt-client.jar com.knoldus.MQTTPublisher
    
This will start the publisher to sending the temperature events to broker. 
  1. Run the Subscriber on Dev_Laptop using the following command

    java -cp raspi-mqtt-client.jar com.knoldus.TemperatureStreaming
    

##What you accomplished:

You have made a simple IOT solution where you made events and analyzed it using the Spark Streaming !

##Sumary

Hurray ! You have successfully developed a sample IOT application :)

raspi-spark-streaming-mqtt's People

Contributors

shiv4nsh avatar

Watchers

James Cloos avatar  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.