Menu

XMLServer for KNXWeb - how to

Help
RR
2008-06-27
2012-12-14
  • RR

    RR - 2008-06-27

    I like knxWeb and LinKnx concept and performance and would like to use it,
    but would like to connect it to my home automation system. One possibility
    could be to replace EIBD, another to write my own XML server and serve
    KnxWeb. I already have Perl driver for my home automation system and it
    wouldn't be too much work to add XML server functionality and mimic linknx
    behaviour (although without rules).

    I've tried latter, but it seems that my XML server doesn't get any XML
    requests from KnxWeb. I suspect that LinKnx makes some additional things at
    the start of connection ? Does it send anything to KnxWeb ? I guess somekind
    of device list is sent to KnwWeb ?

    Can you describe in few words, what I have to implement in minimal way to
    acomplish this ?

    Also, how easy/hard is it to add/modify devices to knxweb -
    is it just about adding javascript files ?
    Has anyone more info about how to add support for various devices to appear on KnwWeb ? Since it is configurable, almost anything can be shown on web interface and that opens up a lot of potential...

    Thanks in advance,

    regards,

    Bulek.

     
    • jef2000

      jef2000 - 2008-06-27

      Hi,

      If you just want to use KnxWeb, you don't need to look at linknx at all. You can have a look at the linknx.php file present in knxweb.
      It's even simpler, you can create a linknx.php file containing the code below and define function "executeCommand" to do the XML processing:

      <?php
      error_reporting(0);
      header('Content-Type: application/xml; charset=iso-8859-1');

      $cmd = file_get_contents("php://input");
      $result = executeCommand($cmd);
      print($result);
      ?>

      In function "executeCommand", you'll have to deal with commands like:
      <read><config><objects/></config></read> must return the list of available objects.
        ( e.g.: <read status="success"><config><objects><object id="test1"/><object id="test2"/>...</objects></config></read> )

      <read><objects><object id="test1"/><object id="test2"/>...</objects></read> must return the actual values
        ( e.g.: <read status="success"><objects><object id="test1" value="on" /><object id="test2" value="off" /></objects></read>)

      <write><object id="test2" value="on"/></write> must switch on object "test2" and return success
        ( e.g.: <write status="success"/>)

      The details of possible commands can be found in the wiki.

      Regards,

      Jean-François

       
    • RR

      RR - 2008-06-27

      Hi,

      thanks for response and info. I must have something wrong in my XML server cause it doesn't get any request. If I understood right, then KnxWeb requests list of possible objects - right ?

      I'd kindly ask if someone can provide me some example xml list of objects so I'll get better idea, what I have to produce (since I don't have EIB installation, I cannot try to do this by myself)....

      I'd also kindly ask for quick answers :
      - for example, thermostat has multiple modes (like Comfort, ...) - how hard is to customize those texts ?

      - how hard is to add new devices (I mean speakers, squeezebox (media player), and some other devices that are maybe similar to Thermostat - working mode and few parameters) ? Is it only javascript and xml specs ?

      - if I'd still want to use linknx in my setup - do I have any other way of providing automation layer to it instead of EIBD ?

      Thanks in advance and thanks for great apps,

      regards,

      Rob.

       
    • RR

      RR - 2008-07-08

      Hi,

      I've got my basic XML server code in Perl working - it's receiving XML requests from KnxWeb. IT seems that at the start of design process, KnwWeb requests info about all objects available. Since I don't have working EIB installation, I'd kindly ask if anyone can provide some example xml file with real objects (if possible also for Default design example distributed with KnxWeb)...

      Thanks in advance,

      regards,

      Rob.

       
    • jef2000

      jef2000 - 2008-07-08

      Hi,

      The file used by my simulator can be found here:

      http://ouaye.net/linknx/knxwebsim-0.5/objects.xml

      Regards,

      Jean-François

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.