Given that the ‘Connected by TCP’ LED bulbs ( http://www.tcpi.com/connected-by-tcp ) is one of the least expensive automated bulbs on the market, I’ve been doing some research to figure out if Vera can control them. I found a website ( http://misterhouse.10964.n7.nabble.com/Success-controlling-TCP-Connected-lights-td19316.html ) that seems to have cracked the code. Information from that page is posted below: You basically need to send an HTTP POST message with your bulb’s device ID (DID) and the value you want to conrol. Further down in the linked page is the perl code needed to connect to the gateway and print a list of all your bulb device ids.
The misterhouse website/project seems to be an open source HA project written in Perl. Vera, of course, would need to send these HTTP POST messages in some Lua/Luup code. Can anyone help and post, perhaps with the fully encoded on/off example at the bottom of my origianal post, the code needed to send the HTTP POST message in lua/luup within a scene?
The decoded commands (with encoded versions < > and / characters
converted to plain ASCII) look like this:
ON/OFF:
cmd=DeviceSendCommand&data=11234567890YOURDIDVALUE&fmt=xml
where YOURDID is the DID of the light you want to control and VALUE is
either 0 (for off) or 1 (for on)
Brightness:
cmd=DeviceSendCommand&data=11234567890YOURDIDDIMVALUElevel&fmt=xml
where YOURDID is the DID of the light you want to control and DIMVALUE
is the brightness in percent (don’t use a % sigh on the end).
You can send them to the light with a command like this (properly
encoded and thus a bit harder to read) to turn on a light:
echo -n “cmd=DeviceSendCommand&data=%3Cgip%3E%3Cversion%3E1%3C%2Fversion%3E%3Ctoken%3E1234567890%3C%2Ftoken%3E%3Cdid%3EYOURDID%3C%2Fdid%3E%3Cvalue%3E1%3C%2Fvalue%3E%3C%2Fgip%3E&fmt=xml” | POST -P “http://YOURGWIP/gwr/gop.php”