Lost object changes - workaround? - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Lost object changes - workaround? (/showthread.php?tid=439) |
Lost object changes - workaround? - Thomas - 24.10.2016 Hi I've a visualisation with 157 unique bulbs in one sheet (one big hall). Every single bulb is switchable and dimable individually. On the opposite side there's a "Whole hall on-off" button for the whole hall. These are a requests. I use 6 Jung DALIs module for controlling the hall lights. Showed that it's not possible to transfer 157 feedbacks via KNX. Therefore I used DALI's "cumulative feedback". Cumulative feedback is a feedback which sends state of every lamp encoded into byte value. Which means instead of 64 feedbacks per 1 DALI I get only 4 cumulative feedbacks. On LM side I decode this byte value by bit.lshift() etc. Then I "fake" original switching and brightness feedbacks (using grp.update). The problem I'm fighting with is I lost some of "faked" feedbacks. Probably for two reasons: 1. I send plenty of changes in a small time. Maybe there's some buffer which gets full? (I changed "Maximum telegrams in queue" parameter in settings to 1000 but it hasn't helped). 2. Events are processed asynchronously not in order they arrive. From time to time I get 2 datagrams from one DALI because DALI is too slow. The first is 00FF (8 bulbs are off and 8 are on). The second is FFFF (which is correct, all 16 bulbs are on). But in LM these two changes are sometimes processed in reverted order. Maybe because the script is too complex. My opinion is grp.getvalue and grp.update are too slow. So the questions are: Can I switch object changes processing somehow from paralel to serial with correct time order? Can I show a global value or a result of a function in visualisation directly without mapping to group object? Is there anybody who solved this or similar problem? LM4,firmware from 2016/07/14 Thank you for any idea FYI my DALI decode function: Code: function ecl_fake_on_off_feedbacks(ll_hall_adr_1,ll_dali_nr,ll_event_nr,ll_hex_val) RE: Lost object changes - workaround? - Erwin van der Zwart - 24.10.2016 Hi, It's possible to create a custom HTML page and decode the 4 cumulative feedback values on the client side. This way you don't need to put them to a lot of KNX objects. Are you familiar with HTML5, CSS and JavaScript? BR, Erwin van der Zwart RE: Lost object changes - workaround? - Thomas - 25.10.2016 It sound's like good idea in case there's no LM way how to solve this problem. Is there an API documentation/example etc. how to write my own web page communicating to LM? RE: Lost object changes - workaround? - Erwin van der Zwart - 25.10.2016 (25.10.2016, 10:52)Thomas Wrote: It sound's like good idea in case there's no LM way how to solve this problem. Is there an API documentation/example etc. how to write my own web page communicating to LM? How do you want to create the page? By iframe inside normal visu or full external by apps? By iframe is much easier but then it must run inside normal visu as we refer to parent then.. BR, Erwin RE: Lost object changes - workaround? - Thomas - 25.10.2016 As iframe. I didn't know there's any other option. RE: Lost object changes - workaround? - Erwin van der Zwart - 25.10.2016 Hi Thomas, Use this as framework, the rest is up to you (; You have 4 object listeners now in this framework that respond on KNX values. Code: <!DOCTYPE html"> If you look in custom javascript section you can find a newer version of the object listener (something like grp.listen), but this one i had copy-paste ready (; BR, Erwin |