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.

KNX/IP Disconnected
#1
Hi:
How can I Know that the bus KNX is disconnected outside Alerts. I want to send an email to know that situation.
Thanks.
Reply
#2
Hi,

So is there a way to do this? Is there a way to get specific alerts to generate an email?


Thanks,


Roger
Reply
#3
Yes, via a resident script:
Code:
if not client then
  function statushandler(status)
    if status == 0x00 then
      -- KNX Connected
    elseif status == 0xFF then
      -- KNX Disconnected
    end
  end

  client = require('localbus').new(1)
  client:sethandler('status', statushandler)
end

client:step()
Reply
#4
Good. Is there a way to fo the same with knx physical adresses as well? I was thinking to maybe ones a day run a script that checks programmed adresses and makes an alert if trouble and and ok message to the log if ok
Reply
#5
There's knxlib.ping(phys_addr) function that you can use. But it will work only if your LM has direct KNX/TP connection.
Reply
#6
Ok. Thx. Yes i have tp so that will workSmile
Reply
#7
(21.02.2017, 08:35)admin Wrote: Yes, via a resident script:
Code:
if not client then
 function statushandler(status)
   if status == 0x00 then
     -- KNX Connected
   elseif status == 0xFF then
     -- KNX Disconnected
   end
 end

 client = require('localbus').new(1)
 client:sethandler('status', statushandler)
end

client:step()

Thank you. I added the function into the group address status script. From before.
Reply
#8
(22.02.2017, 01:47)rocfusion Wrote:
(21.02.2017, 08:35)admin Wrote: Yes, via a resident script:
Code:
if not client then
 function statushandler(status)
   if status == 0x00 then
     -- KNX Connected
   elseif status == 0xFF then
     -- KNX Disconnected
   end
 end

 client = require('localbus').new(1)
 client:sethandler('status', statushandler)
end

client:step()

Thank you. I added the function into the group address status script. From before.
I tried this function and it's not working in the current version of Wiser - does anyone have a current working version of this function to check the local KNX TP link?

Tried in a resident script and scheduled script (I prefer scheduled script), anyway the statushandler() function never gets called.
Thank you!
Morkov
Reply
#9
Hi,
I tested it with Wiser for KNX with firmware 2.6.2 and it was working for me.
You have to use resident script with sleep time 0.

(30.08.2021, 20:27)morkovka Wrote:
(22.02.2017, 01:47)rocfusion Wrote:
(21.02.2017, 08:35)admin Wrote: Yes, via a resident script:
Code:
if not client then
 function statushandler(status)
   if status == 0x00 then
     -- KNX Connected
   elseif status == 0xFF then
     -- KNX Disconnected
   end
 end

 client = require('localbus').new(1)
 client:sethandler('status', statushandler)
end

client:step()

Thank you. I added the function into the group address status script. From before.
I tried this function and it's not working in the current version of Wiser - does anyone have a current working version of this function to check the local KNX TP link?

Tried in a resident script and scheduled script (I prefer scheduled script), anyway the statushandler() function never gets called.
Best regards

forsterm
Reply
#10
Strange, I wonder what am I doing wrong.

I'm using this, in a resident script with sleep time 0:
Code:
-- KNX TP connectivity check
function statushandler(status)
  if status == 0x00 then
    log('KNX connection check succesful')
  elseif status == 0xFF then
    alert('KNX is disconnected')
  end
  log('status is ' .. tostring(status))
end

client = require('localbus').new(1)
client:sethandler('status', statushandler)

client:step()

And I get nothing in the logs, error logs, alerts... any ideas?


(31.08.2021, 06:36)forsterm Wrote: Hi,
I tested it with Wiser for KNX with firmware 2.6.2 and it was working for me.
You have to use resident script with sleep time 0.

(30.08.2021, 20:27)morkovka Wrote:
(22.02.2017, 01:47)rocfusion Wrote:
(21.02.2017, 08:35)admin Wrote: Yes, via a resident script:
Code:
if not client then
 function statushandler(status)
   if status == 0x00 then
     -- KNX Connected
   elseif status == 0xFF then
     -- KNX Disconnected
   end
 end

 client = require('localbus').new(1)
 client:sethandler('status', statushandler)
end

client:step()

Thank you. I added the function into the group address status script. From before.
I tried this function and it's not working in the current version of Wiser - does anyone have a current working version of this function to check the local KNX TP link?

Tried in a resident script and scheduled script (I prefer scheduled script), anyway the statushandler() function never gets called.
Thank you!
Morkov
Reply
#11
You won't get any log until the connection status changes. If you want to get the current status the use status = buslib.isconnected()
Reply
#12
(31.08.2021, 07:53)admin Wrote: You won't get any log until the connection status changes. If you want to get the current status the use status = buslib.isconnected()

Thank you, that works well!

What's the difference between 'knxlib' and 'buslib'?
Thank you!
Morkov
Reply
#13
No difference, both variables reference the same library functions
Reply
#14
What can be the reason for KNX / TP disconnected messages?

In my alerts, I have many messages from KNX / TP connected and KNX / TP disconnected, but I do not know why.

Thanks.
Reply
#15
Which hardware version do you have?
Reply
#16
HW: LM5 Lite (i.MX6)

SW: 20200703
Reply
#17
I also experience this, once every few days - in the Error log I see:
Quote:KNX/TP: Transmitter Error (send 0 receive 1)

And in the Alerts log, at the same exact time (same second), it says:

Quote:KNX/TP: Connected

Using W4K i.MX6.
Thank you!
Morkov
Reply
#18
Transmitter error and temperature warning usually means that there are too many devices on the KNX line.
Reply
#19
(01.10.2021, 14:06)admin Wrote: Transmitter error and temperature warning usually means that there are too many devices on the KNX line.

What temperature warning? I don't see it.

Just the transmitter error coupled with a 'connected' (as if the device's KNX line was disconnected and reconnected)
Thank you!
Morkov
Reply
#20
Temperature warning is another indication of an overloaded line. It's not guaranteed to appear though. The more devices are on the KNX line the harder it is to transmit data. This leads to the chip overheating and/or not being able to transmit at all (send 0 receive 1 error).
Reply


Forum Jump: