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

Moderator: leecollings

Post Reply
htilly
Posts: 14
Joined: Saturday 09 January 2016 22:05
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Stockholm
Contact:

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

Post 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 2054 times
/Tilly
User avatar
Domosapiens
Posts: 232
Joined: Wednesday 20 August 2014 12:08
Target OS: Windows
Domoticz version: V3.5981
Location: NL
Contact:

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

Post by Domosapiens »

Try %20 instead of the space?
Win Vista&7; 1#Aeon Z-Stick S2; 1#Aeotec Z-Sick Gen5, 6#Fib.FGBS001; 24#DS18B20; 8#Everspr.AN158-2; 3#Philio PAN04; 1#Philio PAN06, 1#YouLess El; 1#Fib.FGWPE; 1#ZME_RC2; 2#FAK_ZWS230, 2#Quib.ZMNHCDx, 1#Quib.ZMNHDD1, 7#EM6555
htilly
Posts: 14
Joined: Saturday 09 January 2016 22:05
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Stockholm
Contact:

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

Post 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?
Xztraz
Posts: 107
Joined: Tuesday 31 January 2017 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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 2015 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
dnlauto
Posts: 4
Joined: Saturday 05 May 2018 23:27
Target OS: Linux
Domoticz version:
Contact:

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

Post by dnlauto »

Did you ever get this resolved? I have the same issue. Adding "1/" as a parameter does not help for me.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest