Smart speaker
Tips
- Smart speaker integration is a separately paid module.
- Cloud-to-cloud smart speaker integration currently supports most Xiaodu platform capabilities.
1. Preparation
1.1 Apply for a Baidu account
After applying for a Baidu account, log in to the DuerOS Open Platform at https://dueros.baidu.com/open and complete developer verification. Company verification is required before applying for a skill.

1.2 Create a skill
After verification succeeds, create a skill.

Tips
The skill requires the server address to use HTTPS. For local debugging, start the backend locally and expose it through an HTTPS intranet tunneling address. Then change the server address below to the tunnel address and set breakpoints in the related backend API. For production launch, the server address must also be HTTPS.

1.3 Configure speaker settings
Open System Management -> Cloud-to-cloud Integration -> Speaker Configuration.

2. Speaker integration
Integration points:
- Associate a FastBee product with a Xiaodu device type so Xiaodu can identify the device category.
- Map product thing model properties to Xiaodu-defined properties. One thing model maps to one Xiaodu property. The returned property value is associated with the thing model value.
- Map product thing model services to Xiaodu-defined actions. One thing model can correspond to multiple actions. These actions are mainly used for voice recognition and control of the associated thing model.
Warning
Pay attention to the following rules when associating Xiaodu properties.
- By default, the Xiaodu property value is directly associated with the
valueof the thing model. The thing modelvalueis returned as the Xiaodu property value. - The thing model unit should be the same as the Xiaodu property unit, or left empty. FastBee prioritizes the unit configured in the thing model. If it differs from the Xiaodu property unit, an error may occur. If no unit is configured, the Xiaodu default property unit is used.
- Some Xiaodu property return values are enums or objects. Their return format is officially defined by Xiaodu, so you must map Xiaodu property values to thing model values. Currently, enum value mapping and thing model ID mapping for object-type models are supported.
// Enum value mapping example:
// Xiaodu switch property turnOnState has values "ON" and "OFF".
// The associated FastBee thing model switch has values "1" and "0".
// Configure value mapping:
{"ON": "1", "OFF": "0"}
// Object mapping example:
// Xiaodu color property color contains three sub-properties:
// "hue", "saturation", and "brightness".
// It must be associated with an object-type thing model that also contains
// three child models: "object_hue", "object_saturation", and "object_brightness".
// Configure sub-property ID mapping:
{"hue": "object_hue", "saturation": "object_saturation", "brightness": "object_brightness"}
// Then each sub-property value is associated with the corresponding child thing model value
// and returned to Xiaodu.3. Usage guide
- After obtaining the code, read
README.mdunder thefastbee-speaker/directory first. Before configuration, also read the Xiaodu integration document underfastbee-speaker/file/. - Open the main page from Cloud-to-cloud Integration -> Xiaodu Speaker. Click Add, select the product to associate, then click Associate. The system imports the thing models under the product first.
- On the associated product detail page:
- Click Refresh after adding new thing models to the product. If a thing model has been modified, delete the existing associated thing model first, then click refresh to associate it again.
- Click the associated thing model edit button to open the configuration page. Select the associated property according to the Excel document. Some actions are matched automatically and cannot be modified after matching. For properties whose return value must be mapped to thing model values, configure the mapping based on the Xiaodu property values and the FastBee thing model values.
- After configuration is complete, follow the voice commands in the Xiaodu integration document to control devices by voice.
4. Future updates
Planned improvements:
- Implement additional complex actions.
- Report alarm module thing model values to Xiaodu speaker.
