Page 1 of 1

Tempvalue from Python to Code_Device_sensorMultilevel

Posted: 06 Aug 2022 01:41
by elmaco
Hello, what would be the best way to send a tempvalue to Code_Device in Python?

I dont get it to work....
I tried to use this:
http://192.168.1.108:8083/JS/Run/contro ... level',50)
with this:
os.system(curl... but i end up with errors i cant solve, please help.

(ofcourse i did add IP and add user:password:

os.system('curl -s -LN --globoff http://user:password@127.0.0.1:8083/JS/ ... level',50)')

Thanks in advance/
Marcus

Re: Tempvalue from Python to Code_Device_sensorMultilevel

Posted: 08 Aug 2022 07:28
by seattleneil
Your use of the single quote (') is not correct.

Try:
os.system("curl -s -LN --globoff http:// 192.168.1.108:8083/JS/Run/controller.devices.get('Code_Device_sensorMultilevel_38').set('metrics:level',50)")