1

I have implemented a google actions backend that successfully communicates with Google Home/Assistant to open/close my garage door.

The SYNC replies with one device:

{
  "requestId": "XXX",
  "payload": {
    "agentUserId": "XXX",
    "devices": [
      {
        "id": "XXXX",
        "type": "action.devices.types.GARAGE",
        "traits": [
          "action.devices.traits.OpenClose"
        ],
        "name": {
          "name": "Garage XXXX"
        },
        "willReportState": false,
        "roomHint": "garage",
        "attributes": {
          "discreteOnlyOpenClose": true,
          "commandOnlyOpenClose": false,
          "openDirection": [
            "UP",
            "DOWN"
          ]
        },
        "deviceInfo": {
          "manufacturer": "XXX"
        }
      }
    ]
  }
}

When I open the app, I receive a QUERY:

{
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "XXX"
          }
        ]
      }
    }
  ],
  "requestId": "XXX"
}

to which I reply:

{
  "requestId": "XXX",
  "payload": {
    "agentUserId": "XXX",
    "devices": {
      "XXX": {
        "online": true,
        "status": "SUCCESS",
        "openPercent": 0
      }
    }
  }
}

I think I did right by answering that my device is a garage door, and I report that it's currently closed. However the app does not show a button to trigger an open/close action.

How can I have the app show a button like a light switch? Currently when I click on the device in the app, it just displays information (like the vendor, device name, etc) but no button and no actionable thing.

It does work though when I speak "open the garage", and the garage door opens successfully when I process the EXECUTE.

Benoit Duffez
  • 11,839
  • 12
  • 77
  • 125
  • hi perhaps these samples might be of interest https://developers.google.com/assistant/smarthome/samples#end-to-end – jspcal Aug 26 '22 at 23:24
  • The only difference I could see is `willReportState`, but even after a change to `true`, the app still has no touch control over the garage door. I just wish the app would display the current state (open/closed) and a button to trigger either operation (no talk). I also have tiles on my notifications drawer that I find convenient, and I wish I could add the garage door to it. I just can't find the doc or code sample that explains the relationship between the JSON I send back to google and the behavior of the Google Home app. – Benoit Duffez Aug 27 '22 at 16:00
  • Not all device types and traits support the UI control. You can find the list of supported device types and traits on the google smart home documentation: https://developers.google.com/assistant/smarthome/develop/touch-controls#supported_device_types_2 – Sonali D Bhavsar Oct 19 '22 at 05:33
  • @SonaliDBhavsar: thanks, that should be the answer to my question. It looks like it's a design choice: garage doors will not have a button on the UI. That seems like a dumb design decision, in my opinion. – Benoit Duffez Oct 25 '22 at 18:01

1 Answers1

1

Not all device types and traits support the UI control at the moment. You can find the list of supported device types and traits on the google smart home documentation: developers.google.com/assistant/smarthome/develop/… .

I would also recommend opening up a feature request on the public issue tracker in this regard so that we can place it on our future development roadmap for feature enhancements.