cancel
Showing results for 
Search instead for 
Did you mean: 

The action.devices.commmands.Dispense command message contains an item, but lacks the amount and uni

papifeed
Community Member

Send sync when binding the account

request:
{"inputs":[{"intent":"action.devices.SYNC"}],"requestId":"7914071270690354375"}
reponse:
{"payload":{"devices":[{"traits":["action.devices.traits.Dispense"],"willReportState":true,"name":{"name":"catFeed","defaultNames":["catFeed"],"nicknames":["catFeed"]},"attributes":{"supportedDispenseItems":[{"supported_units":["PORTION"],"default_portion":{"amount":1,"unit":"PORTION"},"item_name":"dispenseFood","item_name_synonyms":[{"synonyms":["Food","Dog Food","Cat Food","Pet Food","Dispense Food"],"lang":"en"},{"synonyms":[],"lang":"es-ES"}]}]},"id":"1878703371267178563","type":"action.devices.types.PETFEEDER","deviceInfo":{"model":"v1","swVersion":"2.2.0","hwVersion":"1.1.0","manufacturer":"Chuangzhile"}}],"agentUserId":"1925798617809944576"},"requestId":"7914071270690354375"}

 ok google, Dispense Food

request:
{"inputs":[{"context":{"locale_country":"US","locale_language":"en"},"intent":"action.devices.EXECUTE","payload":{"commands":[{"devices":[{"id":"1878703371267178563"}],"execution":[{"command":"action.devices.commands.Dispense","params":{"amount":1,"item":"dispenseFood","unit":"PORTION"}}]}]}}],"requestId":"********"}
response:
{"payload":{"commands":[{"ids":["1878703371267178563"],"states":{"dispenseItems":[{"isCurrentlyDispensing":false,"itemName":"dispenseFood","amountRemaining":{"amount":12,"unit":"PORTION"}}],"online":true},"status":"SUCCESS"}]},"requestId":"*********"}

 

ok google , give me 3 portion cat food

request:
{"inputs":[{"context":{"locale_country":"US","locale_language":"en"},"intent":"action.devices.EXECUTE","payload":{"commands":[{"devices":[{"id":"1878703371267178563"}],"execution":[{"command":"action.devices.commands.Dispense","params":{"item":"dispenseFood"}}]}]}}],"requestId":"12454096141137652067"}
response:
{"payload":{"commands":[{"ids":["1878703371267178563"],"states":{"dispenseItems":[{"isCurrentlyDispensing":false,"itemName":"dispenseFood","amountRemaining":{"amount":12,"unit":"PORTION"}}]"online":true},"status":"SUCCESS"}]},"requestId":"12454096141137652067"}

Problem:

I did not receive the amount and unit for the control issued through the ok Google, give me 3 portions cat food command, which caused me to be unable to control it

ok google , give me 3 portion cat food

I expect to receive the following message :

{
   "command": "action.devices.commands.Dispense",
   "params": {
        "amount": 3,
        "unit": "PORTION",
        "item": "dispenseFood"
}
}

 

 

1 Recommended Answer

Suc1
Solutions Expert
Solutions Expert

Thanks for sharing the detailed breakdown!

It looks like the command is being recognized, but the amount and unit fields are not being parsed correctly in the dispenseItems state. This might be due to the way the NLU (natural language understanding) interprets the voice input.

To help troubleshoot further:

  • Can you confirm if you've defined the supported units and amounts in your SYNC and EXECUTE traits?

  • Does the same behavior occur with other variations like "dispense 3 units of cat food" or "give 3 cat food portions"?

  • Could you share the DISPENSE trait configuration from your device metadata?

You can also file a bug report on the

 so the team can review it directly.

View Recommended Answer in original post

1 REPLY 1

Suc1
Solutions Expert
Solutions Expert

Thanks for sharing the detailed breakdown!

It looks like the command is being recognized, but the amount and unit fields are not being parsed correctly in the dispenseItems state. This might be due to the way the NLU (natural language understanding) interprets the voice input.

To help troubleshoot further:

  • Can you confirm if you've defined the supported units and amounts in your SYNC and EXECUTE traits?

  • Does the same behavior occur with other variations like "dispense 3 units of cat food" or "give 3 cat food portions"?

  • Could you share the DISPENSE trait configuration from your device metadata?

You can also file a bug report on the

 so the team can review it directly.