+ Antworten
Ergebnis 1 bis 8 von 8
  1. #1
    Registriert seit
    Feb 2012
    Ort
    Gorinchem, Netherlands
    Beiträge
    80

    Standard Using Arduino to control Philips LivingColors.

    Hi,

    Has someone some experience with controlling Philips LivingColors with Arduino and IPS? I have the Arduino with CC2500 shield working, but now the step to get this working with IPS.

    - What are the commands to send to the Arduino COM port?
    - How can I check if the command is send to the COM port, to check if the COM port is working and the commands are send to the Arduino?

    By example this command should be send: w0-255-255-255

    Maybe someone has a script which is already working?

    I hope someone can help me.

    Thanks,

    Albert

  2. #2
    Registriert seit
    Feb 2012
    Ort
    Gorinchem, Netherlands
    Beiträge
    80

    I found out that the command should be:
    COMPort_SendText(21575 /*[Serial Port Arduino]*/, "n0");

    Only, there is no result on the lamp. When sending n0 with Putty the lamp is going out, as it should be.

    How can I check if the command is send, or should I do more to send commands to de Arduino via a serial port?

    I hope someone can help me started with this.

    Albert

  3. #3
    Registriert seit
    Feb 2009
    Ort
    Hamburg
    Beiträge
    2,099

    Hello....

    ... use the debug function @ the instance of the com-port!

    Regards,
    Peter


    Sent from my iPhone using Tapatalk
    -MacMini(2011) =>Parallels 11=>Win7, FB7390, EIB-KNX, DMX-ArtNet, 2x EM24 DIN, SONOS ZP100/120/Play:1/Play:5/Sub, 1Wire=>Wiregate, xbee=>ROOMBA, Dreambox, DENON 2313, 8x Philips HUE -

  4. #4
    Registriert seit
    Feb 2012
    Ort
    Gorinchem, Netherlands
    Beiträge
    80

    OK, a few hours later I got the “Farbauswahl” working, and it looks like I can send the right commands with the help of another topic.

    http://www.ip-symcon.de/forum/f18/um...tml#post175075

    I managed to get the lamp working once, only when I switch it off via a terminal session. When switched off, only this way, I can send a command once. After that nothing happens anymore?

    Peter: what do you mean by debug the instance, could this be the problem that the command is only send once? Do you have an example?

    Albert

  5. #5
    Registriert seit
    Feb 2009
    Ort
    Hamburg
    Beiträge
    2,099

    Here comes a screenshot!

    click on debug !

    Peter
    Angehängte Grafiken Angehängte Grafiken  
    -MacMini(2011) =>Parallels 11=>Win7, FB7390, EIB-KNX, DMX-ArtNet, 2x EM24 DIN, SONOS ZP100/120/Play:1/Play:5/Sub, 1Wire=>Wiregate, xbee=>ROOMBA, Dreambox, DENON 2313, 8x Philips HUE -

  6. #6
    Registriert seit
    Feb 2012
    Ort
    Gorinchem, Netherlands
    Beiträge
    80

    Thanks for the help, this is what I needed to solve this problem.

    There was no answer coming from the ComPort because the command I send didn’t end with a carriage return. So I added chr(13) at the end and now it is working.

    For those who want to add a Arduino with a CC2500 to your IPS to control your Philips LivingColors (first generation):
    - First I added a color selection “Farbauswahl” to ISP (Add Variable, Type Integer and Custom profile ~HexColor).
    - To the color selection I added a script with the next code.

    And now it is working ………………

    Albert

    PHP-Code:
    <?

    // ################################################################################################
    // Valid commands LivingColors are:
    //     q                        : this help screen.
    //     r                        : reset.
    //     wl-rrr-ggg-bbb    : r, g and b are numbers 000 to 255. Example w000-255-000 for bright green.
    //     hl-hhh-sss-iii    : h, s and i are numbers 000 to 255. No example for now.
    //     i                        : print info.
    //     annn                    : select lamp n. Example a001 to select lamp 1.
    //     nl-rrr-ggg-bbb    : turn lamp on.
    //     fl                    : turn lamp off.
    //     ee                    : e = 0 echo off, e = 1 echo on.
    //     l                        : listen for adresses. Use i to list adresses.
    //     saabbccddeeffgghhii : store adress in a..i. 9 numbers as 2 digit hex.
    //     ?                        : dummy command.
    //
    //     A response of ? means invalid command.
    //     A response of ! means command executed.
    // ################################################################################################

    $hexcolor 39782  /*[Scripts\Test Scripts\LivingColors Woonkamer\Achterzijde\Kleurinstelling]*/ ;

    if (
    $IPS_SENDER == "WebFront")
    {
    SetValue($IPS_VARIABLE$IPS_VALUE);

    $color GetValueInteger($hexcolor);

    function 
    HexColor2Dec($color)
    {
        
    $rood  $color >> 16;
        
    $groen = ($color 0x00FF00) >> 8;
        
    $blauw $color 0x0000FF;
        return array(
    sprintf("%03d",$rood), sprintf("%03d",$groen), sprintf("%03d",$blauw));
    }

    $sendcolor "w0-".HexColor2Dec($color)[0]."-".HexColor2Dec($color)[1]."-".HexColor2Dec($color)[2].chr(13);
    $sendcolor1 "w1-".HexColor2Dec($color)[0]."-".HexColor2Dec($color)[1]."-".HexColor2Dec($color)[2].chr(13);

    COMPort_SendText(21575 /*[Serial Port Arduino]*/$sendcolor);
    COMPort_SendText(21575 /*[Serial Port Arduino]*/$sendcolor1);

    }

    ?>

  7. #7
    Registriert seit
    Feb 2009
    Ort
    Hamburg
    Beiträge
    2,099

    Hi Albert,
    thanks for the script. Where do you buy the stuff to control the lamps? I have 2 livingcolors 1.generation at home. it sounds nice to operate them via ips!!
    regards,
    Peter
    -MacMini(2011) =>Parallels 11=>Win7, FB7390, EIB-KNX, DMX-ArtNet, 2x EM24 DIN, SONOS ZP100/120/Play:1/Play:5/Sub, 1Wire=>Wiregate, xbee=>ROOMBA, Dreambox, DENON 2313, 8x Philips HUE -

  8. #8
    Registriert seit
    Feb 2012
    Ort
    Gorinchem, Netherlands
    Beiträge
    80

    Hi Peter,

    You need a few things.

    A Arduino board
    I have bought the USB version at a Web Shop in The Netherlands, but you can buy them every ware. There is also a Ethernet version but I’m not sure it will work with the CC2500 shield. I don’t see any response about that. The USB version is working (In IPS since today ). They cost around € 25.

    FLORIS.CC - Arduino Uno Rev3

    The LivingColors Arduino shield
    I’m not sure if this is a special board or just the standard CC2500, but I have bought the shield from a Dutch guy who has them on stock right now.

    LivingColors Arduino shields in stock « Electronics projects and kits

    On his website you will find a complete explanation on how it works and about the software you need. First you have to find out how the Arduino is working with the software, but after a few hours I had it working. It took some longer to get this working with IPS, but this is also running now. The shield cost € 22 without shipping.

    Using the CC2500 Arduino Shield « Electronics projects and kits

    A case
    If you want the board in a case, there is a special case for it. I only had to remove some inner parts. It cost € 11,25.

    Behuizing voor Arduino


    It works great and you can connect multiple LC to it. Only the distance is a problem. I ordered some connectors, hopefully I can connect the Arduino via a RJ45 connection to my living room.

    I took me some Google hours, but I found the way ………..

    Albert

Ähnliche Themen

  1. Philips Fernseher in IPS einbinden?
    Von DerStandart im Forum Audio & Video, TK-Anlagen, ISDN
    Antworten: 192
    Letzter Beitrag: 24.11.17, 21:46
  2. PHILIPS LED MyVision 3W GU10
    Von Boui im Forum Beleuchtung / Lichttechnik
    Antworten: 5
    Letzter Beitrag: 18.09.11, 09:13
  3. TCM120 - Arduino Anfängerfrage
    Von Mrsol im Forum EnOcean
    Antworten: 7
    Letzter Beitrag: 22.07.11, 13:18
  4. Einbindung eines Arduino
    Von hrahlers im Forum Skripte, PHP, SQL
    Antworten: 4
    Letzter Beitrag: 29.08.10, 11:16
  5. Arduino und IPS
    Von hrahlers im Forum IPS-868 / ProJET, XBee, ZigBee, XPort
    Antworten: 2
    Letzter Beitrag: 12.07.10, 09:39