PythonScriptsPro icon indicating copy to clipboard operation
PythonScriptsPro copied to clipboard

How can I use parameteres?

Open Marmoulak opened this issue 1 year ago • 0 comments

Hi I exec a paython file from Call service node from Node-red and added this code:

{
    "file": "/config/python_scripts/unifi/unifi_led.py",
    "state": "on"
}

it call and execute unifi_led.py but without parameters and when I exec the file from cmd prompt with parameters it works without problem. I have tried to call the service with fowling code but did not help: `service: python_script.exec data: file: { "file": "/config/python_scripts/unifi/unifi_led.py", "state": "on"

}` what do I do wrong?

cmd: python unifi_led.py -state on

image

Marmoulak avatar Jul 15 '24 19:07 Marmoulak