'Is it possible to intercept commands to a device in Google IOT?
Can someone verify for me what I believe I've discovered about Google IOT?
iotClient.sendCommandToDevice(...) goes straight to the MQTT broker, and does not seem to involve itself with PubSub. PubSub Subscriptions seem to only work with telemetry from the device and subtopics thereof. We would like to have some process (perhaps a firebase function triggered on the topic) see all commands going to all devices, and have not been able to do this.
Connecting to the MQTT broker directly requires a public/private keypair associated with a single device ID, and one apparently cannot subscribe to messages to other devices (for example, one cannot subscribe to "/devices/+/commands/#" or just "#".
We could certainly create a function that duplicated the data, sending it to the device and to a PubSub topic, but we'd much rather have something that more reliably connected to all commands going to devices without requiring that they go through our function.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
