Skip to content

Smart Home & IoT

Comprehensive smart home automation platform integrating devices, sensors, and automations across the homelab. Home Assistant serves as the central hub with custom integrations and IoT sensors.

Automation Hub

๐Ÿ  Home Assistant

Central automation platform controlling lights, sensors, media devices, and custom integrations. YAML-based configuration with extensive add-on ecosystem.

Features: - Device control and automation - Scene and script management - Voice assistant integration - Mobile app with notifications - Energy monitoring


Media Integration

๐ŸŽต Spotcast

Spotify casting integration for Home Assistant. Cast music to Google Nest speakers and other Chromecast devices with context-aware commands.

Features: - Playlist/album/track casting - Device selection by room - Integration with automations - Voice command support


Smart Devices

๐Ÿงน Roborock Q Revo S

Robot vacuum integrated with Home Assistant for automated cleaning schedules, zone cleaning, and status monitoring.

Features: - Scheduled cleaning routines - Room-specific zones - Status notifications - Voice control via Home Assistant

๐Ÿ–จ๏ธ Moonraker (Klipper)

3D printer monitoring and control via Klipper firmware and Moonraker API integration.

Features: - Print progress monitoring - Remote start/stop/pause - Camera feed integration - Filament usage tracking


Custom IoT Sensors

๐ŸŒก๏ธ ESP8266/ESP32 Sensors

Custom-built temperature and humidity sensors with OLED displays and web interfaces. Integrated with Home Assistant for data collection and Grafana for visualization.

See AIO IoT Sensor project for build details.

Features: - DHT22 temperature/humidity sensing - OLED display (0.96") - Web server for direct access - MQTT integration for Home Assistant - SQL database logging - Grafana dashboard visualization


Smart Home Architecture

Device Categories

Lighting - Smart bulbs (Philips Hue, LIFX) - Smart switches - Motion-activated scenes

Climate - Thermostats - Temperature sensors - Humidity monitors

Security - Door/window sensors - Motion detectors - Camera integration

Media - Google Nest speakers - Chromecast devices - TV integration

Appliances - Roborock vacuum - 3D printer (Klipper) - Smart plugs

Network Segmentation

IoT devices isolated on dedicated VLAN:

VLAN 30: IoT Devices
- No access to management network
- Firewalled from servers
- Outbound internet allowed (controlled)
- Home Assistant on trusted VLAN with access


Automation Examples

Presence Detection

automation:
  - alias: "Arrive Home"
    trigger:
      - platform: state
        entity_id: person.max
        to: "home"
    action:
      - service: light.turn_on
        entity_id: group.entry_lights
      - service: climate.set_temperature
        data:
          entity_id: climate.thermostat
          temperature: 72
      - service: notify.mobile_app
        data:
          message: "Welcome home!"

Media Control

automation:
  - alias: "Movie Mode"
    trigger:
      - platform: state
        entity_id: media_player.living_room_tv
        to: "playing"
    condition:
      - condition: sun
        after: sunset
    action:
      - service: light.turn_off
        entity_id: group.living_room_lights
      - service: cover.close_cover
        entity_id: cover.living_room_blinds

Morning Routine

automation:
  - alias: "Wake Up Routine"
    trigger:
      - platform: time
        at: "07:00:00"
    condition:
      - condition: state
        entity_id: binary_sensor.workday
        state: "on"
    action:
      - service: light.turn_on
        entity_id: group.bedroom_lights
        data:
          brightness: 50
          transition: 300
      - service: spotcast.start
        data:
          device_name: "Bedroom Speaker"
          uri: "spotify:playlist:37i9dQZF1DWZd79rJ6a7lp"  # Morning playlist
      - service: climate.set_temperature
        data:
          entity_id: climate.bedroom
          temperature: 70

Security Alert

automation:
  - alias: "Door Open at Night"
    trigger:
      - platform: state
        entity_id: binary_sensor.front_door
        to: "on"
    condition:
      - condition: time
        after: "22:00:00"
        before: "06:00:00"
    action:
      - service: light.turn_on
        entity_id: group.all_lights
        data:
          flash: long
      - service: notify.mobile_app
        data:
          message: "Front door opened at night!"
          title: "Security Alert"

Data Collection & Visualization

InfluxDB Integration

Store sensor data in time-series database:

# configuration.yaml
influxdb:
  host: influxdb.local
  port: 8086
  database: homeassistant
  include:
    entities:
      - sensor.living_room_temperature
      - sensor.living_room_humidity
      - sensor.bedroom_temperature

Grafana Dashboards

Visualize historical data: - Temperature trends over time - Humidity levels by room - Energy consumption tracking - Automation execution frequency


Voice Assistant Integration

Google Assistant

  • "Hey Google, turn off the lights"
  • "Hey Google, set thermostat to 72"
  • "Hey Google, start vacuuming"

Jarvis (Custom AI Assistant)

  • Natural language commands
  • Context-aware responses
  • Integration with all Home Assistant devices
  • See Jarvis documentation

Best Practices

  1. Device Naming โ€“ Use consistent naming conventions (room_device_type)
  2. Automation Testing โ€“ Test automations in safe conditions first
  3. Backup Config โ€“ Regular backups of Home Assistant config
  4. Update Strategy โ€“ Update add-ons and integrations carefully
  5. Network Isolation โ€“ Keep IoT devices on separate VLAN
  6. Security โ€“ Use strong passwords and 2FA
  7. Documentation โ€“ Comment complex automations
  8. Monitoring โ€“ Track device availability and battery levels

Monitoring

  • Home Assistant Dashboard โ€“ Device status and automation logs
  • Checkmk โ€“ System monitoring for Home Assistant server
  • Grafana โ€“ Historical sensor data and trends
  • Graylog โ€“ Centralized logs from all IoT devices
  • Uptime Kuma โ€“ Service availability monitoring