12.08.2021, 18:05
(This post was last modified: 12.08.2021, 20:31 by fleeceable.)
There is probably some better ways but I did something like this (Function 1):
Probably I would use Dynamic Folder in ETS to get all needed devices with physical addresses and save/print it to pdf. Copy all PA-s to notepad++ and use replace function to modify PA-s (like they are in script on line 2 to 13) that you can copy all addresses to script at once. It's about 10 min job to get all 175 addresses into script.
I hope this helps...
Code:
addresses = {
'1.1.3',
'1.1.5',
'1.1.6',
'1.1.7',
'1.1.9',
'1.1.18',
'1.1.19',
'1.2.1',
'1.2.2',
'1.2.3',
'1.2.4',
'1.2.5',
}
--Address count
ie=1
while (addresses[ie]~=nil) do
ie=ie+1
end
--ping addresses
content='<b>KNX Physical Address check</b><br><br>'
content2=''
--log('Checking')
for i = 1, ie-1, 1 do
result = tostring(knxlib.ping(addresses[i]))
if result == 'false' then
content2 = content2 ..'Address: '.. addresses[i] .. ' - ' .. '<b>ERROR!</b>' .. '<br>'
end
end
--log('Check completed...')
--send email
if content2 ~= '' then
res, err = mail('feedback@buildingautomation.ee', 'Physical Address check result', content .. content2)
end
Probably I would use Dynamic Folder in ETS to get all needed devices with physical addresses and save/print it to pdf. Copy all PA-s to notepad++ and use replace function to modify PA-s (like they are in script on line 2 to 13) that you can copy all addresses to script at once. It's about 10 min job to get all 175 addresses into script.
I hope this helps...