{"action":"opened","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/3971","repository_url":"https://api.github.com/repos/openhab/openhab","labels_url":"https://api.github.com/repos/openhab/openhab/issues/3971/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/3971/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/3971/events","html_url":"https://github.com/openhab/openhab/issues/3971","id":131342669,"number":3971,"title":"[Bug] EXEC Transformation Service","user":{"login":"shawly","id":6448794,"avatar_url":"https://avatars.githubusercontent.com/u/6448794?v=3","gravatar_id":"","url":"https://api.github.com/users/shawly","html_url":"https://github.com/shawly","followers_url":"https://api.github.com/users/shawly/followers","following_url":"https://api.github.com/users/shawly/following{/other_user}","gists_url":"https://api.github.com/users/shawly/gists{/gist_id}","starred_url":"https://api.github.com/users/shawly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawly/subscriptions","organizations_url":"https://api.github.com/users/shawly/orgs","repos_url":"https://api.github.com/users/shawly/repos","events_url":"https://api.github.com/users/shawly/events{/privacy}","received_events_url":"https://api.github.com/users/shawly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-04T13:15:01Z","updated_at":"2016-02-04T13:15:01Z","closed_at":null,"body":"# Problem\r\n## My Items\r\nI've set up a local udp listener on port 49880, so I can see what gets passed through from my script.\r\nThese are my two test items:\r\n```\r\nroot@Server:~# cat /etc/openhab/configurations/items/default.items\r\n...\r\nSwitch Socket_GA_Living_TV_Test \"Test TV\" { udp=\">[ON:127.0.0.1:49880:EXEC(elro433 10110 11000 on )], >[OFF:127.0.0.1:49880:EXEC(elro433 10110 11000 off )]\" }\r\nSwitch Socket_GA_Living_AVR_Test \"Test AVR\" { udp=\">[ON:127.0.0.1:49880:'EXEC(elro433 10110 01100 on )'], >[OFF:127.0.0.1:49880:'EXEC(elro433 10110 01100 off )']\" }\r\n...\r\n```\r\n## UDP can't use wildcards for commands\r\nOne actual issue is, I can't use `udp=\">[*:127.0.0.1:49880:'EXEC(elro433 10110 01100 %s)']` because it throws an exception:\r\n```\r\n2016-02-04 13:45:11.127 [INFO ] [c.internal.ModelRepositoryImpl] - Refreshing model 'default.items'\r\n2016-02-04 13:45:11.138 [ERROR] [i.internal.GenericItemProvider] - Binding configuration of type 'udp' of item ‘Socket_GA_Living_TV_Test‘ could not be parsed correctly.\r\norg.openhab.model.item.binding.BindingConfigParseException: couldn't create Command from '*'\r\n```\r\nWith the EXEC binding this works fine. `exec=\">[*:tx433 elro 10110 10000 %2$s 192.168.0.15 49880]\"` (Note: tx433 is my current workaround script which uses netcat)\r\nI don't find it very satisfying to have two lines of the exact same code, because I have to edit IP Port and all the arguments twice when I have to change the item.\r\n\r\n## The issue with my actual bash script\r\nMy bash script (elro433) is located in the /usr/bin folder so I can execute it without the path. I have a check where it counts the arguments and looks if there are exactly three arguments `<masterdip>`, `<slavedip>` and `<on|off>`. If there are less or more arguments, it echos the number of arguments and the actual arguments.\r\n```\r\nroot@Server:~# cat /usr/bin/elro433\r\n...\r\nif [ \"$#\" -lt 3 ]; then\r\n  err \"Wrong number of arguments $# ($*).\\nUsage: $0 <masterdip> <slavedip> on|off\"\r\nfi\r\n...\r\n```\r\nSo using it in the shell works perfectly fine and it returns my TXP string which I want to send to my 433MHz LAN Gateway.\r\nBut if I use this script via the EXEC Transformation Service my script throws the wrong number of arguments error:\r\n```\r\n2016-02-04 14:00:53.287 [WARN ] [AbstractDatagramChannelBinding] - Received data [2016-02-04T14:00:52+0100]: Wrong number of arguments  7 (10110 01100 on \")], >[OFF:127.0.0.1:49880:EXEC(elro433\" 10110 11000 off).\r\nUsage: /usr/bin/elro433 <masterdip> <slavedip> on|off from an undefined remote end /127.0.0.1:54693. We will not process it\r\n```\r\nAs you can see, the EXEC Transformation Service ALSO passes through everything AFTER `10110 11000 on` and I don't know why, as far as I can see my syntax is correct.\r\nI have also tried to split the arguments with @@ with no change, also removed the quotation marks.\r\n\r\nIt also ignores the OFF command completely, it won't send the OFF string when I turn the Switch off...\r\n\r\nIf I use the exact command which is documented under the TCP Binding wiki entry, I get:\r\n```\r\n java.io.FileNotFoundException: /etc/openhab/configurations/transform/my.device.map)')], >[OFF:127.0.0.1:49880:'MAP(my.device.map (Datei oder Verzeichnis nicht gefunden)\r\n```\r\n\r\nSo there is definietly a bug."}}