I'm finding it oddly difficult to find a straightforward example, of how best to handle controlling an IoT device over MQTT.
Best I've found so far in official AWS docs, is
https://docs.aws.amazon.com/wellarchitected/latest/iot-lens/device-commands.html
but that one goes off and basically says (use Device Shadow).
I'd prefer to do it myself directly over MQTT.
.. If I can find code to point the way for me?
FYI, I'm using Python.
I did also find
https://iotatlas.net/en/implementations/aws/command/command1/
It mentions (you probably want to use a transaction ID), but then doesnt show how that would be handled in the code :(
Edit: I dont just need to "send" the command. I need to have the status of the command properly handled, in a robust manner.
I dont need help merely "connecting to AWS MQTT". Or just "publishing a message". There's enough examples of that. As I said in my post, I need code specific to handling command and control of an IoT device, using pure MQTT. That means:
sending multiple commands over time to topic cmd/devicename/some-command-topic
receiving updates back as to the success or failure of each command running on the device.
The AWS docs recommend using a transaction id. but I cant find a single example of working code that does this. I dont see anything specific to that in the references you gave.