as I understand LinKnx, it supports only KNX objects.
What abaou other systems, events, ...
I would like to manage e.g.
- incoming calls from my isdn card triggering actions, e.g. send an email or turn on the heating if a certain number is called ( I have 10 ISDN numbers)
- simple interaction with the Squeezebox, e.g. KNX GA 1/1/0 = 1 starts a playlist
Is support for such external objects planned in the future? I would also program something if it fits in the architecture.
greetings,
mieb
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I understand well, what you need is a way to interface with external systems. The interaction can be of two different types. Allow linknx to react to an external event, and allow linknx to trigger some reaction of an external system.
The second type is already possible using shell commands. If you can start a playlist on your squeezebox using a shell command, the you can use a linknx action of type "shell-cmd" that does the same.
For the moment, I'm working on TCP and UDP io ports to allow linknx to interact with the external world.
It will be possible to define condition that becomes true when a predefined text is received on the io port.
There is also a new action type that will send some predefined text to the io port.
I don't know if the squeezebox can interact using text messages on TCP or UDP connection, but I already tested the feature with my IRTrans infarred receiver transmitter. With the new condition, I'm able to control lights and heating using my TV's remote control, and with the new action, I'm able to control the TV, PVR and Hi-Fi from linknx.
The feature is almost working, I'm hesitating between releasing it now or doing some additional tests to improve quality.
Regards,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok, I understand the direction linknx -> shell-cmd. I think that would work for Squeezebox integration.
But I don't understand completly the possibilities with the direction TCP-IO -> linknx. The telephone calls are received from my ISDN card and handled by a shell script. I want to send the date/time, call-from and call-to numbers to linknx. Dependent on the call-from and call-to number I want to trigger some action, e.g. turn on the heating. Would this be possible with the TCP-IO integration?
But I also would like to store the calls for later visualization. If I understand the docu, only EIB values are stored in the database.
greetings,
mieb
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If your isdn card or script is able to send character strings to UDP port 1234 containing source and destination numbers, and suppose your mobile number is 987654321 , with the example above you would be able to switch on heating if you call 0123450000 and switch on outdoor lighting for 30 minutes if you call 0123450001.
To send character strings to an UDP port in a shell script, you can use something like:
echo "src:$SRC_NUM;dest:$DST_NUM" | netcat -u 127.0.0.1 1234
For the moment, linknx only stores object values, and the object types defines correspond to KNX data types, but they could be extended if needed.
What kind of value would you like to store that would'nt be possible with KNX datatypes? The only limitation I see with KNX is that character strings are limited to 14 characters, but I could easily add a non-knx data-type allowing larger character strings.
Regards,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the explanation, now I understand!!! I use capisuite where one can implement a python callback function that is triggered if a incoming call is received. With this function I could implement I could also send something to an UDP port.
For the storage of non-KNX data I think at the moment only on larger than 14bytes strings.
PS: do you have already a rough idea when you will release the new linknx version with ioport support?
greetings,
mieb
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
as I understand LinKnx, it supports only KNX objects.
What abaou other systems, events, ...
I would like to manage e.g.
- incoming calls from my isdn card triggering actions, e.g. send an email or turn on the heating if a certain number is called ( I have 10 ISDN numbers)
- simple interaction with the Squeezebox, e.g. KNX GA 1/1/0 = 1 starts a playlist
Is support for such external objects planned in the future? I would also program something if it fits in the architecture.
greetings,
mieb
Hi,
If I understand well, what you need is a way to interface with external systems. The interaction can be of two different types. Allow linknx to react to an external event, and allow linknx to trigger some reaction of an external system.
The second type is already possible using shell commands. If you can start a playlist on your squeezebox using a shell command, the you can use a linknx action of type "shell-cmd" that does the same.
For the moment, I'm working on TCP and UDP io ports to allow linknx to interact with the external world.
It will be possible to define condition that becomes true when a predefined text is received on the io port.
There is also a new action type that will send some predefined text to the io port.
I don't know if the squeezebox can interact using text messages on TCP or UDP connection, but I already tested the feature with my IRTrans infarred receiver transmitter. With the new condition, I'm able to control lights and heating using my TV's remote control, and with the new action, I'm able to control the TV, PVR and Hi-Fi from linknx.
The feature is almost working, I'm hesitating between releasing it now or doing some additional tests to improve quality.
Regards,
Jean-François
Hi Jean-François,
ok, I understand the direction linknx -> shell-cmd. I think that would work for Squeezebox integration.
But I don't understand completly the possibilities with the direction TCP-IO -> linknx. The telephone calls are received from my ISDN card and handled by a shell script. I want to send the date/time, call-from and call-to numbers to linknx. Dependent on the call-from and call-to number I want to trigger some action, e.g. turn on the heating. Would this be possible with the TCP-IO integration?
But I also would like to store the calls for later visualization. If I understand the docu, only EIB values are stored in the database.
greetings,
mieb
Hi,
With the TCP io I have programmed now, it's only possible to trigger actions when a predefined character string is received.
An example could be :
<?xml version="1.0" ?>
<config>
<services>
....
<ioports>
<ioport type="udp" id="from-isdn-card" host="127.0.0.1" rxport="1234"/>
</ioports>
</services>
<objects>
<object type="20.102" id="heating" gad="1/1/10">Heating mode</object>
<object type="1.001" id="outdoor_light" gad="1/1/5">Outdoor light</object>
<object type="11.001" id="lastcall_date">Last call Date</object>
<object type="10.001" id="lastcall_time">Last call Time</object>
</objects>
<rules>
<rule id="phone-heating">
<condition type="ioport-rx" expected="src:987654321;dest:0123450000" ioport="from-isdn-card" />
</condition>
<actionlist>
<action type="set-value" id="heating" value="comfort" />
<action type="set-value" id="lastcall_date" value="now" />
<action type="set-value" id="lastcall_time" value="now" />
</actionlist>
</rule>
<rule id="phone-outdoor-light">
<condition type="ioport-rx" expected="src:987654321;dest:0123450001" ioport="from-isdn-card" />
</condition>
<actionlist>
<action type="set-value" id="outdoor_light" value="on" />
<action type="set-value" id="outdoor_light" value="off" delay="30m" />
<action type="set-value" id="lastcall_date" value="now" />
<action type="set-value" id="lastcall_time" value="now" />
</actionlist>
</rule>
</rules>
</config>
If your isdn card or script is able to send character strings to UDP port 1234 containing source and destination numbers, and suppose your mobile number is 987654321 , with the example above you would be able to switch on heating if you call 0123450000 and switch on outdoor lighting for 30 minutes if you call 0123450001.
To send character strings to an UDP port in a shell script, you can use something like:
echo "src:$SRC_NUM;dest:$DST_NUM" | netcat -u 127.0.0.1 1234
For the moment, linknx only stores object values, and the object types defines correspond to KNX data types, but they could be extended if needed.
What kind of value would you like to store that would'nt be possible with KNX datatypes? The only limitation I see with KNX is that character strings are limited to 14 characters, but I could easily add a non-knx data-type allowing larger character strings.
Regards,
Jean-François
Thanks for the explanation, now I understand!!! I use capisuite where one can implement a python callback function that is triggered if a incoming call is received. With this function I could implement I could also send something to an UDP port.
For the storage of non-KNX data I think at the moment only on larger than 14bytes strings.
PS: do you have already a rough idea when you will release the new linknx version with ioport support?
greetings,
mieb