Skip to content

Conversation

@gguuss
Copy link
Contributor

@gguuss gguuss commented Nov 27, 2018

No description provided.

'device' => self::$devices[0],
'config' => $config,
]);
$this->assertContains('not subscribed to the commands topic', $output);
Copy link
Contributor

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.

Copy link
Contributor Author

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 :-/

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor Author

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.

@gguuss
Copy link
Contributor Author

gguuss commented Nov 27, 2018

If a device is not connected via MQTT, send command to device will fail.

@gguuss
Copy link
Contributor Author

gguuss commented Nov 29, 2018

Thanks for your review!

@gguuss gguuss merged commit 7cf5946 into master Nov 29, 2018
@gguuss gguuss deleted the iot-commands branch November 29, 2018 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants