7

I would like to design a system using Raspberry Pi that sends the sensor's data to server continuously and receive commands from server.

Will MQTT suit my needs ?

Is there any way to do so if I use Java on my Pi?

Edit

By continuously I mean that streams like video are continuous and other text based data is sent twice every minute.

The sensors are:

Humidity sensor - http://www.amazon.in/DHT11-Temperature-Humidity-Sensor-Module/dp/B01HI9G9ZU?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=710c9d6b-87d0-41e2-b3e0-06a1045769f3

A 5MP camera (Webcam connected to USB of the Pi.)

LDR(Light and Dark) - Sensor

The server is based on a cloud hosting location.

Shakti Phartiyal
  • 713
  • 1
  • 6
  • 15

2 Answers2

7

Ok here goes

  • Install MQTT on your Raspberry Pi

Look if it is already running on your Rpi linux flavor or install it

  • Expose your MQTT port

Look at which port MQTT is installed and open this port using port forwarding with your broadband modem

  • Connect your cloud server to your local MQTT

  • Test your sensors

I don't know how the temperature sensor will be connected, my best guess would be with an Arduino. If it is the case, you can connect it to MQTT with a shield. If not, please edit your question to tell us how your sensors will be connected to your system.

  • Monitor your camera

Raspberry Pi has a library called motion which allows to control the camera, its behaviour on detection,...

Unless motion has already a MQTT interface, your best move is to output movements as pictures and then use a homemade service which uses inotify to wait for a new file and act (MQTT /camera/motion yes)

If you need more advice, please edit your question with other elements.

Goufalite
  • 3,776
  • 17
  • 33
3

By continuously I mean that streams like video are continuous

If you are considering continuous video streaming from Pi then LIVE555 Streaming Media is a may serve your purpose. Live555 will provide following:

  • Source distribution for standards based RTP/RTCP/RTSP/SIP multimedia streaming
  • Suitable for embedded and/or low-cost streaming application
sob
  • 2,640
  • 3
  • 19
  • 37