Page 1 of 1

Domoticz can't send to /dev/udp

Posted: Tuesday 07 November 2017 17:18
by DanTheManNL
Hello,

I'v made a little bash script where I send codes to my milight lamps and they switch colour. When I use the netcat version it works:

Code: Select all

echo -n -e "\x42\00\x55" | nc -u -q 1 xxx.xxx.xxx.xxx 8899
echo -n -e "\x40\x20\x55" | nc -u -q 1 xxx.xxx.xxx.xxx 8899
echo -n -e "\x40\xC0\x55" | nc -u -q 1 xxx.xxx.xxx.xxx 8899
But netcat can only send everything with one second delay so I want to use this script but domoticz can't run it. When I run it from the command line on my raspberry pi it works but when I attach this script to the on action from my group it doesn't:

Code: Select all

echo -n -e "\x42\00\x55" > /dev/udp/xxx.xxx.xxx.xxx/8899
echo -n -e "\x40\x20\x55" > /dev/udp/xxx.xxx.xxx.xxx/8899
echo -n -e "\x40\xC0\x55" > /dev/udp/xxx.xxx.xxx.xxx/8899
Maybe something wrong with the relative path? Domoticz might run it from a different location?

Re: Domoticz can't send to /dev/udp

Posted: Monday 18 December 2017 22:38
by johos
Hey DanTheManNL,

i´m facing the same dilema, did you solve thiss issue?

Re: Domoticz can't send to /dev/udp

Posted: Saturday 09 June 2018 15:14
by sjoerd1953
Hi DanTheManNL,

You have to make the script executable. See this post of mine:
http://www.domoticz.com/forum/viewtopic ... 21#p139821