Contributing Guide
Thank you for your interest in contributing to Tasmota Remote Updater! This document provides guidelines and instructions for contributing to the project.
Code of Conduct
Please be respectful and considerate of others when contributing to this project. We aim to foster an inclusive and welcoming community.
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
- Set up the development environment:
Development Workflow
Branches
Always branch off the current main:
Prefixes: feature/, bugfix/, hotfix/, chore/, refactor/. Use kebab-case
for the descriptive part and include the issue number when there is one
(bugfix/456-connection-timeout).
No docs/... branch names
A branch named docs already exists, so git rejects docs/... branch names
with a "directory file conflict" error. Use chore/... for documentation work.
Commit messages
This project uses Conventional Commits. The format is not cosmetic: release-please derives the next version and the changelog from it (see Releasing).
- Types:
feat,fix,docs,style,refactor,perf,test,chore,ci - Scopes in use:
tasmota,api,ui,device,auth,config,workflow,deps— omit the scope when a change spans several components - Description: imperative mood, lowercase, no trailing period, ideally under 50 characters
- Reference issues in the body or footer (
Fixes #123)
Examples:
feat(device): add automatic discovery mechanism
fix(api): handle timeout errors in device communication
refactor(tasmota): improve error handling in update process
chore(deps): update dependencies to latest versions
Commits on main must be signed. With commit.gpgsign=true configured locally
this happens automatically.
Pull requests
-
Make your changes and add tests for them
-
Run the test suite:
-
Bring the branch up to date with
main: -
Review
README.md— it drifts unnoticed because ordinary diffs never touch it. Check badges, the clone URL, ports, commands, and that no deprecated path is presented as current -
Push and open the PR:
-
The PR title must itself be a valid conventional commit. PRs are squash-merged, and the squash title is what release-please reads — an invalid title silently means no release
Describe what changed and how you tested it in the PR body, and link the related issues.
Coding Standards
Python
- Follow PEP 8 style guidelines
- Use meaningful variable and function names
- Add docstrings to all functions and classes
- Keep functions focused on a single responsibility
- Use type hints where appropriate
JavaScript
- Use modern ES6+ syntax
- Follow consistent indentation (2 spaces)
- Use meaningful variable and function names
- Add comments for complex logic
HTML/CSS
- Use semantic HTML5 elements
- Follow BEM methodology for CSS classes
- Ensure responsive design works on all screen sizes
Testing
- Add tests for new features
- Ensure all tests pass before submitting a Pull Request
- For bug fixes, add a test that would have caught the bug
Documentation
- Update documentation for any changes to functionality
- Add docstrings to all new functions and classes
- Keep README and other documentation up to date
Areas for Improvement
Here are some areas where contributions would be particularly welcome:
- Authentication: Add user authentication for the web interface
- Device Grouping: Allow organizing devices into logical groups
- Custom Firmware Support: Add support for custom firmware sources
- Scheduled Updates: Implement scheduled updates through the web interface
- Notifications: Add email or push notifications for update results
- Dark Mode: Implement a dark mode theme for the web interface
- Localization: Add support for multiple languages
- Push Notifications: Add support for push notifications
- Device Inventory: Add support for tracking device inventory
- Toggle devices: Add support for toggling devices on and off
- Bulk actions: Add support for bulk actions on devices
Architecture Overview
Understanding the project architecture will help you contribute effectively:
Command-Line Tool
tasmota_updater.py: deprecated — a stub that prints a notice and exits 1. Its ~900 lines duplicated the update logic fromapp/tasmotaand had drifted away from it. Use the web UI or the REST API instead; a thin CLI wrapper overapp/tasmotais a backlog item
Web Application
server.py: Main entry point for the Flask web applicationwsgi.py: WSGI entry point for production (Gunicorn)app/__init__.py: Flask application factoryapp/tasmota/: Core functionality modulesapi.py: API endpointsupdater.py: Device update functionalityutils.py: Utility functionsapp/templates/: HTML templatesapp/static/: Static assets (CSS, JavaScript, images)
Development Process and Insights
This project was developed with a focus on creating a user-friendly solution for managing Tasmota devices. Some key insights from the development process:
-
Command-line First, Web Interface Second: We started with a robust command-line tool to handle the core functionality, then built the web interface on top of that foundation.
-
API-Driven Architecture: The web interface communicates with the backend exclusively through the REST API. This clean separation allows for potential future integrations.
-
Progressive Enhancement: The web interface is designed to work even with JavaScript disabled for basic functionality, with enhanced features when JavaScript is available.
-
User Experience Focus: We prioritized clear visual feedback and intuitive workflows based on how users actually interact with their Tasmota devices.
-
Error Handling: Comprehensive error handling was implemented throughout the application to provide clear guidance when issues occur.
-
Modular Design: The codebase is organized into logical modules that can be maintained and extended independently.
Submitting Pull Requests
- Ensure your code follows the project's coding standards
- Include tests for new functionality
- Update documentation as needed
- Describe your changes in detail in the Pull Request description
- Link to any related issues
Thank you for contributing to Tasmota Remote Updater!