I want to pass a value (temperature) from within a rule to a shell command. I use this commandline to execute the command and to send the value to command.
execute.command( "Uterum-Airconditioner-StatusAirTempToRegistry", TempUterum );
Also tried to use just a fixed number as valut to be sure there nothing tricky about the variable.
execute.command( "Uterum-Airconditioner-StatusAirTempToRegistry", 25);
The command is configured like this:
Name: Uterum-Airconditioner-StatusAirTempToRegistry
Protocol: Shell execution protocol
Path: c:\windows\system32\cscript.exe
Command parameter: C:\OpenRemote\SetTempValueToRegistry.vbs ${param}
Nothing in the other fields.
Command is running but the value from the rules engine is not passed as parameter to the shell script.
Any ideas?
I don't recall putting anything in the command parameter field.
Have you tried putting everything you need in the path field, just as you would type it at a command prompt?
Path: c:\windows\system32\cscript.exe c:\OpenRemote\SetTempValueToRegistry.vbs ${param}
Assuming that cscript.exe is the program you're calling, with a .vbs file and your new value?