Request listener
Hardware : Advantech Wise 4012
Technology: Python-Flask
Motivation: Server integration or data processing
RequestListener.py : Works for every request , displays request data on commandline
AdvantechPostListener.py : Listens and maps 'Push Notifications(JSON)' to python list.
- Installing pip
pi@raspberrypi ~ $ sudo apt-get install python-pip
- Installing Flask
pi@raspberrypi ~ $ sudo pip install flask
pi@raspberrypi ~ $ sudo python RequestListner.py
* Running on http://0.0.0.0:80/
* Restarting with reloader
Server will start at ip of host (you can find that by ifconfig)
readings : dictonary
readings = [{"Data": "Sensor Data",
"MAC": "Mac Address",
"PE": "PE",
"Time": "Time Stamp",
"UID": "Device name",
"id": 1}]