I tried the following code
#!/usr/bin/python
import ibmiotf.device
from time import sleep
options = {
"org": "uguhsp",
"type": "iotsample-raspberry",
"id": "00aabbccde03",
"auth-method": "token",
"auth-token": "MASKED"
}
def myCommandCallback(cmd):
print('inside command callback')
print cmd
def main():
client = ibmiotf.device.Client(options)
client.connect()
client.commandCallback = myCommandCallback
while True:
sleep(1)
if __name__ == "__main__":
main()
which is essentially similar code as yours.
And I am able to publish the commands to reach the device.
Can you please confirm if only 1 device (or simulated device) is using the device credentials and that the credentials are not being shared by multiple devices (either physical device or simulated device)?