All Projects → priyankark → Phonepi_sampleserver

priyankark / Phonepi_sampleserver

Licence: mit
Companion servers in Node and Python for the PhonePi Sensor Streamer apps.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Phonepi sampleserver

Octoprint Enclosure
OctoPrint Enclosure Plugin
Stars: ✭ 267 (+853.57%)
Mutual labels:  sensor
Sensors Software
sourcecode for reading sensor data
Stars: ✭ 469 (+1575%)
Mutual labels:  sensor
Zx gesture sensor smd
The ZX Distance and Gesture Sensor is a touchless sensor that is capable of looking for simple gestures.
Stars: ✭ 5 (-82.14%)
Mutual labels:  sensor
Miflora
☘️🌡🌼🥀🏡 Mi Flora Plant sensor Python package
Stars: ✭ 291 (+939.29%)
Mutual labels:  sensor
Macchina.io
macchina.io IoT Edge Device SDK is a powerful C++ and JavaScript SDK for edge devices, IoT gateways and connected embedded systems.
Stars: ✭ 437 (+1460.71%)
Mutual labels:  sensor
React Native Sensors
A developer friendly approach for sensors in React Native
Stars: ✭ 657 (+2246.43%)
Mutual labels:  sensor
sauresha
Integrations Saures controller to HA
Stars: ✭ 26 (-7.14%)
Mutual labels:  sensor
Temper Hum Hid
🌡 TemperHum HID query API in C
Stars: ✭ 10 (-64.29%)
Mutual labels:  sensor
W1thermsensor
A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
Stars: ✭ 446 (+1492.86%)
Mutual labels:  sensor
Howmanypeoplearearound
Count the number of people around you 👨‍👨‍👦 by monitoring wifi signals 📡
Stars: ✭ 6,525 (+23203.57%)
Mutual labels:  sensor
Mastering ros
This repository contains exercise files of the book "Mastering ROS for Robotics Programming"
Stars: ✭ 351 (+1153.57%)
Mutual labels:  sensor
Maltrail
Malicious traffic detection system
Stars: ✭ 4,296 (+15242.86%)
Mutual labels:  sensor
Haven
Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
Stars: ✭ 6,127 (+21782.14%)
Mutual labels:  sensor
Adafruit Fingerprint Sensor Library
Arduino library for interfacing to the fingerprint sensor in the Adafruit shop
Stars: ✭ 273 (+875%)
Mutual labels:  sensor
Jetsonjs
Embed a JavaScript/WebGL application on a Nvidia Jetson TX2 and stream the results through websockets. It does not rely on CUDA/Jetpack. HDMI touchscreen, virtual keyboard, GPIO control, wifi config are included.
Stars: ✭ 18 (-35.71%)
Mutual labels:  sensor
Home Assistant Config
🏠 Fully documented Home Assistant configuration for a smart-looking place. 😎 Be sure to ⭐️ my repo and copy ideas!
Stars: ✭ 258 (+821.43%)
Mutual labels:  sensor
Upm
UPM is a high level repository that provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform through calls to MRAA APIs.
Stars: ✭ 622 (+2121.43%)
Mutual labels:  sensor
Bmp085
A node.js module for reading a BMP085 barometer sensor.
Stars: ✭ 11 (-60.71%)
Mutual labels:  sensor
Airmonitor
Air quality monitor based on STM32 & MT7681
Stars: ✭ 10 (-64.29%)
Mutual labels:  sensor
Adafruit sensor
Common sensor library
Stars: ✭ 757 (+2603.57%)
Mutual labels:  sensor

PhonePi_SampleServer

These are simple servers with WebSocket support that accept the sensor data and write it to a text file. These are companion sample servers for the PhonePi Sensor Streamer app.

Steps:

  • Clone the repository or download the zip file and unzip it to a directory of your choice.

To Run the Python Server (version >= Python 3.0)

  • Make sure you have python (version >=3) installed and you can access both pip and python from the command line/ terminal
  • To check the same open command line/terminal and type python --version and pip --version
  • cd to the directory where the folder was extracted in the command line
cd PhonePi_SampleServer-master/Python
pip3 install flask
pip3 install flask-sockets
python3 PhonePi.py

To run the Node Server (latest version recommended)

cd Node
npm install
npm start

To use the app

  • Make sure both your phone and the laptop/raspi are on same network.
  • Find the internal ip address of the raspi/laptop
  • If you are using Phone Pi and not Phone Pi+, simply type the ip address:5000.Example: 192.168.1.24:5000 in the app's input bar.
  • You don't need the port number if you are using Phone Pi+. Just input the ip address. Example: 192.168.1.24
  • Switch on whatever sensor's data you want to stream.

You can make any changes you want to to PhonePi.py or PhonePi.js

Data Format Cheat sheet:

Server details (Python)

This makes use of flask_sockets. Note the use of namespaces which are in accordance with the sensor's name. Sample code:

@sockets.route('/accelerometer') 
def echo_socket(ws):
	 f=open("accelerometer.txt","a")
	 while True:
		message = ws.receive()
		print(message) 
        	ws.send(message)
		print>>f,message
	 f.close()

The app would then establish a connection to ws://url//accelerometer where url is what the user enters (ip address:port)

Contribution guidelines

This repository is open to contributions. On the server side, we are looking to support sample servers in more languages and frameworks such as node.js, Go etc. Please feel free to raise PRs!

For more support, please e-mail [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].