When subscribing you don’t specify the tenant or the device-Id.
To subscribe to standard messages, just subscribe to the topic s/ds as explained here.
Important is the MQTT client ID you are setting (in your case “yourclientid”). This needs to match the c8y_Serial “Identity” of the actual device in Cumulocity.
Then still the operation will stay in pending state, as you need to publish an MQTT message to tell the Cumulocity platform that you are working on it (hence set it to executing state.
In your case the MQTT message would be 501,c8y_Command. Setting the operation to successful uses the template 503, see this example:
Though in that case, then your child connector (python script) should not be trying to connect to Cumulocity, but rather the local MQTT broker. Thin-edge.io takes care of the cloud connection (with the help of the mosquitto broker).
This new repository might be able to give you a few pointers
It provides a containerized thin-edge setup. It also has two containers which act as child devices where they run a python script which connects to local MQTT broker used by thin-edge.io. The child-device folder might be of some help regarding creating a python connector.
You should not need to start the script manually. Once you’ve done the four steps described in Getting Started section a Device and two child-devices should appear in your tenant. Now you can:
Go to Device Management > Management > Firmware Repository and create a new Entry
Go to your Device > Child Devices > Select one of both > Firmware. From there you can install your Firmware uploaded in the previous step.
You will then see the Operation transitioning from Pending to Executing to Successful. Also, two Events will be shown in the Devices “Events” Tab. I’ve just tested it and worked fine for me.
If you want to change what’s done with the downloaded Firmware File within the container, here seems a good place to look at.