Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

NestShift OS

A local-first, edge AI operating system for the home. Learns your patterns. Runs entirely offline. No cloud, no subscriptions, no surveillance.

License: MIT Python 3.10+ Node 18+


What is it?

NestShift OS turns a Raspberry Pi into a truly autonomous home brain. Unlike smart home hubs that rely on rigid "if-this-then-that" rules, NestShift uses a neural core that learns from your behavior and anticipates what you need β€” all without sending a single byte to the cloud.

It runs every AI model locally: voice recognition, energy forecasting, behavioral learning, and safety filtering. Your data stays in your house. Period.


Features

Feature What it does
🧠 Neural Brain (NARE) Spiking neural network with Hebbian learning that forms synapses between your sensors and devices. The more you use it, the smarter it gets.
⚑ Energy Optimisation LightGBM forecasts your demand and shifts high-power loads to the cheapest tariff windows β€” 9–13% savings demonstrated.
πŸ”’ Pi-safe Hardware Filter Immutable safety constraints. No AI, voice command, or bug can override hard limits on temperature, wattage, or high-power concurrency.
πŸŽ™οΈ Local Voice Control Whisper Small runs on-device. Speak naturally. No cloud ASR, no wake-word phoning home.
πŸ–₯️ OrbitAI Dashboard Glassmorphism React UI with real-time telemetry, neural traces, and energy rhythm charts. Deep blacks, neon cyan accents, zero clutter.
πŸ“Š Drift-aware MLOps SystemAgent monitors prediction quality and triggers automatic retraining when your habits change.

Quick Start

Preview the Dashboard (mock mode)

git clone https://github.com/aryan597/nestshift-os.git
cd nestshift-os/dashboard
npm install
npm run dev
# Open http://localhost:5173

Run a single service locally

cd services/brain
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python main.py

Full install on Raspberry Pi 4/5

curl -sSL https://raw.githubusercontent.com/aryan597/nestshift-os/main/scripts/install.sh | bash

Note: Full stack deployment requires Mosquitto MQTT, InfluxDB, and Zigbee2MQTT. See ARCHITECTURE.md for detailed service topology.


System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ OrbitAI Dashboard │◄────►│ FastAPI │◄────►│ Mosquitto MQTT β”‚
β”‚ (React + Vite) β”‚ β”‚ Gateway β”‚ β”‚ (TLS) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β–Ό β–Ό β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Brain β”‚ β”‚ Energy β”‚ β”‚ Automation β”‚ β”‚ System β”‚ β”‚ Zigbee β”‚
β”‚ (NARE) β”‚ β”‚ Agent β”‚ β”‚ Agent β”‚ β”‚ Agent β”‚ β”‚ / GPIO β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • NARE Brain β€” LIF spiking neurons + STDP learning
  • Energy Agent β€” LightGBM demand forecasting + Octopus Agile tariff arbitrage
  • Automation Agent β€” Hourly behavior pattern mining with confidence scoring
  • System Agent β€” Drift detection, model freshness, hardware health
  • Pi-safe β€” Immutable safety filter between all agents and physical hardware

Read the full architecture: ARCHITECTURE.md


Hardware Stack

Component Purpose
Raspberry Pi 5 (4GB+) Primary compute
Shelly 1PM WiFi relays + power monitoring
Danfoss Ally TRV Zigbee radiator valves
Aqara Sensors Temp, humidity, motion, door/window
CT Clamp Whole-home energy monitoring (NILM)

Project Structure

nestshift-os/
β”œβ”€β”€ dashboard/ # React + Vite OrbitAI UI
β”œβ”€β”€ services/ # Microservices (FastAPI + asyncio)
β”‚ β”œβ”€β”€ api/ # REST gateway & auth
β”‚ β”œβ”€β”€ brain/ # NARE neural core
β”‚ β”œβ”€β”€ energy-agent/ # Demand forecasting & tariff logic
β”‚ β”œβ”€β”€ automation-agent/ # Behavioral pattern learning
β”‚ β”œβ”€β”€ system-agent/ # Drift detection & monitoring
β”‚ β”œβ”€β”€ gpio/ # Raspberry Pi hardware interface
β”‚ └── zigbee/ # Zigbee2MQTT bridge
β”œβ”€β”€ board/ # Buildroot OS overlay
β”œβ”€β”€ config/ # Hardware & neural config
β”œβ”€β”€ scripts/ # Installation & flashing helpers
β”œβ”€β”€ simulation/ # Digital twin evaluation framework
β”œβ”€β”€ tests/ # Safety & logic test suite
└── systemd/ # Production service units

Security & Privacy

  • Local-first: 100% of inference and data stays on your Pi. No cloud APIs, no telemetry, no outbound analytics.
  • Encrypted transport: All MQTT traffic uses TLS. JWT auth on REST endpoints.
  • Immutable safety: Pi-safe constraints are hardcoded. No prompt injection, voice spoof, or model drift can disable them.
  • Camera-free: Optional WiFi CSI sensing (RuView) for through-wall occupancy without cameras or wearables.

Research

NestShift OS is the product of active research in edge AI and residential energy optimisation.

  • Energy optimisation: 9–13% cost reduction across dynamic tariffs (see RESEARCH.md)
  • Solar self-consumption: 12–38% savings for solar-equipped households
  • Digital twin: Reproducible Monte Carlo simulation framework included in simulation/

Read the full research background: RESEARCH.md


Contributing

NestShift sits at the intersection of neuroscience, embedded systems, and home automation. We're actively looking for contributors in:

  • Spiking neural networks (snnTorch / Norse)
  • Embedded ML & ONNX Runtime on ARM64
  • Zigbee / Matter device integrations
  • Safety-critical systems verification

Open an issue or draft PR. All contributions are reviewed through the Pi-safe lens: safety first, features second.


Built by NestShift Ltd for a sustainable, intelligent future.

About

NestShift is a smart home technology company delivering a complete AI-powered platform that converts any existing home regardless of how old or how basic into a fully intelligent, voice-controlled living environment. NestShift processes everything locally on a dedicated AI hub installed inside the customer's home.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /