This object is in archive! 

How create a virtual switch to command lamp with UDP socket ?

babapt versini shared this question 10 years ago
Need Answer

Dear friends,


I need your help to control MiLight/Easybulb/LimitlessLED with my Zipabox. Sorry in advance for my bad english.

I have one RGB and 1 white bulb. The wifibox used my home network and works well with the original Android App.


I would like to control it with the UDP socket option on my Zipabox .

Here is the request with a Vera :


socket = require("socket")local s = socket.udp()s:sendto(string.char(0x22,0x00,0x55), "192.168.1.240", 50000)s:close()


http://forum.micasaverde.com/index.php/topic,14471.0.html

As you seen on the picture, I have configure socket request like this :Type : UDPHost : 192.168.1.240 Port : 50000 Source Port : 50000 Retries : 50 Corps : 0x22,0x00,0x55 And I have created a rule "when I put the switch "lamp" On, send this UDP socket.But it does not work... Thank you for your help.

Replies (13)

photo
1

http://www.limitlessled.com/dev/


Here is projects and informations to develop products integration.

photo
1

Bonjour babapt,


Tu as essayé en Hexadécimal ou entier et avec une seule commande à la fois ?

essai avec 22 ou 34.


Yann,

photo
1

Essai aussi avec le caractère " (qui correspond avec le code hexa 22).


Désolé si tu as déjà essayé ca ;)

photo
1

Yann SALAUN wrote:

Essai aussi avec le caractère " (qui correspond avec le code hexa 22).


Désolé si tu as déjà essayé ca ;)

Bonjour et merci de votre aide.

J'ai essayé la combinaison "On" seule pour une ampoule Blanche.

220055

"220055"

0x22,0x00,0x55

"0x22,0x00,0x55"

Sans résultat.

photo
1

Bonjour,


Peux-tu essayer avec juste message d'un caractère => "


Yann,

photo
1

Yann SALAUN wrote:

Bonjour,


Peux-tu essayer avec juste message d'un caractère => "


Yann,

Je ne comprend pas ...

photo
1

Okay, i've got something working!


I've got 2 easybulbs, and their working. You have to send the ascii version of the command.


In the body, use these commands:

  1. "UU = ON Translates to hex 22 55 55
  2. !UU = OFF Translates to hex 21 55 55

It should be 22 00 55 and 21 00 55, but i cannot 'imitate' the 00 in hex.


Use this site to calculate what your hex command should be in ascii:

http://www.asciitohex.com/

photo
1

I have the same problem for sending socket commands.


I have to send this command:

0x20, 0x01, 0x04 (it is hex)


In which format should I send the command?

photo
1

Wel, you'd have to find out what the ASCII characters are for these hex commands, since ZIPATO only takes ASCII in the socket body.


Use this as example, using the http://www.asciitohex.com website to translate. :

In the body, use these commands:


  1. "UU = ON Translates to hex 22 55 55
  2. !UU = OFF Translates to hex 21 55 55

photo
1

Do you have any idea how to translate these hex?

I don't get it...

How to convert 0x20 for example?

photo
1

Could it be

32 1 4

??


If yes, how to send this command? In the same socket request command or one for each number?

photo
1

Looks that there is several questions related to hex payload support for socket request. If you zipato -team could do that it will coverage multiple issues raised in here, like:

https://community.zipato.com/topic/socket-hex-body

https://community.zipato.com/topic/socket-device-eg-av-amplifier

https://community.zipato.com/topic/how-does-socket-request-action-work-


I really like to see that hex payload will be supported in next firmware.

photo
1

I can control my milight via zipato now (thanks to Robert Salomons!)


Codes for the milight:


http://www.limitlessled.com/dev/


Ive read the codes from the manual and converted it to ascii via the website http://www.asciitohex.com/


For example, Group1 All Off


Decimal: 70 00 55 -> convert

Ascii: F�7 -> copy


I use this as body message in a rule (see attachments)

Then ive created a virtual switch and a rule for "on/off"


This is working for my milight bulbs.


Edit: ok i have to use more retries to get all of my 3 Bulbs in Group1 off/on - ive set it to 50.

Leave a Comment
 
Attach a file