I have a resident script that is set to update 3 objects (date, time and datetime) but it also updates two other objects (sunrise time and sunset time) althougt there is no command on the script.
Can someone pinpoint why this happens?
DateTime Update resident script (runs every 60sec)
-- get current data as tablenow = os.date('*t')
-- system week day starts from sunday, convert it to knx formatwday = now.wday == 1and7ornow.wday - 1-- time tabletime = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
-- date tabledate = {
day = now.day,
month = now.month,
year = now.year,
}
--- full date bitsOCT08 = now.year - 1900OCT07 = now.monthOCT06 = now.dayOCT05 = bit.bor(bit.lshift(wday, 5), now.hour)
OCT04 = now.minOCT03 = now.secOCT02 = 0-- subfields like working day and dst not specified in this sampleOCT01 = 0-- subfields like quality of clock not specified in this sample -- write to busdate_time = string.char(OCT08) .. string.char(OCT07) .. string.char(OCT06) .. string.char(OCT05) .. string.char(OCT04) .. string.char(OCT03) .. string.char(OCT02) .. string.char(OCT01)
grp.checkwrite('0/1/1', date, dt.date)
grp.checkwrite('0/1/2', time, dt.time)
grp.checkwrite('0/1/3', date_time, dt.string)
12.06.2022, 10:16 (This post was last modified: 12.06.2022, 10:24 by Dré.)
are you sure it is from this script?
What happened if you disable this script, stopped update sunrise/sunset too?
I see you also use tags, is there a script that start run script wit tag 'KNX Response'? Or why do you use these tags?
It looks like 0/1/3 doesn't work, find?
---------------------- sent to virtual object for visualisation-------------------------------------------addresstimewithoutseconds = '32/1/0'--'Time, and day [Wiser] Visualisation'now = os.date('*t')
-- system week day starts from sunday, convert it to knx formatwday = now.wday == 1and7ornow.wday - 1-- time tabletime = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
-- date tabledate = {
day = now.day,
month = now.month,
year = now.year,
}
onlyhourandseconds = string.format("%02d", now.hour) .. ":" .. string.format("%02d", now.min)
old_value_onlyhourandseconds = grp.getvalue(addresstimewithoutseconds)
ifold_value_onlyhourandseconds ~= onlyhourandsecondsthengrp.write(addresstimewithoutseconds, onlyhourandseconds)
---------------------- sent to KNX bus-------------------------------------------ifnow.min == 21then-- only sent when it is 21 minutes-- write to busgrp.write('15/0/2', time, dt.time) -- 'Time, and day [Wiser]'grp.checkwrite('15/0/1', date, dt.date) -- 'Datum' Only when date changedendend
Sorry for late reply...
For sure the date time update script has nothing on it that sould update sunset and sunrise, also there is no other script or function that has to do with sunset and sunrise.
Trying to figure out what is going on i disabled all scripts, changed the LM's device address and all three objects (date, time, datetime, sunset and sunrise) are still getting updated by LM!!!. Final work around was to delete completely the date time update script and all 5 objects are still updating every minute!
Also on object logs those apdates are having source address the LM's physical address but everything else updating from LM has "local" as scource.
26.06.2022, 15:40 (This post was last modified: 26.06.2022, 15:43 by Dré.)
It looks like it is not coming from you LM, but from another device with adres 1.1.123.
What adres has the LM, i think different then 1.1.123 (because if it is from LM, you see local instead of the adres.
Look at you ETS program and find the device with adres 1.1.123 and check the parameters to disable it or remove the adres at that device (if you want).
If you still think the LM is the one who sent it, change the adres of the LM again and look if the adres of the source change too.
(26.06.2022, 15:40)Dré Wrote: It looks like it is not coming from you LM, but from another device with adres 1.1.123.
What adres has the LM, i think different then 1.1.123 (because if it is from LM, you see local instead of the adres.
Look at you ETS program and find the device with adres 1.1.123 and check the parameters to disable it or remove the adres at that device (if you want).
If you still think the LM is the one who sent it, change the adres of the LM again and look if the adres of the source change too.
The 1.1.123 is the changed physical address of the LM. It is 100% sure it is coming from LM because ia have disconected everything else on the BUS side.
As Dré correctly mentioned any telegrams not marked as local are coming from outside of LM. Do you have KNX/IP enabled? Are there any other LMs or KNX routers on the same network?
27.06.2022, 07:02 (This post was last modified: 27.06.2022, 07:13 by gtsamis.)
(27.06.2022, 06:25)admin Wrote: As Dré correctly mentioned any telegrams not marked as local are coming from outside of LM. Do you have KNX/IP enabled? Are there any other LMs or KNX routers on the same network?
Telegrams are showing the LM's physical address (1.1.123 or what ever i've set up on LM), i have also disconected TP and still got those updates.
KNX/IP is enabled and there are no other LMs or IP Router inside my network.
UPD: Disabled KNX/IP and it stoped the updates, so i guest those are coming from an ip device... is there anyway to trace ther scource from LM or should i use wireshark?