Files
lan_checker/CLAUDE.md
Antoine Van Elstraete b0d571ae26 Add French docstrings and README
- Docstrings for all modules, classes and methods
- README.md with installation and usage instructions
- Update CLAUDE.md with dns.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 18:25:20 +01:00

1.1 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

LAN Checker is a Python script that monitors network services and devices, publishing status via MQTT to Home Assistant using MQTT Discovery.

Commands

# Install dependencies
pip install -r requirements.txt

# Setup config
cp config.yaml.example config.yaml

# Run
python lan_checker.py

Architecture

  • lan_checker.py - Main script: config loading, MQTT client, check scheduler
  • checkers/ - Modular check implementations
    • base.py - BaseChecker abstract class and CheckResult dataclass
    • ping.py, http.py, dns.py, snmp.py - Concrete checker implementations
  • config.yaml.example - Configuration template (copy to config.yaml)

Adding a New Checker

  1. Create checkers/newtype.py inheriting from BaseChecker
  2. Implement check() method returning CheckResult
  3. Register in checkers/__init__.py CHECKERS dict

MQTT Topics

  • Discovery: homeassistant/binary_sensor/lan_checker_{id}/config
  • State: lan_checker/{id}/state (JSON with state, message, response_time, last_check)