Posts: 42 
	Threads: 17 
	Joined: Jul 2015
	
 Reputation: 
 0
	 
 
	
	
		Hi: 
How can I Know that the bus KNX is disconnected outside Alerts. I want to send an email to know that situation. 
Thanks.
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 200 
	Threads: 60 
	Joined: Jun 2015
	
 Reputation: 
 7
	 
 
	
	
		Hi, 
 
So is there a way to do this?  Is there a way to get specific alerts to generate an email? 
 
 
Thanks, 
 
 
Roger
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		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()
  
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 179 
	Threads: 43 
	Joined: Jul 2015
	
 Reputation: 
 2
	 
 
	
	
		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
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		There's knxlib.ping(phys_addr) function that you can use. But it will work only if your LM has direct KNX/TP connection.
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 179 
	Threads: 43 
	Joined: Jul 2015
	
 Reputation: 
 2
	 
 
	
	
		Ok. Thx. Yes i have tp so that will work  
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 200 
	Threads: 60 
	Joined: Jun 2015
	
 Reputation: 
 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.
	  
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 45 
	Threads: 14 
	Joined: Aug 2021
	
 Reputation: 
 0
	 
 
	
		
		
		30.08.2021, 20:27 
(This post was last modified: 31.08.2021, 05:46 by morkovka.)
		
	 
	
		 (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
 
	
		
	 
 
 
	
	
	
		
	Posts: 43 
	Threads: 2 
	Joined: Mar 2017
	
 Reputation: 
 3
	 
 
	
	
		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
 
	
		
	 
 
 
	
	
	
		
	Posts: 45 
	Threads: 14 
	Joined: Aug 2021
	
 Reputation: 
 0
	 
 
	
	
		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
 
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		You won't get any log until the connection status changes. If you want to get the current status the use status = buslib.isconnected()
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 45 
	Threads: 14 
	Joined: Aug 2021
	
 Reputation: 
 0
	 
 
	
	
		 (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
 
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		No difference, both variables reference the same library functions
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 88 
	Threads: 15 
	Joined: Sep 2019
	
 Reputation: 
 1
	 
 
	
	
		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.
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		Which hardware version do you have?
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 88 
	Threads: 15 
	Joined: Sep 2019
	
 Reputation: 
 1
	 
 
	
	
		HW: LM5 Lite (i.MX6) 
 
SW: 20200703
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 45 
	Threads: 14 
	Joined: Aug 2021
	
 Reputation: 
 0
	 
 
	
	
		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
 
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		Transmitter error and temperature warning usually means that there are too many devices on the KNX line.
	 
	
	
	
		
	 
 
 
	
	
	
		
	Posts: 45 
	Threads: 14 
	Joined: Aug 2021
	
 Reputation: 
 0
	 
 
	
	
		 (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
 
	
		
	 
 
 
	
	
	
		
	Posts: 8422 
	Threads: 45 
	Joined: Jun 2015
	
 Reputation: 
 481
	 
 
	
	
		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).
	 
	
	
	
		
	 
 
 
	 
 |