actions-on-googlegoogle-smart-homegoogle-assistant

How to execute TestNetworkSpeed command for NetworkControl device trait using Google Actions?


I want to execute the TestNetworkSpeed command which is a part of NetworkControl device trait. Example in the documentation is the following:

Examples
What's the Wi-Fi speed?

For action.devices.SYNC intent we return the following mocked output:

{
      agentUserId: 'userId',
      devices: [
        {
          id: 'deviceId',
          type: 'action.devices.types.NETWORK',
          willReportState: true,
          notificationSupportedByAgent: true,
          name: {
            name: 'ssid',
            defaultNames: ['ssid'],
            nicknames: ['ssid'],
          },
          traits: ['action.devices.traits.NetworkControl'],
          attributes: {
            supportsNetworkDownloadSpeedTest: true,
            supportsNetworkUploadSpeedTest: true,
            supportsEnablingNetworkProfile: true,
            supportsDisablingNetworkProfile: true,
            networkProfiles: ['kids'],
          },
        },
      ],
 }

When I execute the utterance from above example Google Assistant does not make a request to my server. It returns generic google results output.

When I execute utterance to turn off / on the internet for profile it works correctly.

We have enabled HomeGraph.

Here are additional screenshots to showcase what is happening.

When I ask GA what is my ssid it returns the correct ssid. enter image description here

When I ask GA to turn off the internet for device it works correctly. enter image description here

When I ask GA what is wifi speed of ssid it returns the SSID name and we receive query command on our api endpoint. enter image description here

I changed the name of ssid to "home wifi" and reran the command. I receive the following default output (it does not hit our endpoint). enter image description here

When I execute just what's the wifi speed without ssid name I also receive default output. enter image description here


Solution

  • TestNetworkSpeed currently requires features that are not available on Google Home App / Assistant on mobile surfaces, and only supported on a Google Home device. The team is working to enable more surfaces across all available traits.

    You can issue “What’s my Wi-Fi Speed” voice utterance on a Google Home device and see if that’s working instead. If you are having issues, you can open up a request on the Public Issue Tracker.