akellai / Crestron-KNX

Crestron SIMPL# module to work natively with KNX IP Tunneling protocol
23 stars 10 forks source link

How to actively read the data on the KNX bus #2

Closed songzh96 closed 5 years ago

songzh96 commented 5 years ago

I want to implement information that automatically reads some addresses from the knx bus at regular intervals.

respect

akellai commented 5 years ago

Let’s assume you want to monitor the 3/2/1 group. You would need to periodically (e.g. oscillator + serial send) send “3/2/1” to the TX$ of the KnxTunnel. In response any device on KNX bus serving the group's read request will send the response and you will see it as incoming RX$. Let’s assume 3/2/1 is a bit value. In this case the response is either “3/2/1:0:00” or “3/2/1:0:01”. Then you can use KNX_1Bit module to convert serial to the digital signal.

songzh96 commented 5 years ago

thanks,I understand

songzh96 commented 5 years ago

Hi @akellai , I send 0/2/26 to the TX$,But the RX$ did not send data back.

0/2/26 is 2 Byte data. it's my room temperature feedback.

akellai commented 5 years ago

Are you able to connect to the IP knx? Basically you need to put ip address of your IP KNX router/gateway in the IpAddress parameter, most probably use default port 3671d as both source and target ports and put any unused address (e.g. 15.15.100) in the MyKnxAddress parameter After that set Connect to “1” and see if Connected becomes “1” (this indicates the module is in the connected state). Once you do that, you’ll start seeing all the knx bus telegrams coming to RX$ output of the module. If connection cannot be made (Connected does not change to "1"), set the DEBUG input to “1” and send the console output to the thread Thanks, akellai

songzh96 commented 5 years ago

yes,I has connected and received some data.

0/2/26 is a feedback Group Address. According to what you said. If i send "0/2/26" to the TX$, RX$ will received "0/2/26:3:xxxx", Is my statement correct?

respect

akellai commented 5 years ago

your statement is correct. Are you sure your device is capable of answering read requests? This can be checked with ETS or knxd or whatever knx tool you have. With knxd I believe you'd use knxtool groupsocketlisten ip:localhost in one terminal and knxtool groupread ip:localhost 0/2/26 from another terminal

songzh96 commented 5 years ago

@akellai , I know why. it's my fault. the 0/2/26 can not read.only wirte. I test a can read group address ,it's ok.