You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a program that will allow you to send telegrams from one network to another and back, it works, but unfortunately not with all types of telegrams. I can't understand why the telegram receiving event doesn't have a data type, so that I can specify it in the justification. Need help!
constKNX=require('knx');constknxConfig1={ipAddr: '192.168.31.12',ipPort: 3671,// physAddr: '1.1.112'};constknxConfig2={ipAddr: '192.168.31.11',ipPort: 3671,// physAddr: '0.0.253'};constknxConnection1=newKNX.Connection(knxConfig1);constknxConnection2=newKNX.Connection(knxConfig2);knxConnection1.on('connected',()=>{console.log('Connected to KNX network 1');});knxConnection2.on('connected',()=>{console.log('Connected to KNX network 2');});knxConnection1.on('event',(evt,src,dest,value)=>{debugger;knxConnection2.writeRaw(dest,value,(err)=>{if(err){console.error('Error forwarding telegram to network 2:',err);}else{console.log(`Forwarded telegram to network 2: ${dest} with value ${value}`);}});});knxConnection2.on('event',(evt,src,dest,value)=>{knxConnection1.writeRaw(dest,value,(err)=>{if(err){console.error('Error forwarding telegram to network 1:',err);}else{console.log(`Forwarded telegram to network 1: ${dest} with value ${value}`);}});});knxConnection1.on('error',(err)=>{console.error('Error in KNX connection 1:',err);});knxConnection2.on('error',(err)=>{console.error('Error in KNX connection 2:',err);});
The text was updated successfully, but these errors were encountered:
I am writing a program that will allow you to send telegrams from one network to another and back, it works, but unfortunately not with all types of telegrams. I can't understand why the telegram receiving event doesn't have a data type, so that I can specify it in the justification. Need help!
The text was updated successfully, but these errors were encountered: