Page 1 of 1

"Start Script" will add # when passing an argument?

Posted: Tuesday 27 February 2018 19:16
by htilly
Hi!

Is this expected result, and if so, how do I change it =)

When this block is triggered I want the script "/opt/twython/image_twitter.sh" to be triggered with the argument "Someone is moving ouside!".
If I run the script from the linux prompt everything works as expected. I.e.:
/opt/twython/image_twitter.sh "Något rör sig utanför entrén!"

But when triggered from "Start Script" the space seems to be replaced by an #.
In the log it says:

2018-02-27 17:48:40.452 Executing script: /opt/twython/image_twitter.sh#"Något rör sig utanför entrén!"
2018-02-27 17:48:40.465 Error: Error executing script command (/opt/twython/image_twitter.sh#"Något rör sig utanför entrén!"). returned: 32512

How can I get the "Start Script" to NOT have a # between the script and the variable?!
blockly.PNG
blockly.PNG (74.78 KiB) Viewed 2056 times
/Tilly

Re: "Start Script" will add # when passing an argument?

Posted: Tuesday 27 February 2018 19:55
by Domosapiens
Try %20 instead of the space?

Re: "Start Script" will add # when passing an argument?

Posted: Tuesday 27 February 2018 20:20
by htilly
Well, to summarise my problem.
Domoticz seems to be adding a # tail to the script :/
Seems to be the same problem in this thread:
http://www.domoticz.com/forum/viewtopic ... 33#p172933

Running latest beta on Raspberry.
Domosapiens wrote: Tuesday 27 February 2018 19:55 Try %20 instead of the space?

Re: "Start Script" will add # when passing an argument?

Posted: Wednesday 28 February 2018 20:10
by Xztraz
i do like this to pass arguments. uncomment the # to see whats passed to script
i'm passing the string "ka 1 1" and an ip. use "\ " (a slash and a space to pass a blank) skipp the "" marks
blocklystartscrip.PNG
blocklystartscrip.PNG (8.68 KiB) Viewed 2017 times
to a .sh script accepting 2 parameters. first is text and second ip
pi ~/domoticz/scripts $ cat Serial_to_wifi.sh
#!/bin/sh
#echo $1
#echo $2
echo -n "$1\r" | netcat $2 23

Re: "Start Script" will add # when passing an argument?

Posted: Sunday 06 May 2018 18:10
by dnlauto
Did you ever get this resolved? I have the same issue. Adding "1/" as a parameter does not help for me.