Scenario Management
The "Scenario" tab allows you to manage all scenarios associated with equipment. You can create, modify, delete, and enable/disable your scenarios from this visual card interface.
Accessing the Scenario Tabβ
To access equipment scenario management:
- Click on "Configure equipment" in your equipment listing
- Then click on the "Scenario" tab
- Scenarios are displayed as cards organized in a grid.
Interface Overviewβ
The interface consists of two main areas:
Header (top bar)β
On the left: "Configured Scenarios"
On the right: Two action buttons
- π "Synchronize with equipment": Opens the synchronization modal
- Disabled if equipment is not reachable via MQTT
- β "New scenario": Creates a new scenario
Card Areaβ
When you have configured scenarios, they are displayed as a card grid.
Premium Featureβ
Scenarios are a feature available only with a Premium or Demo subscription.
If you don't have permissions, you will see:
- A lock message with icon π
- A "Upgrade my subscription" button
- Existing scenario cards will be displayed with reduced opacity (read-only)
Scenario Cardsβ
Each scenario is represented by a visual card containing all information and actions.
Card Structureβ
1. Card Headerβ
Scenario name (clickable for editing):
- Click on the name to quickly edit the scenario name
Badges on the right:
- π‘ "To sync" badge (orange): Displayed if the scenario needs to be synchronized
- Appears if never synchronized
- Appears if modified since last sync
- On hover: tooltip explaining the reason
- π’ "Active" badge (green) or π "Inactive" badge (gray)
2. Scenario Informationβ
Three lines of information:
Line 1: Composition
- Diagram icon
- "[X] blocks β’ [Y] parameters"
- Example: "5 blocks β’ 2 parameters"
Line 2: Last modification
- Clock icon
- "Modified [relative date]"
- Example: "Modified 2 hours ago"
- On hover: exact date in format "DD/MM/YYYY at HH:mm:ss"
Line 3: Synchronization status
- π’ If synchronized:
- Circular arrow icon
- "Synchronized [relative date]" in green
- Example: "Synchronized 10 minutes ago"
- π‘ If never synchronized:
- Warning triangle icon
- "Never synchronized" in orange
4. Actions Section (card footer)β
On the left: Enable/disable switch
- Label "Enabled" (if active) or "Disabled" (if inactive)
- Disabled during operation (spinner)
On the right: Action buttons
- ποΈ Edit button (pencil icon, green on hover)
- Opens the canvas with the scenario loaded
- ποΈ Delete button (trash icon, red on hover)
- Opens a confirmation modal
Creating a New Scenarioβ
Method 1: "New scenario" Buttonβ
- Click on the "New scenario" button on the right
- The canvas opens directly in creation mode
Method 2: First Scenarioβ
If you have no scenarios, an empty screen displays with:
- "No configured scenarios" message
- "Create my first scenario" button
Choose clear and descriptive names for your scenarios. This will make management easier when you have several.
Editing a Scenarioβ
Three ways to edit a scenario:
1. Via the pencil button on the cardβ
- Locate the scenario card
- Click on the button with pencil icon (green)
- The canvas opens with the scenario loaded
- Modify blocks, parameters, connections
- Save changes (Ctrl+S or button)
2. Via the scenario name (quick edit)β
To modify only the name:
- Click on the scenario name in the card
- A modal opens with a text field
- Modify the name
- Validate with Enter or the save button
- Cancel with Escape or the cancel button
The name edit is saved immediately, independent of the scenario content.
3. Double-click on the cardβ
You can also double-click anywhere on the card to open the canvas.
After modifying a scenario, don't forget to synchronize it with the equipment for changes to be applied! An orange "To sync" badge will appear automatically.
Deleting a Scenarioβ
Deletion Processβ
- Locate the scenario card to delete
- Click on the trash button (red)
- A confirmation modal opens
Confirmation Modalβ
The modal displays:
- Trash icon in a transparent red circle
- Title: "Delete scenario"
- Message: "Are you sure you want to delete this scenario? This action is irreversible."
- Box with the name of the scenario to delete
- Two buttons:
- "Cancel" (gray) - Closes the modal without deleting
- "Delete" (red) - Confirms deletion
During Deletionβ
- The button displays "Deleting..." with a spinner
- Buttons are disabled
- Deletion is executed on the server side
β οΈ Deleting a scenario from the DB is irreversible!
If you simply want to temporarily stop execution:
- β Disable the scenario (switch)
- β Do not delete it
What Happens After Deletion?β
- β The scenario is deleted from the database
- β The scenario remains present in the equipment
- π It will appear as "orphan" during the next synchronization
- ποΈ You can delete it from equipment via the synchronization modal
Enable/Disable a Scenarioβ
Enabling and disabling allows controlling scenario execution without deleting them.
Activation Switchβ
Each card has a toggle switch at the bottom left:
Enabled state:
- Switch in right position (blue/green)
- "Enabled" label
- Green "Active" badge at top
- Green left border
Disabled state:
- Switch in left position (gray)
- "Disabled" label
- Gray "Inactive" badge at top
- Gray left border
Toggle Stateβ
- Click on the switch or its label
- State toggles instantly in the DB
- The switch is disabled during operation (prevents double-clicks)
- An orange "To sync" badge appears automatically
- The scenario must be synchronized for the change to apply to equipment
The active/inactive state change is saved immediately in DB, but only takes effect on equipment after synchronization.
The "To sync" badge reminds you that synchronization is needed.
Usefulness of Enable/Disableβ
This feature is very useful for:
- β Testing a scenario before enabling it permanently
- β
Temporarily disabling a seasonal scenario
- Example: Heating in summer, air conditioning in winter
- β Debugging by isolating problematic scenarios
- β
Managing exceptional situations without losing configuration
- Example: Disabling during maintenance
- β Saving memory on equipment without losing the scenario
"To sync" Badge (To Synchronize)β
When Does It Appear?β
The orange "To sync" badge with warning triangle icon appears automatically in two cases:
-
Never synchronized:
lastSyncAtis null- Tooltip: "This scenario has never been synchronized with the controller"
-
Modified since last sync:
updatedAt>lastSyncAt- Tooltip: "This scenario has been modified and needs to be synchronized with the controller"
What to Do When You See This Badge?β
- Note scenarios with this badge
- Click on "Synchronize with equipment"
- In the modal, these scenarios will appear as "To update" or "Not synchronized"
- Perform synchronization
- The badge disappears once synchronized
Synchronize your scenarios regularly to avoid accumulating too many unsynchronized changes. This makes debugging easier in case of problems.
Date Informationβ
Display Formatβ
Dates use moment.js for user-friendly relative display:
- "a few seconds ago"
- "2 minutes ago"
- "1 hour ago"
- "3 days ago"
- "2 months ago"
On Hover (Tooltip)β
Hover over the date to see the exact format:
- Format: "DD/MM/YYYY at HH:mm:ss"
- Example: "20/10/2025 at 14:32:45"
Color Codesβ
- π΅ Gray: Modification date (neutral)
- π’ Green: Synchronization date (success)
- π‘ Orange: "Never synchronized" (warning)
Design and User Experienceβ
Visual Styleβ
Cards use a modern design with:
- Dark background with glass effect (backdrop-filter)
- Subtle gradients for depth
- Translucent borders that become more visible on hover
- Smooth transition effects on all interactions
Responsive Designβ
The grid adapts automatically:
- Mobile (< 768px): 1 column
- Tablet (768-992px): 2 columns
- Desktop (992-1200px): 3 columns
- Large desktop (> 1200px): 4 columns
Animationsβ
- Card hover: Slight elevation (-2px) and brightening
- Button hover: Enlargement (scale 1.05) and color change
- Transitions: 0.2s ease for all animations
Accessibilityβ
- β Informative tooltips on all interactive elements
- β Pointer cursor on clickable elements
- β Immediate visual feedback on actions
- β Clearly identifiable disabled states
- β Sufficient contrast for readability
Empty State (No Scenarios)β
When no scenarios exist, the interface displays:
- Large icon diagram (bi-diagram-3) in gray
- Title: "No configured scenarios"
- Message: "Create your first scenario to automate your equipment."
- CTA Button: "Create my first scenario" with + icon
This is the perfect time to start! Click the button and create your first automation scenario. You can start simple and gradually increase complexity.
Shortcuts and Tipsβ
Keyboard Shortcutsβ
When a name edit modal is open:
- Enter: Validate and save
- Escape: Cancel and close
Quick Interactionsβ
- Click on name: Quickly edit the name
- Click on pencil: Open the full canvas
- Click on switch: Toggle active/inactive
- Double-click on card: Open the canvas
Quick Visual Indicatorsβ
- Green border = Active
- Gray border = Inactive
- Orange badge = Needs synchronization
- Orange text = Never synchronized
- Green text = Last sync
Best Practicesβ
For effective scenario management:
β Name clearly: Use descriptive and explicit names β Add descriptions: Document complex scenarios β Synchronize regularly: Don't let "To sync" badges accumulate β Disable rather than delete: For temporary scenarios β Organize by function: Mentally group scenarios by zone or function β Test after modification: Verify behavior after each change β Monitor badges: Visual indicators guide you β Clean up regularly: Delete truly obsolete scenarios
Limitations and Considerationsβ
Permissionsβ
- β Without Premium/Demo subscription: Read-only (50% opacity)
- β With subscription: All features available
Performanceβ
- The grid loads all scenarios at once (no pagination currently)
- Recommended: Keep a reasonable number of scenarios (< 50) for optimal performance
Synchronizationβ
- Changes are saved to DB immediately
- But only take effect on equipment after synchronization
- Always remember to synchronize after your changes
Next Stepβ
Now that you know how to manage your scenarios, discover how to create and modify them in the creation interface: Creation Interface (Canvas)