Coder Social home page Coder Social logo

priyankark / sensorstreamserver Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 7.0 23 KB

Companion servers for Sensor Stream App. Stream sensor data, audio and images from your phone to an open source server running on your PC/Raspberry Pi in real-time over your local network.

Home Page: https://play.google.com/store/apps/details?id=com.sensorsensei

License: MIT License

Python 100.00%
sensors camera stream audio websockets accelerometer-and-gyroscope accelerometer magnetometer step-counter light-sensor

sensorstreamserver's Introduction

Sensor Stream App

Sensor Stream allows you to convert your phone into a complete sensor hub and stream real-time sensor information from your phone to the provided open source server over wifi/local network. The server can be modified as per your use-case. The app can be used to build IoT applications, for data science projects and many more use cases!

Sensor Stream Server

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 Sensor Stream app.

Steps:

  • Clone the repository or download the zip file and unzip it to a directory of your choice.
  • Make sure you have given the app all the necessary access permissions (especially if you wish to use audio streaming/image streaming)

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
  • Optional Step: It's highly recommended, you create a virtual env before installing dependencies. Activate the virtual environment and proceed. OS specific steps are available in the docs [https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/]

Brief Summary of steps to follow to create virtual env [Optional Step]

cd Python
cd server
py -m venv env # Create virtual env
source env/bin/activate (On Linux or Mac) or .\env\Scripts\activate (On Windows)

Final Installation and run steps

cd SensorStreamServer
cd server
pip install -r requirements.txt 
python3 server.py

To use the app

  • Make sure both your phone and the laptop/raspi/other device are on same network.
  • Find the internal ip address of the raspi/laptop. The server should be showing you the same.
  • Simply type the ip address:5000.Example: 192.168.1.24:5000 in the app's input bar.
  • Switch on whatever sensor's data you want to stream.

You can make any changes you want to to server.py

Data Format Cheat sheet:

  • Accelerometer: x,y,z
  • Gyroscope: x,y,z
  • Magnetometer: x,y,z
  • Orientation: azimuth,pitch,roll
  • Step Counter: steps
  • Thermometer: temperature
  • Light Sensor: light
  • Proximity: isNear, value, maxRange
  • Link: https://github.com/kprimice/react-native-sensor-manager
  • Camera and Audio: base64 encoded strings

Contribution guidelines (Optional)

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] and I will get back to you ASAP.

sensorstreamserver's People

Contributors

priyankark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sensorstreamserver's Issues

Back Camera Image Stream does not work

Hello, thank you for the wonderful free application!
I have been able to get it to stream most of the sensor data, except for the back camera image stream. The app does not give any feedback on any failure, nor am I receiving anything on the server side.
I am using android version 12 on a Samsung Galaxy A53.
If possible, could you kindly give any tip on what might have gone wrong?
Thank you.

Fixed ip address

Can we have fixed ip address for this app? I noticed the ip address bar cleans itself every time I launch the app, which is quite annoying sometimes.

Sensor Stream for Audio

Hi Mr. Kumar,
I'm using your app and python server to stream inertial sensors info and also audio samples, but I would like to have more control from app about sample rate and duration of audio sampling.
Is it possible to modify the app? or allow to access to the source code to modify it?
Thanks in advance.
Regards,
Josan M.

GPS does not update

GPS value only updates once when running server.py while other sensors value stream normally. I also tried going outside but the GPS doesn't work but other apps like Google Maps works fine.
Untitled

Fail to connect

Screenshot_2021-11-28-09-38-56-913_com sensorsensei
Also the app is crashed when start the gps sensor

Phone : redmi note 10

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.