question

ihxn avatar image
ihxn asked

What a sweeping robot should implement interface?

I want to control my sweeping robot using alexa smart home skill, i need to control the power of robot, so i implement the Alexa.PowerController interface。 But i need to send some customise directive to my robot,for example: 1. alexa, start tony recharge 2. alexa, pause tony recharge, tony is my device name, i can't find a interface that is suitable for me。 Can you give me some example code, if smart home skill is support this?

smart home
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Gaetano@Amazon avatar image
Gaetano@Amazon answered

Hello and thanks for posting.

According to your scenario, I would suggest using the ModeController.

With that interface you could model properties of a device that can be set to one of a list of values, like "recharge", and "pause" modes.

Check it out here:
https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-modecontroller.html

Regards,
Gaetano

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

the doc is not clear for that how to set for the customize mode, and after set this, how to say a word to set the customize mode command,for my this situation, can this work?

```

{

"namespace": "Alexa.ModeController",

"name": "mode",

"instance": "Vacuum.ChargingState",

"properties": {

"supported": [{"name": "mode"}],

"retrievable": True,

"proactivelyReported": True,

},

"configuration": {

"ordered": False,

"supportedModes": [

{"value": "ChargingState.StartCharging", "modeResources": {}},

{"value": "ChargingState.StopCharging", "modeResources": {}},

],

},

},

```

? and how can i say something to alexa to trigger my mode?


0 Likes 0 ·