Scene models

The Scene models allow storing the model state of the entire mesh network as a scene, which can be recalled at a later time. The Scene models are most commonly used to implement presets for different times and activities. Scenes typically show up in the end user application as user presets, like “Dinner lights”, “Night time” or “Movie night”.

The Scene models also feature their own common types, listed below. For types common to all models, see Bluetooth mesh models.

Common types

This section lists the types common to the Scene mesh models.

Header file: include/bluetooth/mesh/scene.h
group bt_mesh_scene

Common API for the Scene models.

Defines

BT_MESH_SCENE_NONE

No scene is active

Enums

enum bt_mesh_scene_status

Scene status codes

Values:

enumerator BT_MESH_SCENE_SUCCESS

Operation successful

enumerator BT_MESH_SCENE_REGISTER_FULL

Not enough room in the Server’s scene register.

enumerator BT_MESH_SCENE_NOT_FOUND

Couldn’t find the requested scene

struct bt_mesh_scene_state
#include <scene.h>

Scene state

Public Members

enum bt_mesh_scene_status status

Status of the previous operation.

uint16_t current

Current scene, or BT_MESH_SCENE_NONE if no scene is active.

uint16_t target

Target scene, or BT_MESH_SCENE_NONE if no transition is in progress.

uint32_t remaining_time

Remaining time of the scene transition in milliseconds.