The sendCommandToDevice endpoint seems to be unavailable. I tried sending the command directly from the cloud console on the device page. The notification at the bottom left said, Command sent to device, but the inspector on chrome showed a 503 error. Time of error: 17:46:02 UTC Saturday, 27 October 2018
Request:
Request URL: https://cloudiot.clients6.google.com/v1/projects/<project-id>/locations/<location-name>/registries/<registry-name>/devices/<device-name>/:sendCommandToDevice?key=<removed>
Request Method: POST
Status Code: 503
Remote Address: 216.58.196.74:443
Referrer Policy: no-referrer-when-downgrade
Payload: {binaryData: "eyJ0ZXN0IjoxfQ==", subfolder: ""}
Response:
{
"error": {
"code": 503,
"message": "The service is currently unavailable.",
"status": "UNAVAILABLE"
}
}
Also, an additional note, sendCommandToDevice is not available in the nodejs client library (34.0.0). I had to do API discovery to have the method available.