This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Gateway to Crestron
#6
Hi,

You can make the connection between Crestron and LM using example of the site.
http://openrb.com/example-lm2-as-tcp-ser...-requests/.
You need to come up with a data transfer protocol between the Creston and LM. I have used in this message format - “function_groupadress_value”:
- “function”- name function (switch, temp, dimm)
- Groupadress - Group address bus KNX
- Value - the value for the group address
This message must be disassembling in LM.
Detail of script code
--function_ groupadress_value
dim_check = string.split(data, '_')
--диммирование освещении
if (dim_check[1] == 'dimm' || dim_check[1] == 'temp'|| dim_check[1] == 'switch') then
value = tonumber(dim_check[3])
grp.write(dim_check[2], value)
end
The response from the LMA in Crestron is forming similarly to the example online.
http://openrb.com/example-lm2-as-tcp-ser...-requests/.

Event-based program
Event-based script will monitor the object ‘1/1/1’, if it is switched on, “Lamp is ON” is sent to all TCP clients currently connected to Logic Machine 2 TCP server, if lamp is switched off – “Lamp is OFF”.
Source code

1. value = knxdatatype.decode(event.datahex, dt.bool)
2. udpsend('Lamp is' .. (value and 'ON' or 'OFF'))

Crestron connects with the LMA through the unit "TCP/IP client". You must specify the correct port and IP-address of the LM.
I think there will not be problems with sending commands and parsing response from LM.
Reply


Messages In This Thread
Gateway to Crestron - by Brillebjørn - 17.02.2017, 12:14
RE: Gateway to Crestron - by mlaudren - 20.02.2017, 18:34
RE: Gateway to Crestron - by Arnts - 21.02.2017, 18:35
RE: Gateway to Crestron - by mlaudren - 22.02.2017, 14:27
RE: Gateway to Crestron - by edgars - 22.02.2017, 11:05
RE: Gateway to Crestron - by nibelong - 04.03.2017, 17:59
RE: Gateway to Crestron - by s.prathmesh - 28.12.2017, 12:08

Forum Jump: