Skip to content
/ LifeOS Public

Biometric productivity system integrating Oura Ring, neural audio, and smart home / 生体データ×神経音響×スマートホーム統合システム

License

Notifications You must be signed in to change notification settings

moycoin/LifeOS

Repository files navigation

🧬 LifeOS v6.2.0

Major Update

Biometric-Driven Cognitive Optimization Platform

生体データ駆動型 認知最適化プラットフォーム


Version Python License Oura Lines


🎉 MASSIVE UPDATE: v5.4 → v6.2

+40% Performance | 4-DB Architecture | 7-Channel Audio | Smart Home Integration



💎 Support This Project / このプロジェクトを支援

☕ Buy Me a Crypto Coffee / 開発者にコーヒーを

Your support keeps this project alive and evolving!

あなたのサポートがこのプロジェクトを成長させます!


🔗 Multi-Chain Address (EVM Compatible)

0x9d8CC17a83b9A75D488E2A15dbcB842AC44a022F

Chain Network 対応チェーン
Ethereum イーサリアム
Polygon ポリゴン
BNB Chain BNBチェーン
Arbitrum アービトラム
Optimism オプティミズム
🔵 Base ベース

Amount Meaning 意味
0.001 ETH ☕ Coffee コーヒー1杯
0.01 ETH 🍕 Pizza ピザ1枚
0.05 ETH 📚 Books 技術書
0.1+ ETH 🚀 Sponsor スポンサー

Donate ETH Donate MATIC Donate BNB



🚀 What's New in v6.2.0 / v6.2.0の新機能

⚡ Performance Comparison / パフォーマンス比較

Metric v5.4.1 v6.2.0 Improvement
Startup Time ~3.2s ~1.9s 🔥 40% faster
Memory Usage ~180MB ~125MB 📉 30% reduced
Database Size ~50MB ~12MB 💾 76% smaller
Code Lines 9,800 12,692 📈 +30% features
Audio Channels 4 7 🎵 +75% richer

🗄️ Database v7.0.0

4-DB Architecture — Lightweight Resident App Design

軽量常駐アプリ向けに完全再設計

state.db   → ~50KB (Real-time / リアルタイム)
metrics.db → <10MB (7-day rolling / 7日ローリング)
summary.db → ~1MB  (Aggregated / 集計済み)

✅ WAL mode for concurrent access
✅ Auto-purge old data
✅ Thread-safe operations

🎨 GUI v6.2.0

Lazy Tab Loading — Initialize only when needed

必要時のみタブを初期化

  • 🍎 macOS-style frameless window
  • ⚡ 40% faster startup
  • 💾 30% less memory
  • 🎯 Smooth 60fps animations

🎵 NeuroSound Engine v2

7-Channel Audio Architecture

7チャンネル音響アーキテクチャ

Channel Purpose 用途
0-1 BGM (A/B crossfade) BGMクロスフェード
2-4 Ambient (Rain/Fire/Custom) 環境音
5 Voice (TTS) 音声合成
6 SFX (Shisha) 効果音

✅ Async BGM Worker Thread
✅ State Inertia Controller
✅ Liquid Inject System

🏠 AmbientSync v2

Smart Home Integration

スマートホーム統合

Device Feature 機能
💡 Hue Focus lighting 集中照明
📺 BRAVIA Power saving sync 省電力同期
❄️ Kirigamine Auto climate 自動空調
🤖 SwitchBot CO2 ventilation CO2換気

✅ Sleep Detection
✅ Away Mode
✅ Focus Lighting


📊 System Architecture / システム構成

┌─────────────────────────────────────────────────────────────────────────────────┐
│                         🧬 LifeOS v6.2.0 Architecture                           │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│    ┌──────────┐     ┌─────────────┐     ┌──────────────┐     ┌─────────────┐   │
│    │  💍 Oura │────▶│   Daemon    │────▶│   4-DB       │────▶│    GUI      │   │
│    │   Ring   │     │   (SSOT)    │     │ Architecture │     │  (Reader)   │   │
│    └──────────┘     └──────┬──────┘     └──────────────┘     └─────────────┘   │
│                            │                                                    │
│    ┌──────────┐     ┌──────▼──────┐     ┌──────────────┐                       │
│    │ ⌨️ pynput│────▶│  BioEngine  │────▶│  Shadow HR   │                       │
│    │  (APM)   │     │  (FP Calc)  │     │ (ML Predict) │                       │
│    └──────────┘     └─────────────┘     └──────────────┘                       │
│                                                                                 │
│    ┌───────────────────────────────────────────────────────────────────────┐   │
│    │              🎵 NeuroSoundEngine (7-Channel Architecture)             │   │
│    │  ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐                         │   │
│    │  │BGM-A│BGM-B│Rain │Fire │Cust │Voice│ SFX │                         │   │
│    │  │ 🎹  │ 🎹  │ 🌧️  │ 🔥  │ 🎶  │ 🗣️  │ 💨  │                         │   │
│    │  └─────┴─────┴─────┴─────┴─────┴─────┴─────┘                         │   │
│    │    Focus │ Flow │ Relax │ Sleep    Neural Acoustic Programming       │   │
│    └───────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│    ┌───────────────────────────────────────────────────────────────────────┐   │
│    │                    🏠 AmbientSync (Smart Home Hub)                    │   │
│    │  ┌─────────┬─────────┬─────────┬─────────┬─────────┐                 │   │
│    │  │  💡Hue  │📺BRAVIA │❄️Kiriga │🤖Switch │🖥️Monitor│                 │   │
│    │  └─────────┴─────────┴─────────┴─────────┴─────────┘                 │   │
│    └───────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

🔬 Core Algorithms / コアアルゴリズム

🧠 Focus Points (FP) — Cognitive Resource Index / 認知リソース指標

FP_effective = clamp(10, 100, Base_FP + (Boost_FP × Efficiency) - (Debt × 0.3))
Parameter Description 説明 Range
Base_FP Readiness-derived baseline Readinessから導出 0-100
Boost_FP Activity-driven boost 活動による増加 0-50
Efficiency Chronotype × HR factor 時間帯×心拍係数 0.5-1.5
Debt Accumulated fatigue 蓄積疲労 0-100

💓 Shadow Heartrate — Real-time HR Prediction / リアルタイム心拍推定

HR_pred = HR_base + 10 + (APM × α) + (Mouse × β) + (WorkTime × γ × 20)

Compensates for Oura API's 2-3 hour latency with ML-based prediction.
Oura APIの2-3時間遅延を機械学習で補完。係数は実測値到着時に自動学習。

Coefficient Initial Range Purpose
α (alpha) 0.10 0.01-0.5 APM impact / APM影響
β (beta) 0.02 0.001-0.1 Mouse speed / マウス速度
γ (gamma) 0.05 0.01-0.2 Work duration / 作業時間

🎵 Neural Acoustic Frequencies / 神経音響周波数

Mode Carrier Beat Brain State 脳波状態
Focus 400 Hz 40 Hz γ Gamma 深い集中
Flow 300 Hz 14 Hz β Beta 生産的状態
Relax 250 Hz 10 Hz α Alpha リラックス
Sleep 200 Hz 2 Hz δ Delta 睡眠誘導

📁 Project Structure / プロジェクト構成

LifeOS/
├── 📄 LifeOS_GUI.py           # 5,232 lines — Main Entry Point
├── 📄 config.example.json     # Configuration Template
├── 📄 requirements.txt        # Dependencies
├── 📄 .gitignore
│
├── 📁 core/                   # Core Modules (7,560 lines)
│   ├── __init__.py            #   120 lines — Package exports
│   ├── types.py               #   215 lines — Types & constants
│   ├── database.py            #   847 lines — 4-DB Architecture v7.0
│   ├── engine.py              # 1,849 lines — BioEngine + ShadowHR
│   ├── audio.py               # 1,182 lines — NeuroSoundEngine
│   ├── daemon.py              # 1,737 lines — Background daemon
│   └── home.py                # 1,510 lines — Smart home control
│
├── 📁 Data/
│   ├── style.qss              # Dark theme stylesheet
│   └── 📁 sounds/             # Audio assets
│
└── 📁 logs/                   # Runtime logs (gitignored)

📈 Codebase Statistics / コード統計

Module Lines Percentage
LifeOS_GUI.py 5,232 41.2%
engine.py 1,849 14.6%
daemon.py 1,737 13.7%
home.py 1,510 11.9%
audio.py 1,182 9.3%
database.py 847 6.7%
types.py 215 1.7%
init.py 120 0.9%
Total 12,692 100%

⚡ Quick Start / クイックスタート

# 1. Clone / クローン
git clone https://github.com/moycoin/LifeOS.git
cd LifeOS

# 2. Install dependencies / 依存関係インストール
pip install -r requirements.txt

# 3. Configure / 設定
cp config.example.json config.json
# Edit config.json with your Oura API token
# config.jsonにOura APIトークンを設定

# 4. Run / 実行
python LifeOS_GUI.py

📦 Dependencies / 依存関係

Package Version Required Purpose
PyQt5 ≥5.15 GUI Framework
pygame ≥2.0 Audio Engine
numpy ≥1.20 Signal Processing
pynput ≥1.7 Input Monitoring
requests ≥2.25 API Communication
scipy ≥1.7 Advanced Audio Filters
phue ≥1.1 Philips Hue Integration

📈 Version History / バージョン履歴

Version Date Highlights ハイライト
🔥 v6.2.0 2025-01 4-DB Architecture, Lazy Tabs, Zone Audio 4-DB構成、遅延タブ、ゾーン音響
v6.0.0 2024-12 NeuroSoundController, State Inertia 状態慣性制御
v5.4.1 2024-11 Shadow Heartrate ML, Home Automation ML心拍推定、ホームオートメーション
v4.8.0 2024-10 BioEngine v4, Chronotype Learning クロノタイプ学習
v3.0.0 2024-08 Initial public release 初回公開

🗺️ Roadmap / ロードマップ

Phase Feature Status
v6.3 Mobile companion app (Flutter) 🔜 Planned
v6.4 Apple Watch / Garmin support 🔜 Planned
v6.5 Cloud sync & multi-device 🔜 Planned
v7.0 AI-powered productivity coach 💭 Concept

💎 Support Development / 開発を支援する


🙏 Your donation helps / あなたの寄付が支えます

What Description 説明
Server & API costs サーバー・API費用
📚 Research & development 研究開発
🔧 Hardware for testing テスト用ハードウェア
Full-time development フルタイム開発

🔗 Donation Address / 寄付アドレス

Works on all EVM chains / 全EVMチェーン対応


0x9d8CC17a83b9A75D488E2A15dbcB842AC44a022F

Ethereum Polygon BNB Arbitrum Optimism Base


USDT / USDC / DAI also accepted on any chain above

上記チェーンでUSDT/USDC/DAIも受付中



📜 License / ライセンス

MIT License — Copyright (c) 2025 @moycoin



🧠 Created by @moycoin


"Optimize your biology, amplify your cognition."

「生体を最適化し、認知を増幅せよ。」


Star this repo if you find it useful!

役に立ったらスターをお願いします!

About

Biometric productivity system integrating Oura Ring, neural audio, and smart home / 生体データ×神経音響×スマートホーム統合システム

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages