Problem sending UDP command

Hello,
I have a setup with Limitlessled white lamps.
Made the following test script.

#!/bin/sh -x

#On Zone 1.
cd /home/pi/Thomas/milight_sources/
/home/pi/Thomas/milight_sources/milight 1 on
sleep 1

#Brightness max.
for i in 1 2 3 4 5 6 7 8 9 10 ;do
/home/pi/Thomas/milight_sources/milight 1 b 1
sleep 0.05
done
sleep 1

#Full white
for i in 1 2 3 4 5 6 7 8 9 10 ;do
echo -n -e \0x3F\0x00\0x55 | nc -u -q 1 192.168.0.6 8899
sleep 0.2
done
sleep 1

#Medium warm
for i in 1 2 3 4 5 ;do
echo -n -e \0x3E\0x00\0x55 | nc -u -q 1 192.168.0.6 8899
sleep 0.2
done
sleep 1
#Dimm to half brightness
for i in 1 2 3 4 5 ;do
echo -n -e \0x34\0x00\0x55 | nc -u -q 1 192.168.0.6 8899
sleep 0.05

Commands for On, Brightnes max. , Dimm to half brightness, works with no promlem, but Full white and Medium warm is not working, dispite its the same command structur.
0x3F is for white bulps command for more white
0x3E is for white bulps the command for warmer

If I use the UDP sender on my tablet the commands 3F00 and 3E00 work ok. 10x 3F00 white max. 5x 3E00 medium warm.

What could be the problem??

regads
gwaag ???

Be sure that you are echoing the right bytes. On my Linux machine the syntax for echo is:

echo -n -e '\x34\x00\x55'

Pipe that through od to make sure you are sending only three bytes.

Hello,

I do not understand why some commands work and others dont. Its the same command and the

0x38/ etc.commands are from Limitlesled web site.

Hwo can help???

If I put only \x3C\x00\x55, all lights go on not just Zone 1…

#!/bin/sh -x

#Einschalten Zone 1 ein.
#cd /home/pi/Thomas/milight_sources/
echo -n -e \0x38\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 This command works
sleep 1

#Hell auf max.
for i in 1 2 3 4 5 6 7 8 9 10 ;do
echo -n -e \0x3C\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 Not work
sleep 0.05
done
sleep 1

#Full white
for i in 1 2 3 4 5 6 7 8 9 10 ;do
echo -n -e \0x3F\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 Not work
sleep 0.2
done
sleep 1

#Medium warm
for i in 1 2 3 4 5 ;do
echo -n -e \0x3E\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 Not work
sleep 0.2
done
sleep 1
#Dimmen auf half brightness
for i in 1 2 3 4 5 ;do
echo -n -e \0x34\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 This works

best regards

gwaag

Hello,

I do not understand why some commands work and others dont. Its the same command and the

0x38/ etc.commands are from Limitlesled web site.

Hwo can help???

If I put only \x3C\x00\x55, all lights go on not just Zone 1…

#!/bin/sh -x

#Einschalten Zone 1 ein.
#cd /home/pi/Thomas/milight_sources/
echo -n -e \0x38\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 This command works
sleep 1

#Hell auf max.
for i in 1 2 3 4 5 6 7 8 9 10 ;do
echo -n -e \0x3C\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 Not work
sleep 0.05
done
sleep 1

#Full white
for i in 1 2 3 4 5 6 7 8 9 10 ;do
echo -n -e \0x3F\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 Not work
sleep 0.2
done
sleep 1

#Medium warm
for i in 1 2 3 4 5 ;do
echo -n -e \0x3E\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 Not work
sleep 0.2
done
sleep 1
#Dimmen auf half brightness
for i in 1 2 3 4 5 ;do
echo -n -e \0x34\0x00\0x55 | nc -u -q 1 192.168.0.6 8899 This works

best regards

gwaag

You may want to reach out to Limitless LED themselves, since they’ll likely have better information about the specific type of Bulb/Controller version you’re using (esp if you bought it from them).

… or perhaps these folks, since you appear to be following their work already:
Limitless/AppLamp LED - Domoticz

Thanks for your link.
This way it must be done:

/bash not /sh

"\ x38\x00\x55" not \0x38\0x00\0x55

[code]#!/bin/bash -x

#Einschalten Zone 1 ein.
cd /home/pi/Thomas/milight_sources/
echo -n -e “\x38\x00\x55” | nc -u -q 1 192.168.0.6 8899
sleep 1

#Hell auf max.
for i in $(seq 10); do
echo -n -e “\x3C\x00\x55” | nc -u -q 1 192.168.0.6 8899
sleep 0.05
done
sleep 1

#Full white
for i in $(seq 10); do
echo -n -e “\x3F\x00\x55” | nc -u -q 1 192.168.0.6 8899
sleep 0.05
done
sleep 1

#Medium warm
for i in $(seq 8); do
echo -n -e “\x3E\x00\x55” | nc -u -q 1 192.168.0.6 8899
sleep 0.05
done
sleep 1

#Dimmen auf half brightness
for i in $(seq 5); do

echo -n -e “\x34\x00\x55” | nc -u -q 1 192.168.0.6 8899

[/code]
Best regards
gwaag

Just a guess: the ones where the first byte are in the range 0x30 to 0x39 work. The ones where the first byte are in the range 0x3A to 0x3F do not. Since 0x38 == ‘8’ in ASCII, you were sending an ‘8’ character either way, and the bulb appears to have been forgiving the other bytes not being right.

If I put only \x3C\x00\x55, all lights go on not just Zone 1......

You missed that my example had quotation marks in it, whereas your code didn’t. Which I see you eventually figured out.

Have you looked at what @RexBeckett has implemented in the MiLight Apps which are the Same by a different name.

http://apps.mios.com/search.php?key=MiLight