Compare commits
3 Commits
claude/wif
...
salmanmkc/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8f16722b9 | ||
|
|
16c50abca3 | ||
|
|
7d09710cb8 |
12
.github/workflows/cd.yml
vendored
12
.github/workflows/cd.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
image_tag: ${{ steps.determine-tag.outputs.tag }}
|
image_tag: ${{ steps.determine-tag.outputs.tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Determine deployment environment
|
- name: Determine deployment environment
|
||||||
id: determine-env
|
id: determine-env
|
||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
url: https://staging.wifi-densepose.com
|
url: https://staging.wifi-densepose.com
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up kubectl
|
- name: Set up kubectl
|
||||||
uses: azure/setup-kubectl@v3
|
uses: azure/setup-kubectl@v3
|
||||||
@@ -126,7 +126,7 @@ jobs:
|
|||||||
url: https://wifi-densepose.com
|
url: https://wifi-densepose.com
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up kubectl
|
- name: Set up kubectl
|
||||||
uses: azure/setup-kubectl@v3
|
uses: azure/setup-kubectl@v3
|
||||||
@@ -199,7 +199,7 @@ jobs:
|
|||||||
# kubectl scale rs -n wifi-densepose -l app=wifi-densepose,version!=green --replicas=0
|
# kubectl scale rs -n wifi-densepose -l app=wifi-densepose,version!=green --replicas=0
|
||||||
|
|
||||||
- name: Upload deployment artifacts
|
- name: Upload deployment artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: production-deployment-${{ github.run_number }}
|
name: production-deployment-${{ github.run_number }}
|
||||||
path: |
|
path: |
|
||||||
@@ -270,7 +270,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Update deployment status
|
- name: Update deployment status
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const deployEnv = '${{ needs.pre-deployment.outputs.deploy_env }}';
|
const deployEnv = '${{ needs.pre-deployment.outputs.deploy_env }}';
|
||||||
@@ -321,7 +321,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create deployment issue on failure
|
- name: Create deployment issue on failure
|
||||||
if: needs.deploy-production.result == 'failure'
|
if: needs.deploy-production.result == 'failure'
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
github.rest.issues.create({
|
github.rest.issues.create({
|
||||||
|
|||||||
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@@ -20,12 +20,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload security reports
|
- name: Upload security reports
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: security-reports
|
name: security-reports
|
||||||
@@ -95,10 +95,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
name: codecov-umbrella
|
name: codecov-umbrella
|
||||||
|
|
||||||
- name: Upload test results
|
- name: Upload test results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: test-results-${{ matrix.python-version }}
|
name: test-results-${{ matrix.python-version }}
|
||||||
@@ -150,10 +150,10 @@ jobs:
|
|||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -174,7 +174,7 @@ jobs:
|
|||||||
locust -f tests/performance/locustfile.py --headless --users 50 --spawn-rate 5 --run-time 60s --host http://localhost:8000
|
locust -f tests/performance/locustfile.py --headless --users 50 --spawn-rate 5 --run-time 60s --host http://localhost:8000
|
||||||
|
|
||||||
- name: Upload performance results
|
- name: Upload performance results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: performance-results
|
name: performance-results
|
||||||
path: locust_report.html
|
path: locust_report.html
|
||||||
@@ -186,7 +186,7 @@ jobs:
|
|||||||
needs: [code-quality, test]
|
needs: [code-quality, test]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -249,10 +249,10 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
|
|||||||
30
.github/workflows/security-scan.yml
vendored
30
.github/workflows/security-scan.yml
vendored
@@ -24,12 +24,12 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -86,10 +86,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -126,7 +126,7 @@ jobs:
|
|||||||
category: snyk
|
category: snyk
|
||||||
|
|
||||||
- name: Upload vulnerability reports
|
- name: Upload vulnerability reports
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: vulnerability-reports
|
name: vulnerability-reports
|
||||||
@@ -147,7 +147,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -218,7 +218,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Run Checkov IaC scan
|
- name: Run Checkov IaC scan
|
||||||
uses: bridgecrewio/checkov-action@master
|
uses: bridgecrewio/checkov-action@master
|
||||||
@@ -272,7 +272,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -303,10 +303,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
@@ -323,7 +323,7 @@ jobs:
|
|||||||
licensecheck --zero
|
licensecheck --zero
|
||||||
|
|
||||||
- name: Upload license report
|
- name: Upload license report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: license-report
|
name: license-report
|
||||||
path: licenses.json
|
path: licenses.json
|
||||||
@@ -334,7 +334,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Check security policy files
|
- name: Check security policy files
|
||||||
run: |
|
run: |
|
||||||
@@ -376,7 +376,7 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v7
|
||||||
|
|
||||||
- name: Generate security summary
|
- name: Generate security summary
|
||||||
run: |
|
run: |
|
||||||
@@ -394,7 +394,7 @@ jobs:
|
|||||||
echo "Generated on: $(date)" >> security-summary.md
|
echo "Generated on: $(date)" >> security-summary.md
|
||||||
|
|
||||||
- name: Upload security summary
|
- name: Upload security summary
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: security-summary
|
name: security-summary
|
||||||
path: security-summary.md
|
path: security-summary.md
|
||||||
@@ -416,7 +416,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create security issue on critical findings
|
- name: Create security issue on critical findings
|
||||||
if: needs.sast.result == 'failure' || needs.dependency-scan.result == 'failure'
|
if: needs.sast.result == 'failure' || needs.dependency-scan.result == 'failure'
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
github.rest.issues.create({
|
github.rest.issues.create({
|
||||||
|
|||||||
135
assets/README.txt
Normal file
135
assets/README.txt
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
WiFi-Mat v3.2 - AI Thermal Monitor + WiFi CSI Sensing
|
||||||
|
======================================================
|
||||||
|
|
||||||
|
Embedded AI system combining thermal monitoring with WiFi-based
|
||||||
|
presence detection, inspired by WiFi-DensePose technology.
|
||||||
|
|
||||||
|
For Heltec ESP32-S3 with OLED Display
|
||||||
|
|
||||||
|
CORE CAPABILITIES:
|
||||||
|
------------------
|
||||||
|
* Thermal Pattern Learning - Spiking Neural Network (LIF neurons)
|
||||||
|
* WiFi CSI Sensing - Through-wall motion/presence detection
|
||||||
|
* Breathing Detection - Respiratory rate from WiFi phase
|
||||||
|
* Anomaly Detection - Ruvector-inspired attention weights
|
||||||
|
* HNSW Indexing - Fast O(log n) pattern matching
|
||||||
|
* Power Optimization - Adaptive sleep modes
|
||||||
|
|
||||||
|
VISUAL INDICATORS:
|
||||||
|
------------------
|
||||||
|
* Animated motion figure when movement detected
|
||||||
|
* Radar sweep with detection blips
|
||||||
|
* Breathing wave visualization with BPM
|
||||||
|
* Status bar: WiFi/Motion/Alert icons
|
||||||
|
* Screen flash on anomaly or motion alerts
|
||||||
|
* Dynamic confidence bars
|
||||||
|
|
||||||
|
DISPLAY MODES (cycle with double-tap):
|
||||||
|
--------------------------------------
|
||||||
|
1. STATS - Temperature, zone, patterns, attention level
|
||||||
|
2. GRAPH - Temperature history graph (40 samples)
|
||||||
|
3. PTRNS - Learned pattern list with scores
|
||||||
|
4. ANOM - Anomaly detection with trajectory view
|
||||||
|
5. AI - Power optimization metrics
|
||||||
|
6. CSI - WiFi CSI motion sensing with radar
|
||||||
|
7. RF - RF device presence detection
|
||||||
|
8. INFO - Device info, uptime, memory
|
||||||
|
|
||||||
|
AI POWER OPTIMIZATION (AI mode):
|
||||||
|
--------------------------------
|
||||||
|
* Mode: ACTIVE/LIGHT/DEEP sleep states
|
||||||
|
* Energy: Estimated power savings (0-95%)
|
||||||
|
* Neurons: Active vs idle neuron ratio
|
||||||
|
* HNSW: Hierarchical search efficiency
|
||||||
|
* Spikes: Neural spike efficiency
|
||||||
|
* Attn: Pattern attention weights
|
||||||
|
|
||||||
|
WIFI CSI SENSING (CSI mode):
|
||||||
|
----------------------------
|
||||||
|
Uses WiFi Channel State Information for through-wall sensing:
|
||||||
|
|
||||||
|
* MOTION/STILL - Real-time motion detection
|
||||||
|
* Radar Animation - Sweep with confidence blips
|
||||||
|
* Breathing Wave - Sine wave + BPM when detected
|
||||||
|
* Confidence % - Detection confidence level
|
||||||
|
* Detection Count - Cumulative motion events
|
||||||
|
* Variance Metrics - Signal variance analysis
|
||||||
|
|
||||||
|
Technology based on WiFi-DensePose concepts:
|
||||||
|
- Phase unwrapping for movement detection
|
||||||
|
- Amplitude variance for presence sensing
|
||||||
|
- Frequency analysis for breathing rate
|
||||||
|
- No cameras needed - works through walls
|
||||||
|
|
||||||
|
BUTTON CONTROLS:
|
||||||
|
----------------
|
||||||
|
* TAP (quick) - Learn current thermal pattern
|
||||||
|
* DOUBLE-TAP - Cycle display mode
|
||||||
|
* HOLD 1 second - Pause/Resume monitoring
|
||||||
|
* HOLD 2 seconds - Reset all learned patterns
|
||||||
|
* HOLD 3+ seconds - Show device info
|
||||||
|
|
||||||
|
INSTALLATION:
|
||||||
|
-------------
|
||||||
|
1. Connect Heltec ESP32-S3 via USB
|
||||||
|
2. Run flash.bat (Windows) or flash.ps1 (PowerShell)
|
||||||
|
3. Enter COM port when prompted (e.g., COM7)
|
||||||
|
4. Wait for flash to complete (~60 seconds)
|
||||||
|
5. Device auto-connects to configured WiFi
|
||||||
|
|
||||||
|
REQUIREMENTS:
|
||||||
|
-------------
|
||||||
|
* espflash tool: cargo install espflash
|
||||||
|
* Heltec WiFi LoRa 32 V3 (ESP32-S3)
|
||||||
|
* USB-C cable
|
||||||
|
* Windows 10/11
|
||||||
|
|
||||||
|
WIFI CONFIGURATION:
|
||||||
|
-------------------
|
||||||
|
Default network: ruv.net
|
||||||
|
|
||||||
|
To change WiFi credentials, edit source and rebuild:
|
||||||
|
C:\esp\src\main.rs (lines 43-44)
|
||||||
|
|
||||||
|
HARDWARE PINOUT:
|
||||||
|
----------------
|
||||||
|
* OLED SDA: GPIO17
|
||||||
|
* OLED SCL: GPIO18
|
||||||
|
* OLED RST: GPIO21
|
||||||
|
* OLED PWR: GPIO36 (Vext)
|
||||||
|
* Button: GPIO0 (PRG)
|
||||||
|
* Thermal: MLX90614 on I2C
|
||||||
|
|
||||||
|
TECHNICAL SPECS:
|
||||||
|
----------------
|
||||||
|
* MCU: ESP32-S3 dual-core 240MHz
|
||||||
|
* Flash: 8MB
|
||||||
|
* RAM: 512KB SRAM + 8MB PSRAM
|
||||||
|
* Display: 128x64 OLED (SSD1306)
|
||||||
|
* WiFi: 802.11 b/g/n (2.4GHz)
|
||||||
|
* Bluetooth: BLE 5.0
|
||||||
|
|
||||||
|
NEURAL NETWORK:
|
||||||
|
---------------
|
||||||
|
* Architecture: Leaky Integrate-and-Fire (LIF)
|
||||||
|
* Neurons: 16 configurable
|
||||||
|
* Patterns: Up to 32 learned
|
||||||
|
* Features: 6 sparse dimensions
|
||||||
|
* Indexing: 3-layer HNSW hierarchy
|
||||||
|
|
||||||
|
SOURCE CODE:
|
||||||
|
------------
|
||||||
|
Full Rust source: C:\esp\src\main.rs
|
||||||
|
WiFi CSI module: C:\esp\src\wifi_csi.rs
|
||||||
|
Build script: C:\esp\build.ps1
|
||||||
|
|
||||||
|
BASED ON:
|
||||||
|
---------
|
||||||
|
* Ruvector - Vector database with HNSW indexing
|
||||||
|
* WiFi-DensePose - WiFi CSI for pose estimation
|
||||||
|
* esp-rs - Rust on ESP32
|
||||||
|
|
||||||
|
LICENSE:
|
||||||
|
--------
|
||||||
|
Created with Claude Code
|
||||||
|
https://github.com/ruvnet/wifi-densepose
|
||||||
BIN
assets/wifi-mat.zip
Normal file
BIN
assets/wifi-mat.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user