[Solved] Difficulties with Curl in a script
Posted: Saturday 24 October 2020 15:13
Hello,
I try to send a curl message to change a parameter to a device Xiaomi via a Conbee 2.
I've found the correct command :
I know it's ok because I tested it on a command line directly on my Pi
So I tired to integrate it in a script :
And then, no effect and I've got an error in my logs :
Anyone can help me ? I'm stuck on this without any idea where to look at.
Thanks
I try to send a curl message to change a parameter to a device Xiaomi via a Conbee 2.
I've found the correct command :
Code: Select all
curl -H 'Content-Type: application/json' -X PUT -d '{"duration": 500}' http://192.168.1.1:80/api/A********/sensors/20/config
So I tired to integrate it in a script :
Code: Select all
os.execute('curl -H \'Content-Type: application/json\' -X PUT -d \'{"duration": 500}\' http://192.168.1.1:80/api/A********/sensors/20/config ')
Code: Select all
Error: (CONBEE II) This device don't support action
Thanks