Logic Machine Forum
Multiple listening addresses - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Multiple listening addresses (/showthread.php?tid=1337)



Multiple listening addresses - ncgnick - 15.04.2018

A KNX object can be connected to multiple -same type Group addresses. One of them has sending property. In many cases this is essential. How can we achieve the same goal with logic machine? A feedback group address is not always possible. One solution is  to write some short of LUA for each object but this will make the project complicated and unreadable. A direct input of listening only addresses for an object would be very helpful.

Thanks


RE: Multiple listening addresses - Daniel - 16.04.2018

Hi
In what case do you need this?
Script only. Use tags to make it simpler.
BR


RE: Multiple listening addresses - buuuudzik - 16.04.2018

I think this post can be helpful for you and it will be the most efficient way.

https://forum.logicmachine.net/showthread.php?tid=539&pid=2945#pid2945


RE: Multiple listening addresses - Daniel - 16.04.2018

I would do it like that.

Add tag to listening address and then create event script triggered from this tag and use this.

Code:
grp.update('1/1/1', event.getvalue())

Where the 1/1/1 is the group you want to update.  Last sent telegram will be updated to this group.

BR


RE: Multiple listening addresses - ncgnick - 16.04.2018

Thank you all
All that was the obvious reaction from my side.
It would be easier if there was a straight forward procedure. This would keep the project more readable
Just think of a project with 5000 GAs and a central function switching off everything. I wouldn't even think of such a solution and I wouldn't dare to let all the feedbacks pass through all the line couplers and routers just for the visualization
Developers, please consider this functionality in future firmware releases


RE: Multiple listening addresses - Daniel - 16.04.2018

(16.04.2018, 13:55)ncgnick Wrote: Thank you all
All that was the obvious reaction from my side.
It would be easier if there was a straight forward procedure. This would keep the project more readable
Just think of a project with 5000 GAs and a central function switching off everything. I wouldn't even think of such a solution and I wouldn't dare to let all the feedbacks pass through all the line couplers and routers just for the visualization
Developers, please consider this functionality in future firmware releases

In that case you need other way around.
Tag all your local status objects.
Create event based script on your central group and paste this code
Code:
value = event.getvalue()
myobjects = grp.tag('YourTag')
myobjects:update(value)
Change 'YourTag' to your tag.
BR


RE: Multiple listening addresses - ncgnick - 16.04.2018

(16.04.2018, 15:32)Daniel. Wrote:
(16.04.2018, 13:55)ncgnick Wrote: Thank you all
All that was the obvious reaction from my side.
It would be easier if there was a straight forward procedure. This would keep the project more readable
Just think of a project with 5000 GAs and a central function switching off everything. I wouldn't even think of such a solution and I wouldn't dare to let all the feedbacks pass through all the line couplers and routers just for the visualization
Developers, please consider this functionality in future firmware releases

In that case you need other way around.
Tag all your local status objects.
Create event based script on your central group and paste this code
Code:
value = event.getvalue()
myobjects = grp.tag('YourTag')
myobjects:update(value)
Change 'YourTag' to your tag.
BR
Thanks Daniel
I must admit that this is more efficient than my solution which was close to that but I built the object list manually.
I like efficient code. This solution contributes also the documentation because one can find the general function members easily


RE: Multiple listening addresses - Erwin van der Zwart - 16.04.2018

Hi,

If you like efficient code you can do also this (:
Code:
grp.tag('YourTag'):update(event.getvalue())
BR,

Erwin


RE: Multiple listening addresses - ncgnick - 17.04.2018

(16.04.2018, 20:52)Erwin van der Zwart Wrote: Hi,

If you like efficient code you can do also this (:
Code:
grp.tag('YourTag'):update(event.getvalue())
BR,

Erwin

Thanks, that was my first reaction when I applied Daniel's solution. "Bad" habits inherited from embedded programming I am doing mostly. Smile