I wanto to design a php interface to configure Linknx.In other words,an user interface that allows to do hour programations,conditions,etc
However I don't know how to do it because I don't understand the linknx operation,I only know that when I execute linknx it listen at port 1028.
Could you give me any help??
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Via the XML interface on port 1028, you can send rules with a syntax similar to the ones in config file. For example, if you send:
<write><config><rules><rule id="test">
<condition type="object" id="light1" value="on"/>
<actionslist><action type="set-value" id="light2" value="off"/></actionslist>
</rule></rules></config></write>
It will configure a rule that switch off light2 if light1 is switched on.
There is a default config, but it's mostly empty. Before version 0.0.1.21, this default config was useless because it was not starting the XML interface on port 1028. Since 0.0.1.21, it's possible to start it without config and configure it afterward by connecting on port 1028.
An example configuration file can be found here: http://linknx.cvs.sourceforge.net/linknx/linknx/linknx/conf/linknx.xml?view=markup
If you want to make a php interface to configure it, you can start it with a config file like this:
<?xml version="1.0" ?>
<config>
<objects>
</objects>
<rules>
</rules>
<services>
<knxconnection url="ip:192.168.0.55" />
<xmlserver type="inet" port="1028"/>
</services>
</config>
That's more or less what would be in the default, plus the parameters of connection to eibd.
If your group addresses are known in advance, you can put them also in the config file, but you'll be able to add/update/delete them afterwards using the XML interface.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I wanto to design a php interface to configure Linknx.In other words,an user interface that allows to do hour programations,conditions,etc
However I don't know how to do it because I don't understand the linknx operation,I only know that when I execute linknx it listen at port 1028.
Could you give me any help??
Thanks
Hi,
Via the XML interface on port 1028, you can send rules with a syntax similar to the ones in config file. For example, if you send:
<write><config><rules><rule id="test">
<condition type="object" id="light1" value="on"/>
<actionslist><action type="set-value" id="light2" value="off"/></actionslist>
</rule></rules></config></write>
It will configure a rule that switch off light2 if light1 is switched on.
You can find more information in the wiki:
http://linknx.wiki.sourceforge.net/Interacting+with+Linknx
Kind regards,
Jean-François
Oups,
I forgot to add trigger="true" to the condition in my example above.
but is there an XML configuration file by default or do I have to create it?
There is a default config, but it's mostly empty. Before version 0.0.1.21, this default config was useless because it was not starting the XML interface on port 1028. Since 0.0.1.21, it's possible to start it without config and configure it afterward by connecting on port 1028.
An example configuration file can be found here:
http://linknx.cvs.sourceforge.net/linknx/linknx/linknx/conf/linknx.xml?view=markup
If you want to make a php interface to configure it, you can start it with a config file like this:
<?xml version="1.0" ?>
<config>
<objects>
</objects>
<rules>
</rules>
<services>
<knxconnection url="ip:192.168.0.55" />
<xmlserver type="inet" port="1028"/>
</services>
</config>
That's more or less what would be in the default, plus the parameters of connection to eibd.
If your group addresses are known in advance, you can put them also in the config file, but you'll be able to add/update/delete them afterwards using the XML interface.