# knxUltimateGlobalContext Node – Tutorial Outline

## 1. Intro (0:00)
- "Hi! In this session we configure the `knxUltimateGlobalContext` node, which synchronises KNX group values with the Node-RED global context."
- "It lets other flows read or write KNX data without wiring into every device node."

## 2. Why Use It (0:25)
- "Mirror KNX datapoints into a global variable for dashboards, logic, or scripting."
- "Expose the same variable back to KNX so virtual devices can be updated centrally."

## 3. Inputs & Outputs (0:45)
- "This is a service node: no inputs, no outputs."
- "It listens in the background and keeps the context store in sync with the KNX gateway."

## 4. Core Configuration (1:00)
- **Gateway**: select your `knxUltimate-config` node so the service can subscribe to the KNX bus."
- **Name**: becomes the global context key (letters only)."
- **Expose As Variable**: choose `No`, `Read Only`, or `Read/Write` to control how flows are allowed to manipulate the variable." 

## 5. Write Execution Interval (1:40)
- "Pick how often pending global-to-KNX updates are flushed: 250 ms, 500 ms, 1 s (default), 1.5 s, or 2 s."
- "Higher values batch writes and reduce bus load; lower values feel more responsive."

## 6. Context Storage (2:00)
- "Leave blank to use the default global context store, or specify the name of a persistent storage (for example `file` or `memoryfile`)."
- "Great when you need restart-safe values for lighting scenes or counters."

## 7. How It Works (2:20)
- "The service subscribes to all KNX telegrams handled by the gateway."
- "On incoming writes/responses it updates `global.get(name)` with the decoded value."
- "When you change that global variable programmatically (and the access level allows it) the node schedules a KNX write according to the execution interval."

## 8. Safety Tips (2:50)
- "Use `Read Only` if flows should consume but never override KNX values."
- "When exposing write access, debounce large changes within your logic to avoid flooding the bus."
- "Document the variable name in your project README so other developers know it’s reserved."

## 9. Demo Ideas (3:20)
- "Store heating temperatures in global context to feed dashboards without extra wires."
- "Write to the variable from voice assistant flows to update KNX scenes."

## 10. Wrap-Up & CTA (3:45)
- "We linked the node to the gateway, selected exposure levels, and tuned the write interval."
- "Subscribe for more KNX automation tips and leave a comment with your global context use cases!"
