Domoticz can't send to /dev/udp

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
DanTheManNL
Posts: 5
Joined: Sunday 20 August 2017 18:11
Target OS: Windows
Domoticz version:
Contact:

Domoticz can't send to /dev/udp

Post 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?
johos
Posts: 9
Joined: Sunday 01 May 2016 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by johos »

Hey DanTheManNL,

i´m facing the same dilema, did you solve thiss issue?
sjoerd1953
Posts: 11
Joined: Monday 09 January 2017 9:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Swolgen
Contact:

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

Post by sjoerd1953 »

Hi DanTheManNL,

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

Domoticz running on a Raspberry Pi 3; Milight RGBW and Dual White bulbs; RFXcom XL;HOMEeasy switch; Flamingo switches; Sonoff switches
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests