Commit Graph

15 Commits

Author SHA1 Message Date
4c03959437 feat(mqtt): Implement M0-M3 - MQTT IoT Bridge with Session Detection
- M0: MQTT Client with TLS/SSL support
  - Connection to mqtt.majufilo.eu:8883
  - Topic subscription with wildcards
  - JSON payload parsing

- M1: Shelly PM Mini G3 Integration
  - Status message parser (shaperorigin/status/pm1:0)
  - Custom MQTT topic prefix support
  - Power, voltage, current, frequency extraction
  - Device mapping via topic_prefix

- M2: Event Normalization
  - Event Schema v1 with UUID-based event IDs
  - ISO 8601 UTC timestamps
  - Machine/Device info mapping
  - Metrics normalization (power_w, voltage_v, current_a, frequency_hz)
  - Filter None values

- M3: Session Detection Engine
  - State machine: IDLE → STARTING → RUNNING → STOPPING → IDLE
  - Power-based threshold detection (configurable per machine)
  - Debounce logic (separate for start/stop)
  - Session events with duration calculation
  - Persistent storage (JSONL for events, JSON for sessions)
  - Odoo-ready data format for future migration

Data Storage:
- events.jsonl: JSON Lines format (one event per line)
- sessions.json: Session records with start/end/duration
- Ready for migration to open_workshop.session model

Multi-device ready: Add devices via config.yaml with unique topic_prefix
2026-01-22 19:59:17 +01:00
77cd3f4595 fix: Deprecated force_sync Feature entfernt und wiki_doku_id bei Reset erhalten
Änderungen:
- maintenance_equipment.py: wiki_doku_id wird bei action_reset_wiki_sync_status() nicht mehr zurückgesetzt (ist manuell editierbar)
- equipment_wiki_sync_wizard.py: Deprecated force_sync Feld und zugehörige Logik entfernt
- equipment_wiki_sync_wizard_views.xml: force_sync UI-Element entfernt
- FEATURE_REQUEST/Odoo18_MQTT_IoT.md: Projektplan für MQTT-basierte IoT-Events hinzugefügt

Grund:
- force_sync Feature referenzierte nicht existierende Methoden (_generate_wiki_doku_page_content, _get_wiki_doku_page_id)
- wiki_doku_id ist jetzt manuell editierbar und sollte nicht automatisch zurückgesetzt werden
- Cleanup von veralteter/fehlerhafter Funktionalität
2026-01-19 20:27:17 +01:00
ee0e6c8b98 added ignored lib 2026-01-10 19:14:25 +01:00
5057985024 docs(feature-plan): Change namespace to werkstatt:ausruestung and add initial ACL phase
- Changed namespace from ausruestung:* to werkstatt:ausruestung:*
  - Main pages: werkstatt:ausruestung:bereich:maschinenname
  - Doku pages: werkstatt:ausruestung:bereich:maschinenname:doku

- Added two-phase ACL approach:
  - Phase 1: Only @odoo has access (initial setup/testing)
    - werkstatt:ausruestung:* @odoo 8
    - werkstatt:ausruestung:* @ALL 0
  - Phase 2: Werkstatt gets read/edit access (later rollout)
    - Main pages: @werkstatt read-only
    - Doku pages: @werkstatt editable

- Updated all code examples with new namespace
- Updated ACL permission table
- Added phased rollout advantage
2025-12-13 19:23:11 +01:00
00f33faebe docs(feature-plan): Refine DokuWiki architecture - inverted include approach
- Changed from marker-based sync to inverted include architecture:
  - Odoo generates read-only main page with equipment data
  - Main page includes user-editable :doku subpage via Include Plugin
  - Clear separation: Odoo owns structure, users own documentation

- Two-page system per equipment:
  - ausruestung:bereich:maschine (Odoo-generated, read-only)
  - ausruestung:bereich:maschine:doku (user-editable)

- Generisches ACL-System (maintenance-free):
  - ausruestung:*:doku @werkstatt 2 (editable)
  - ausruestung:* @werkstatt 1 (read-only)
  - Works automatically for all equipment

- Simplified sync algorithm:
  - Odoo completely overwrites main page (no marker parsing)
  - User content protected on separate page
  - Include renders both seamlessly

- Added detailed Python code examples
- Documented ACL wildcard matching rules
- Added table showing permission resolution

Benefits:
- No risk of users deleting sync markers
- Users cannot accidentally break Odoo data
- Self-healing: Odoo always regenerates correct structure
- Scalable: Works for 1000+ equipment pages
2025-12-13 18:16:33 +01:00
2eff81ce54 docs(feature-plan): Clarify sync mechanism - unidirectional with protected sections
- Changed 'bidirektional' to 'unidirektional' (Odoo → DokuWiki)
- Clarified data ownership:
  - Odoo = Master for structured data (name, serial_no, area, category)
  - DokuWiki = Master for freetext documentation (manuals, tips)

- Added sync marker system:
  - <- Ensures POS functionality is activated after ODOO_SYNC_START: section_name -->
  - <- Ensures POS functionality is activated after ODOO_SYNC_END: section_name -->
  - Only content between markers gets updated by Odoo
  - All other sections (Bedienung, Tipps & Tricks) remain untouched

- Documented sync algorithm with Python code example
- Users can freely edit wiki without fear of data loss
- DokuWiki versioning preserves all changes
2025-12-13 17:53:54 +01:00
92490aeb9c docs(feature-plan): Replace WordPress with DokuWiki integration
- Replaced open_workshop_api (WordPress REST API) with open_workshop_dokuwiki
- DokuWiki chosen for equipment documentation:
  - File-based, no separate database needed
  - Built-in versioning and history
  - Wiki syntax perfect for technical docs
  - Granular ACL (Odoo writable, all readable)
  - XML-RPC API for bidirectional sync

- Planned DokuWiki features:
  - Automatic wiki page per equipment
  - Namespace structure: ausruestung:bereich:maschinenname
  - Template system with equipment data
  - Smart button 'Wiki öffnen' in Equipment form
  - Auto-sync on equipment changes

- WordPress integration now optional:
  - Can be added later for public presentation
  - DokuWiki handles documentation (priority)
  - WordPress for marketing/SEO (future)

- Updated architecture diagram and implementation status
- open_workshop_api moved to 'optional' status
2025-12-13 17:50:51 +01:00
ed339b0e2e feat(open_workshop_base): Erweiterte Search-View und Gruppierung
- Füge maintenance.equipment Felder zur Suche hinzu (model, partner_id, location, company_id)
- Erweitere Gruppierungsoptionen (Hersteller, Techniker, Standort)
- Standard-Gruppierung nach Bereich aktiviert
- Dokumentation: _inherits Pattern erklärt in Feature Plan
2025-12-13 14:38:42 +01:00
550cdac1eb fix: Set company_id in equipment migration to fix serial number generation
- Add default company_id to equipment records during migration
- Fixes 'Generate Serial Number' button not working for migrated equipment
- Equipment without company_id could not generate serial numbers
2025-12-11 19:22:52 +01:00
bb3d1bf7c9 removed unused files 2025-12-07 15:00:15 +01:00
bf605539fa final feature request 2 2025-12-07 14:53:06 +01:00
12d5902e3c final feature request 1 2025-12-07 14:50:36 +01:00
977aa2d1b3 final feature request 2025-12-07 14:46:09 +01:00
58c7e8f258 Open Workshop Multi Module Refactoring 2025-12-07 14:03:32 +01:00
7cd458b72f This now a multi modul odoo repository, open_workshop moved to open_workshop_base 2025-12-06 20:45:29 +01:00