Hi all
I'd like to show a user an object log for just one object in my visu. Is it possible?
I know I can show data for trends. But I've not found a way how to do it in case the object has no trend.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
When there is no trend attached to the object or the object log is not enabled on this object there is no historical data available for this object anywhere in the system.
You could store historical data to a table in the storage and call it from a .lp file, but i would use a trend as this is the easiest way to do it..
.lp file example. Pass object address/name like this: /user/logs.lp?obj=1/1/1
The number of log entries is limited to 100. You can change this value in query if needed.
13.02.2020, 17:38 (This post was last modified: 13.02.2020, 17:39 by Thomas.)
(13.02.2020, 08:34)admin Wrote: .lp file example. Pass object address/name like this: /user/logs.lp?obj=1/1/1
The number of log entries is limited to 100. You can change this value in query if needed.
Thank you for the file. But there is few issues.
buslib.encodeia(item.src) doesn't work at all. My KNX object which is source of the log record has address 1.3.63.
item.src = 46081
Result of buslib.encodeia(46081) is nil.
I thought there should be buslib.decodeia(item.src) instead of encode. But it doesn't work either. buslib.decodeia(46081) returns 11.4.1 so it looks like there's a bit ordering mismatch etc.
The second problem is:
busdatatype.decode(item.datahex, obj.datatype) returns only basic datatypes. But I'd like to see fully decoded values. Like switch on/off, open/close etc. Is it possible?
In attachments below I'm sending you what I see in log and what's on this newly created page.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Right, it should be buslib.decodeia() instead of buslib.encodeia(). As for wrong address 1.3.63 is 4927 in integer form. You've probably mistaken it with 22/4/1 which is 46081 in integer form.
There are no server-side function for decoding sub-datatypes apart from scaling and angle. You can write your own conversion function if needed.
14.02.2020, 20:16 (This post was last modified: 17.02.2020, 20:19 by Erwin van der Zwart.)
Hi,
Try this:
1) Run code below once to create the logs.lp
2) To have normal decoding use http://<ip>/user/logs.lp?obj=1/1/1
3) To use the custom values during decoding http://<ip>/user/logs.ip?obj=1/1/1&custom=true
4) To reduce or increase the number of lines (default 100) use http://<ip>/user/logs.ip?obj=1/1/1&lines=20 or http://<ip>/user/logs.ip?obj=1/1/1&custom=true&lines=20
17.02.2020, 14:47 (This post was last modified: 17.02.2020, 14:51 by Thomas.)
Thank you, works well.
FYI 1009 is wrong. I think it's for Nobel price for someone who invented it but according to KNX specs the correct setting is:
[1009] = {
dttype = 'open/close',
enums = { [false] = 'open', [true] = 'close'
}
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
I have the code working fine although been trying to mod (unsuccessfully) I would like to know how I can adjust the coding to give me.
1. Be able display all logged events
2. Be able to provide the user the ability to filter logs. Like using a custom value set against an 2 byte integer (where 0= 1/1/1, 1=1/1/3, 2=32/1/5) where they can choose which group to list, would be nice if the custom value list could automatically be generated / updated with group addresses that have been selected to be logged.
3. To show in the list the actual group address against each event.