JINS MEME(2021年モデル)のJINS MEME LoggerをPythonのWebSocketサーバーで受信するサンプル

Overview

JINS-MEME-Python-WebSocketServer-Sample

JINS MEME(2021年モデル)のJINS MEME LoggerをPythonのWebSocketサーバーで受信するサンプルです。

Logging Data

以下のデータに対応しています。
各データの定義はJINS MEME Platform:データ定義を参照ください。

  • 20Hzデータ(currentData)
    約20Hzでデータを取得でき、動きの把握やコントローラーなど
    精緻なデータの即時取得・分析に適したモードです。
    このデータはJINS MEMEとスマートフォンがBluetooth接続している時のみ生成されます。
  • 15秒間隔データ(logicIndexData)
    15秒間隔データは生体指標を出力する一番粒度の細かいデータです。
    このデータはJINS MEMEとスマートフォンがBluetooth接続している時のみ生成されます。
  • 60秒間隔データ(summaryData)
    1分間に1回データを取得できる、長時間の状態変化をモニタリングするのに適したモードです。
  • 高速頭部運動データ(fastHeadMotion)
    0.2〜0.9秒程度の周期で頭を左右、上下に向けた時の最初の方向、回数カウントのイベントです。
    連続で往復すると回数がカウントアップされ、連続した動作が止まると最終値のみ返されます。
    回転速度で判定するため、ジャイロセンサーをオンにする必要があります。
    このデータはJINS MEMEとスマートフォンがBluetooth接続している時のみ生成されます。
  • 低速頭部運動データ(slowHeadMotion)
    頭を真っ直ぐな状態から左右か前後に45°以上傾けて1秒間弱維持した時のイベントです。
    このデータはJINS MEMEとスマートフォンがBluetooth接続している時のみ生成されます。

Requirement

  • websocket-server 0.5.6 or later
pip install websocket-server

Preparation

  1. JINS MEME Loggerを起動する
    Play Store
    App Store
  2. JINS MEME Loggerの「接続」タブでJINS MEMEを接続する(要Bluetoothオン)
  3. サーバーとなるPCとJINS MEMEを接続したスマホを同じWifiに接続する
  4. JINS MEME Loggerの「設定」タブで「ジャイロを取得」をオンにする
     
  5. JINS MEME Loggerの「設定」タブで「WebSocketクライアント」を追加する
    設定名称:任意の名称を指定
    Ip Address:PCのIPアドレスを指定
    Port:8080(必要に応じて任意のポートを指定)
    Data Tyep:取得したいタイプを指定
     

Demo

デモの実行方法は以下です。

python Sample-currentData.py
    or
python Sample-summaryData.py
    or
python Sample-logicIndexData.py
    or
python Sample-fastHeadMotion.py
    or
python Sample-slowHeadMotion.py
  • --host
    WebSocketServerのPCのIPアドレス
    デフォルト:192.168.179.11
  • --port
    WebSocketServerのPCのポート
    デフォルト:8080

Reference

Author

高橋かずひと(https://twitter.com/KzhtTkhs)

License

JINS-MEME-Python-WebSocketServer-Sample is under MIT License.

Owner
KazuhitoTakahashi
KazuhitoTakahashi
Official repository for gevent-socketio

Presentation gevent-socketio is a Python implementation of the Socket.IO protocol, developed originally for Node.js by LearnBoost and then ported to o

Alexandre Bourget 1.2k Dec 12, 2022
Terminals served by tornado websockets

This is a Tornado websocket backend for the Xterm.js Javascript terminal emulator library. It evolved out of pyxterm, which was part of GraphTerm (as

Project Jupyter 332 Dec 27, 2022
Using python-binance to provide websocket data to freqtrade

The goal of this project is to provide an alternative way to get realtime data from Binance and use it in freqtrade despite the exchange used. It also uses talipp for computing

58 Jan 01, 2023
Socket.IO integration for Flask applications.

Flask-SocketIO Socket.IO integration for Flask applications. Installation You can install this package as usual with pip: pip install flask-socketio

Miguel Grinberg 4.9k Jan 03, 2023
Python socket.io server implementation on top of Tornado framework

TornadIO2 Disclaimer Unfortunately, Socket.IO 0.8 branch is abandoned, there are huge amount of bugs and nothing getting fixed. I would suggest to loo

Serge S. Koval 526 Oct 03, 2022
wssh ("wish") is a command-line utility/shell for WebSocket inpsired by netcat.

wssh ("wish") is a command-line utility/shell for WebSocket inspired by netcat

Jeff Lindsay 256 Nov 16, 2022
AWS API Gateway Websocket Asynchronous Notifications Pusher

AWS API Gateway Websocket Asynchronous Pusher Fast AWS API Gateway websockets notifications' pusher using Python AsyncIO for managing asynchronous and

OBytes 5 May 15, 2022
JINS MEME(2021年モデル)のJINS MEME LoggerをPythonのWebSocketサーバーで受信するサンプル

JINS-MEME-Python-WebSocketServer-Sample JINS MEME(2021年モデル)のJINS MEME LoggerをPythonのWebSocketサーバーで受信するサンプルです。 Logging Data 以下のデータに対応しています。 各データの定義はJIN

KazuhitoTakahashi 19 Apr 29, 2022
一款为 go-cqhttp 的正向 WebSocket 设计的 Python SDK

Nakuru Project 一款为 go-cqhttp 的正向 WebSocket 设计的 Python SDK 在 kuriyama 的基础上改动 项目名来源于藍月なくる,图标由せら绘制 食用方法 将 nakuru 文件夹移至 Python 的 Lib/site-packages 目录下。

35 Dec 21, 2022
Python Socket.IO server and client

python-socketio Python implementation of the Socket.IO realtime client and server. Version compatibility The Socket.IO protocol has been through a num

Miguel Grinberg 3.2k Dec 31, 2022
Whatsapp Clone using django, django-channels and websocket

whatsapp-clone Whatsapp Clone using django, django-channels and websocket Features : Signup/Login One on One personal chat with other user Some screen

Anshu Pal 14 Dec 25, 2022
WebSocket implementation in Python built on top of websockets python library. Similar to Node.js's ws.

ws WebSocket implementation in Python built on top of websockets python library. Similar to Node.js's ws. Basic usage. server.py import ws server = w

AceExpert 7 Jun 27, 2022
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Django 5.5k Jan 03, 2023
Django Channels HTTP/WebSocket server

daphne Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP, developed to power Django Channels. It supports automatic negotia

Django 1.9k Dec 31, 2022
This websocket program is for data transmission between server and client. Data transmission is for Federated Learning in Edge computing environment.

websocket-for-data-transmission This websocket program is for data transmission between server and client. Data transmission is for Federated Learning

9 Jul 19, 2022
alien.py - Python interface to websocket endpoint of ALICE Grid Services

alien.py - Python interface to websocket endpoint of ALICE Grid Services Quick containerized testing: singularity

Adrian Sevcenco 6 Dec 14, 2022
A Security Tool for Enumerating WebSockets

STEWS: Security Testing and Enumeration of WebSockets STEWS is a tool suite for security testing of WebSockets This research was first presented at OW

175 Jan 01, 2023
Get realtime updates in your mobile/web app from frappe and erpnext

Fsocket Extend frappe's websocket server using socket.io and redis Installation Use frappe bench to add fsocket in your project $ bench get-app https:

21 Sep 25, 2022
A simple texts communication platform using pygame and sockets.

Python Tchat A simple texts communication platform using pygame and sockets. How to install ? You need a python 3.8.6 server with at least one opened

Yohann Boniface 7 Jan 23, 2022
Websocket 'broadcast' demo using FastAPI/Starlette

fastapi-websocket-broadcast An example of the familiar 'chat' websocket demo app, implemented in FastAPI / Starlette. Run with uvicorn app:app And th

Kit Thwaite 109 Nov 30, 2022