-
Notifications
You must be signed in to change notification settings - Fork 1k
Adds example for sending a command to a device #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 'device' => self::$devices[0], | ||
| 'config' => $config, | ||
| ]); | ||
| $this->assertContains('not subscribed to the commands topic', $output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test does not appear to test a success case, as a success case would contain Command sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to test the success case, we would need a PHP device sample :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be a way for us to use HTTP to "connect" a device to the commands topic but I have only done it in MQTT device samples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would require a PHP device sample to confirm the command data on the device side, but it shouldn't require a PHP device to just send the data...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The device needs to be subscribed to the commands topic over MQTT in order to not receive the error message.
|
If a device is not connected via MQTT, send command to device will fail. |
|
Thanks for your review! |
No description provided.