Files
nebuleair_pro_4g/CLAUDE.md
2025-03-08 14:43:22 +01:00

24 lines
1.2 KiB
Markdown

# NebuleAir Pro 4G Development Guidelines
## Commands
- `sudo systemctl restart master_nebuleair.service` - Restart main service
- `sudo systemctl status master_nebuleair.service` - Check service status
- Manual testing: Run individual Python scripts (e.g., `sudo python3 NPM/get_data_modbus_v3.py`)
- Installation: `sudo ./installation_part1.sh` followed by `sudo ./installation_part2.sh`
## Code Style
- **Language:** Python 3 with HTML/JS/CSS for web interface
- **Structure:** Organized by component (BME280, NPM, RTC, SARA, etc.)
- **Naming:** snake_case for variables/functions, version suffix for iterations (e.g., `_v2.py`)
- **Documentation:** Include docstrings with script purpose and usage instructions
- **Error Handling:** Use try/except blocks for I/O operations, print errors to logs
- **Configuration:** All settings in `config.json`, avoid hardcoding values
- **Web Components:** Follow Bootstrap patterns, use fetch() for AJAX
## Best Practices
- Check if features are enabled in config before execution
- Close database connections after use
- Round sensor readings to appropriate precision
- Keep web interface mobile-responsive
- Include error handling for network operations
- Follow existing patterns when adding new functionality