AI-Based Occupancy Detection in KNX Buildings: From Presence to Prediction

KNX AI bsed occupancy detection

Table of Contents

Introduction

Occupancy is one of the most important variables in building automation.

A room that is empty does not normally require the same level of heating, cooling, lighting or ventilation as a fully occupied room.

KNX systems have long provided reliable ways to detect presence using sensors such as:

  • Presence detectors
  • Motion detectors
  • Push buttons
  • Door contacts
  • Window contacts
  • CO₂ sensors
  • Room controllers

Traditional automation can answer a simple question:

Is someone in the room?

Artificial Intelligence introduces a more advanced possibility:

How many people are likely to be in the room, how long will they stay, and when is the room likely to be occupied next?

This distinction is important.

Presence detection describes what is happening now.

Occupancy prediction estimates what is likely to happen next.

When combined with KNX, AI can use occupancy information to optimize:

  • HVAC
  • Lighting
  • Shading
  • Ventilation
  • Energy consumption
  • Room utilization
  • Building operation

The goal is not to replace KNX presence detection.

It is to make occupancy information more useful.

KNX can detect the building’s current state. AI can help predict its next state.

What Is Occupancy Detection?

Occupancy detection is the process of determining whether a space is being used.

A KNX presence detector may provide a binary result:

Occupied = Yes

or:

Occupied = No

This can trigger simple automation.

For example:

IF
Presence = ON

THEN
Lighting = ON
HVAC = Comfort Mode

This is effective for many applications.

But binary occupancy information does not always provide enough information for advanced energy optimization.

A meeting room with one person and a meeting room with ten people are both simply:

Occupied = Yes

From an HVAC perspective, however, they may have very different requirements.

This is where more advanced occupancy estimation becomes useful.

Occupancy Detection vs Occupancy Prediction

These two concepts should not be confused.

Occupancy detection

Answers:

Is the room occupied now?

Occupancy estimation

Answers:

How many people may currently be in the room?

Occupancy prediction

Answers:

How likely is the room to be occupied in the future?

A sophisticated KNX + AI system can potentially use all three.

For example:

Current occupancy: 6 people

Predicted occupancy in 30 minutes: 10 people

Predicted occupancy at 18:00: 0 people

This information can support much more intelligent building control.

Why Occupancy Matters for Building Automation

Occupancy affects many building systems.

HVAC

More people generally means greater internal heat gains and potentially higher cooling requirements.

Lighting

Occupied rooms generally require lighting according to the task and available daylight.

Ventilation

Higher occupancy can increase the requirement for fresh air.

Shading

Occupancy and daylight conditions can influence blind and shading strategies.

Energy management

Unoccupied zones can often operate in energy-saving modes.

Space management

Occupancy information can reveal which rooms are heavily or lightly used.

This makes occupancy one of the most valuable inputs for intelligent building automation.

Traditional KNX Presence Detection

KNX presence detectors can provide several useful functions.

Depending on the device and project design, they may detect:

  • Movement
  • Presence
  • Brightness
  • Temperature
  • Occupancy-related conditions

A typical lighting sequence might be:

Presence detected
       ↓
Check brightness
       ↓
Lux below threshold?
       ↓
Yes
       ↓
Lights ON

A typical HVAC sequence might be:

Presence detected
       ↓
Room occupied
       ↓
Comfort mode

These deterministic sequences are reliable and easy to understand.

AI should build on this foundation rather than unnecessarily replacing it.

Why AI Is Useful for Occupancy

A presence sensor only observes the current environment.

AI can analyse historical behaviour.

For example, an office meeting room may show the following pattern:

Monday: High occupancy from 09:00–11:00

Tuesday: Medium occupancy

Wednesday: High occupancy

Thursday: High occupancy

Friday: Low occupancy

Over several weeks, AI can identify recurring patterns.

It can then estimate future occupancy probabilities.

For example:

Meeting Room 03 has an 82% probability of being occupied between 10:00 and 11:00 tomorrow.

That prediction can support pre-conditioning and other automation strategies.

How AI Estimates Occupancy

AI does not necessarily require a camera.

Occupancy can potentially be estimated using combinations of existing building data.

Useful inputs may include:

  • Presence detection
  • Motion detection
  • CO₂
  • Temperature
  • Humidity
  • Door activity
  • Window status
  • Lighting activity
  • HVAC behaviour
  • Room booking information
  • Historical occupancy
  • Time of day
  • Day of week

The model can identify relationships between these variables.

For example:

CO₂ increasing

Presence detector active

Door opened

Lighting ON

may strongly indicate increasing occupancy.

CO₂ as an Occupancy Indicator

CO₂ can be particularly useful in occupied spaces.

People exhale CO₂.

Therefore, CO₂ concentration can provide an indirect indication of occupancy.

Consider a meeting room:

CO₂: 450 ppm

Later:

CO₂: 750 ppm

Later:

CO₂: 1,050 ppm

The rising level may indicate increasing occupancy, assuming other relevant environmental factors are considered.

CO₂ should not automatically be treated as an exact people counter.

Ventilation, room volume, outdoor air conditions and airflow can all affect the measurement.

However, combined with other KNX data, it can become a valuable input for occupancy estimation.

Combining Multiple Sensors

One of the strongest advantages of AI is sensor fusion.

Instead of relying on one sensor, the system can combine multiple signals.

For example:

Presence
   +
CO₂
   +
Door Activity
   +
Temperature
   +
Lighting
   +
Historical Pattern
   ↓
AI Occupancy Estimate

This can be more robust than relying on a single data point.

For example, if a presence detector temporarily fails to detect movement, increasing CO₂ and recent door activity may still indicate that the room is occupied.

Occupancy Estimation Without Cameras

Privacy is an important consideration in building automation.

Camera-based systems can provide detailed occupancy information, but they can also create additional privacy and cybersecurity considerations.

Many applications do not require cameras.

A KNX + AI system can potentially estimate occupancy using non-visual data such as:

  • Presence
  • CO₂
  • Temperature
  • Door contacts
  • Lighting
  • HVAC behaviour
  • Historical patterns

This can provide useful intelligence while reducing the amount of personal information collected.

The appropriate solution depends on the building and the required accuracy.

AI-Based Occupancy Prediction

Once historical data is available, AI can move from detection to prediction.

For example, a commercial office may have the following historical pattern:

08:00–09:00: Low occupancy

09:00–10:00: Rapid increase

10:00–12:00: High occupancy

12:00–13:30: Decrease

13:30–16:30: High occupancy

17:00 onwards: Rapid decrease

AI can learn this pattern.

The next morning, it can forecast expected occupancy.

This can then influence other systems.

AI + KNX Predictive HVAC

This is one of the strongest applications.

Suppose a meeting room is currently empty.

The AI predicts:

Occupancy probability at 09:00 = 90%

The room temperature is:

27°C

Target temperature:

23°C

The HVAC system needs approximately 30 minutes to reach the target.

The system can therefore begin controlled pre-conditioning before occupants arrive.

At 08:55, the KNX presence detector confirms actual occupancy.

The HVAC system then continues normal operation.

If nobody arrives, the system can cancel or reduce the pre-conditioning.

This is a practical example of:

Prediction + real-time confirmation.

AI + KNX Lighting

Occupancy prediction can also influence lighting.

Traditional logic:

Presence detected → lights ON

AI-assisted logic can consider:

  • Occupancy probability
  • Daylight
  • Historical lighting behaviour
  • Time of day
  • Room type

For example, if a room has a high probability of being occupied but daylight is already sufficient, the lighting system may not need to activate at full output.

When actual presence is detected, KNX can continue to apply normal lighting logic.

AI + KNX Shading

Shading can also benefit from occupancy information.

Consider a meeting room with large west-facing windows.

AI predicts:

  • High occupancy at 14:00
  • Strong solar radiation
  • Increasing cooling demand

The system can coordinate:

Occupancy prediction

Weather prediction

Solar exposure

Shading strategy

Reduced solar heat gain

Lower HVAC demand

This demonstrates how occupancy becomes more powerful when combined with other building data.

AI + Ventilation

Ventilation requirements are closely related to occupancy.

A room with ten occupants generally has a different ventilation requirement from an empty room.

CO₂ can provide an indication of indoor air quality.

AI can combine:

  • CO₂
  • Occupancy
  • Room size
  • Ventilation status
  • Outdoor conditions
  • Historical behaviour

to identify expected ventilation demand.

The system can then support more efficient ventilation while maintaining appropriate indoor air quality.

Again, actual control should remain within the engineering and equipment limits defined for the building.

Occupancy Prediction for Meeting Rooms

Meeting rooms are particularly suitable for occupancy analytics because their utilization is often highly variable.

A room may be:

Reserved but empty

or:

Unreserved but occupied

Traditional building automation may only know whether somebody is physically present.

AI can combine historical data with other available information to estimate actual utilization.

This can help identify:

  • Frequently used rooms
  • Underused rooms
  • Peak meeting periods
  • Rooms frequently reserved but unused
  • Rooms requiring more HVAC capacity

This information can be valuable for both automation and facility planning.

Occupancy and Energy Optimization

Occupancy prediction becomes especially useful when connected to energy management.

Consider a building with 100 rooms.

If every room follows the same HVAC schedule, energy can be wasted in lightly used zones.

AI can identify different occupancy patterns.

For example:

Zone A: High occupancy

Zone B: Medium occupancy

Zone C: Rarely occupied

The energy-management system can apply different strategies.

The objective is not to switch everything OFF whenever occupancy is low.

It is to avoid unnecessary energy use while maintaining required comfort and readiness.

AI Occupancy Architecture for KNX

A practical architecture can look like this:

                 ┌─────────────────────────┐
                 │       AI ENGINE         │
                 │                         │
                 │ Occupancy Prediction    │
                 │ Pattern Recognition     │
                 │ Anomaly Detection       │
                 └────────────┬────────────┘
                              │
                         Prediction
                              │
                 ┌────────────▼────────────┐
                 │  Building Data Platform │
                 │                         │
                 │ Historical Data         │
                 │ Room Metadata            │
                 │ Analytics                │
                 └────────────┬────────────┘
                              │
                            KNX/IP
                              │
                 ┌────────────▼────────────┐
                 │       KNX SYSTEM        │
                 │                         │
                 │ Presence • CO₂          │
                 │ Temperature • Lighting  │
                 │ HVAC • Door Contacts    │
                 └────────────┬────────────┘
                              │
                  ┌───────────┼───────────┐
                  ▼           ▼           ▼
                 HVAC      Lighting     Shading

The AI layer predicts.

The KNX system observes and controls.

The data platform connects the two.

Real-Time Confirmation Is Essential

AI predictions should not automatically override real-time sensor information.

Suppose AI predicts:

Occupancy probability = 90%

But the room remains empty.

A real-time KNX presence detector can provide contradictory information.

The control system should respond to actual conditions.

A useful hierarchy is:

AI prediction

KNX real-time sensors

Control logic

Final action

This makes the system more robust.

What If AI Predicts Incorrectly?

AI predictions can be wrong.

For example:

The system predicts a meeting room will be occupied at 10:00.

The meeting is cancelled.

If the HVAC continues operating because of the prediction, energy is wasted.

Therefore, prediction should have:

  • Time limits
  • Confidence levels
  • Real-time confirmation
  • Automatic fallback
  • Energy constraints

For example:

High-confidence prediction

→ Allow limited pre-conditioning.

Low-confidence prediction

→ Wait for actual presence.

This is much safer than treating every prediction as fact.

Occupancy Confidence Levels

AI can assign a confidence score.

For example:

Room 01: 92%

Room 02: 76%

Room 03: 41%

Room 04: 18%

The building automation strategy can respond differently.

For example:

>85%

→ Prepare room.

60–85%

→ Limited pre-conditioning.

<60%

→ Wait for real-time confirmation.

These thresholds should be determined according to the building and application.

Occupancy Prediction and Privacy

Occupancy data can be sensitive.

Even without cameras, long-term occupancy information may reveal:

  • Working patterns
  • Room usage
  • Employee schedules
  • Building activity
  • Residential behaviour

Therefore, AI occupancy systems should consider:

  • Data minimization
  • Access control
  • Retention periods
  • Anonymization
  • Secure storage
  • Appropriate privacy policies

The system should collect only the data required for the intended use case.

Individual Tracking vs Space Occupancy

There is an important distinction.

Individual tracking

Attempts to determine:

Where is a specific person?

Space occupancy

Determines:

Is this room being used?

For many building-automation applications, individual tracking is unnecessary.

The objective is simply to understand room utilization.

This can significantly reduce privacy concerns.

For example:

Meeting Room 04 = 6 occupants

may be sufficient.

There may be no reason to know:

Which six people are present.

Residential Occupancy Prediction

AI occupancy prediction can also be useful in residential buildings.

Possible applications include:

  • HVAC
  • Lighting
  • Water heating
  • Shading
  • Energy management
  • Comfort scenes

For example, the system may learn that a home is normally occupied during:

06:30–08:30

and:

18:00–23:00

It can prepare the building accordingly.

However, residential occupancy data can be particularly sensitive.

Privacy and local processing should therefore receive careful consideration.

Commercial Building Occupancy Prediction

Commercial buildings provide even more opportunities because they contain:

  • Multiple rooms
  • Meeting spaces
  • Open offices
  • Shared areas
  • Different working schedules
  • Large HVAC systems

AI can identify building-wide patterns.

For example:

Floor 2: 75% average occupancy

Floor 3: 48%

Floor 4: 22%

This can support:

  • HVAC zoning
  • Lighting optimization
  • Space planning
  • Cleaning schedules
  • Energy management

Hotel Occupancy

Hotels present a different challenge because occupancy patterns change continuously.

AI can potentially use:

  • Room status
  • Check-in/check-out information
  • Presence
  • HVAC operation
  • Energy consumption
  • Historical patterns

A room can be:

Unoccupied

Reserved

Expected arrival

Occupied

Expected departure

The automation strategy can change accordingly.

For example, before a guest arrives, HVAC can prepare the room.

After departure, the room can move to an energy-saving mode.

Occupancy and Predictive Maintenance

Occupancy information can also improve equipment analytics.

Suppose an HVAC system operates for long periods.

If the building knows that occupancy was very low during that period, it can identify unusual operation.

For example:

Low occupancy

High HVAC runtime

may indicate:

  • Incorrect scheduling
  • Sensor problem
  • Control issue
  • Equipment fault

AI can detect the pattern.

AI-Based Space Utilization

Occupancy data can be useful beyond automation.

A facility manager may discover:

Meeting rooms are heavily used from 10:00–12:00

but:

Several rooms remain almost unused throughout the week.

This information can influence:

  • Space planning
  • Office design
  • Room allocation
  • HVAC zoning
  • Lighting design
  • Future construction decisions

The building automation system becomes a source of operational intelligence.

Occupancy Data Quality

AI occupancy models require reliable data.

Check:

  • Presence sensor coverage
  • Sensor positioning
  • Detection range
  • Sensor sensitivity
  • CO₂ sensor calibration
  • Door-contact reliability
  • Timestamp synchronization
  • Missing values
  • Incorrect Group Address mappings

A poorly positioned presence detector can produce poor occupancy data.

AI cannot magically correct every sensor problem.

KNX Sensor Placement Still Matters

Good sensor placement remains essential.

A presence detector should be positioned according to:

  • Room geometry
  • Detection range
  • Furniture
  • Ceiling height
  • Expected movement
  • Application requirements

If the sensor does not reliably detect occupants, the AI model receives poor information.

Therefore:

Good KNX design → Good occupancy data → Better AI predictions.

AI Does Not Mean Cameras Everywhere

A common misconception is that AI occupancy detection requires cameras.

It does not.

Depending on the application, useful occupancy information can be obtained from:

  • Presence sensors
  • CO₂ sensors
  • Door contacts
  • Environmental sensors
  • Lighting status
  • HVAC data
  • Historical behaviour

Camera-based systems may provide higher-resolution information in some applications, but they are not automatically necessary.

For many KNX applications, non-visual sensor fusion may be sufficient.

A Practical Office Example

Consider a 20-room office.

Each room has:

  • KNX presence detector
  • Temperature sensor
  • CO₂ sensor
  • Lighting control
  • HVAC control
  • Blind control

Historical data is collected for several months.

AI discovers:

Meeting Room 1: frequently occupied 09:00–10:30

Meeting Room 2: mostly occupied after 14:00

Meeting Room 3: rarely occupied

Meeting Room 4: high occupancy throughout the day

The system can then optimize each room differently.

Meeting Room 1

Pre-condition before 09:00.

Meeting Room 2

Avoid unnecessary morning HVAC operation.

Meeting Room 3

Maintain energy-saving mode until actual occupancy is detected.

Meeting Room 4

Maintain more consistent comfort during operating hours.

This is much more efficient than applying one schedule to all rooms.

Occupancy Prediction and HVAC Pre-Conditioning

Consider a room currently at:

28°C

AI predicts:

Occupancy probability at 09:00 = 95%

Historical thermal behaviour shows:

30 minutes required to reach 23°C

At 08:25, the system begins controlled cooling.

At 08:55:

Room temperature = 23.5°C

At 09:00:

Presence detected

The room is ready.

If occupancy is not detected, the system can reduce HVAC operation.

This provides a practical balance between comfort and energy.

Occupancy Prediction and Lighting

The same principle can be applied to lighting.

AI predicts:

High occupancy probability

but:

Daylight level = 700 lux

The system may not need to activate artificial lighting.

Later:

Daylight decreases

and:

Presence is detected

KNX can then adjust lighting according to the configured scene or target level.

This creates a more adaptive lighting strategy.

Occupancy Prediction and Energy Management

Occupancy can become an input into a broader energy optimization system.

For example:

Occupancy Prediction
        +
Weather Forecast
        +
Energy Price
        +
HVAC Demand
        +
Solar Forecast
        ↓
AI Energy Optimization
        ↓
KNX Control

This allows occupancy to influence the whole building rather than one isolated system.

Edge AI for Occupancy

Occupancy analytics can be performed locally.

A local architecture might be:

KNX Sensors
     ↓
Building Server
     ↓
Edge AI
     ↓
KNX Control

Advantages

  • Low latency
  • Local processing
  • Reduced cloud dependency
  • Better control of sensitive data

This can be particularly attractive where occupancy data is considered sensitive.

Cloud AI for Occupancy

A cloud architecture may be:

KNX
 ↓
Building Server
 ↓
Secure Connection
 ↓
Cloud AI
 ↓
Prediction
 ↓
Building Server
 ↓
KNX

Advantages

  • Centralized analytics
  • Large computing resources
  • Multi-building analysis
  • Easier model management

Considerations

  • Privacy
  • Connectivity
  • Cybersecurity
  • Latency
  • Cloud costs

The right choice depends on the project.

A Hybrid Architecture

A practical approach may use both.

For example:

Local KNX logic

handles immediate occupancy control.

Edge analytics

handles short-term predictions.

Cloud analytics

handles long-term building patterns.

This can provide a good balance between reliability, intelligence and centralized management.

How to Implement AI Occupancy Detection

A KNX integrator can introduce occupancy intelligence gradually.

Phase 1 — Review Sensors

Check:

  • Presence coverage
  • Sensor placement
  • CO₂ sensors
  • Door contacts

Phase 2 — Clean Data

Verify:

  • Group Addresses
  • Data types
  • Timestamps
  • Missing values
  • Sensor reliability

Phase 3 — Collect Historical Data

Store:

  • Presence
  • CO₂
  • Temperature
  • Lighting
  • HVAC
  • Door activity

Phase 4 — Analyse Patterns

Identify:

  • Occupancy schedules
  • Room utilization
  • Peak periods
  • Unusual behaviour

Phase 5 — Build Prediction

Estimate:

  • Occupancy probability
  • Expected duration
  • Expected room usage

Phase 6 — Integrate with Automation

Use predictions for:

  • HVAC
  • Lighting
  • Shading
  • Ventilation
  • Energy management

Phase 7 — Add Feedback

Compare:

Predicted occupancy

with:

Actual occupancy

and improve the model.

Measuring Occupancy AI Performance

A project should measure more than prediction accuracy.

Useful KPIs include:

Occupancy prediction

  • Prediction accuracy
  • False positives
  • False negatives
  • Confidence levels

HVAC

  • Energy consumption
  • Pre-conditioning energy
  • Comfort performance

Lighting

  • Lighting runtime
  • Lighting energy

Space utilization

  • Room utilization
  • Occupancy patterns
  • Underused spaces

User experience

  • Comfort complaints
  • Room readiness
  • System responsiveness

The goal is not simply to create a highly accurate AI model.

The goal is to create a better-performing building.

Common Mistakes

Mistake 1 — Treating Presence and Occupancy as the Same Thing

A presence detector does not necessarily provide an accurate people count.

Mistake 2 — Relying on AI Alone

Real-time KNX sensors should remain part of the control loop.

Mistake 3 — Ignoring CO₂

Environmental data can provide valuable occupancy information.

Mistake 4 — Ignoring Privacy

Occupancy data can reveal sensitive behavioural patterns.

Mistake 5 — Poor Sensor Placement

Bad field data leads to bad predictions.

Mistake 6 — Using One Model for Every Room

Different rooms can have very different occupancy patterns.

Mistake 7 — Pre-Conditioning Every Predicted Room

Predictions have uncertainty.

Use confidence levels and real-time confirmation.

Mistake 8 — Measuring Only Energy Savings

Comfort and building usability must also be considered.

The Future of KNX Occupancy Intelligence

The evolution of occupancy intelligence can be viewed as:

Motion Detection

Presence Detection

Occupancy Estimation

Occupancy Prediction

Adaptive Building Control

The building gradually moves from reacting to movement toward understanding how spaces are actually used.

A future smart building may continuously understand:

  • Which spaces are occupied
  • How occupancy is changing
  • Which rooms are likely to be used next
  • How many people are expected
  • How occupancy affects HVAC
  • How occupancy affects lighting
  • How occupancy affects energy demand

The objective is not surveillance.

The objective is better building operation using the minimum necessary information.

Conclusion

Occupancy is one of the most powerful inputs available to an intelligent building.

KNX already provides reliable presence detection and the ability to connect occupancy-related information with HVAC, lighting, shading and energy systems.

AI can extend this capability by analysing historical data and predicting future room usage.

The resulting architecture can move from:

Detect → React

to:

Detect → Understand → Predict → Optimize → Confirm → Control

The most effective approach is not to replace KNX presence detection with AI.

Instead:

KNX sensors provide real-time truth.

Historical data provides context.

AI provides prediction.

KNX automation provides reliable control.

This combination can enable:

  • Smarter HVAC pre-conditioning
  • More adaptive lighting
  • Better ventilation
  • Reduced energy consumption
  • Improved room utilization
  • More intelligent shading
  • Better facility management

For KNX integrators, occupancy intelligence is an important step toward truly adaptive buildings.

The smart building of the future will not only know where people are. It will understand how spaces are used and anticipate what those spaces will need next.

Scroll to Top