Modern days keeping us busy to finish all our to-do list. In between to pick your package from post or custom office sometimes get difficult, if you do daily commuting with city situated exactly opposite direction.
In such case, if it possible to get your packet's current information, e.g. postman or delivery man was at your door and bring back your packet due to absent of you, might save some of your time and let you drive the post-office or custom-office while getting back home.
That's the idea behind this project.
Prepare Raspberry pi
You need a small size image for rpi, if you have smaller SD-card. The project need to install open-cv which is a quite big package. I used minibian.
So, after prepare SD-card with minibian, you need to install -
1. OpenCV dev library [apt-get libopencv-dev]
2. The mqtt application [mosquitto-1.4.1]
3. Mosquitto dev library [apt-get libmosquitto-dev]
4. Zbar dev library [libzbar0 & libzbar-dev]
for openCV and Zbar, you'll find a list of dependencies, [e.g.
universally unique id library - headers and static libraries], which needs to solve.
You may install the zbar-tool to check QR-code function with webcam. The program is written in pure C++ [so best is use g++, (g++ 4.9.2)] and all mosquitto library kept with source file.
The program is affixed with IP - 192.168.178.100 PORT - 1883 and TOPIC - pcktatDoor. All these information given while initializing class qrMqtt at main.cpp.
Check main.cpp, while you want/need to change these.
While testing, you need to run mosquitto broker
@minibian:~/qrmosq# mosquitto -c /etc/mosquitto/mosquitto.conf
Then subscribe to topic - pcktatDoor [if you didn't change it] to borker IP & PORT
minibian:~# mosquitto_sub -h 192.168.178.100 -p 1883 -t 'pcktatDoor'
At end, run the program and point a QR-code in front of the webcam
For my test case, using below test QR-code,
@minibian:~# mosquitto_sub -h 192.168.178.100 -p 1883 -t 'pcktatDoor' AMAZON MOUSE 30-APR-2016
While at broker side, live program giving output as
@minibian:~/qrmosq# ./qrMqtt ##-Connected with Broker-## Main Data ->AMAZON MOUSE 30-APR-2016 ## - Message published successfully
thankful to ->