Logic Machine Forum
aycontrol and status of lights! - 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: aycontrol and status of lights! (/showthread.php?tid=252)



aycontrol and status of lights! - phongvucba - 23.03.2016

Has anyone used LM3 and aycontrol?

  Aycontrol it can not obtain the status of the lights at the start.
Has anyone solved it?
I thank so much...everyone.!  Heart Heart Heart


RE: aycontrol and status of lights! - Erwin van der Zwart - 23.03.2016

Hi,

Objects inside LM are default without 'read' flag.

You can add this as a event-based script on your (status) object(s) to make it respond on a read request.

Use TAG to run it on multiple objects from single script

Don't forgot to enable the checkbox 'Execute on group read' to have the script triggered on a read request.

Code:
-- only reply to group read requests
if event.type == 'groupread' then
   obj = grp.find(event.dst)
   -- object found and has datatype set
   if obj and obj.decoded then
      grp.response(event.dst, obj.value, obj.datatype)
   end
end

See http://forum.logicmachine.net/showthread.php?tid=18&highlight=groupread for source

BR,

Erwin van der Zwart


RE: aycontrol and status of lights! - phongvucba - 25.03.2016

I do not understand !
You can make me a little example?

Example: Address lamp is (1/1/1 and 1/1/2 and 1/1/3)
Now I want to make  it Response  on a read request . (1/1/1, 1/1/2, 1/1/3).
'Group read' What is?
,' Event.dst ' what is?

You can send me a backup LM with this content?
I'm so grateful to everyone who helped.
Sad Confused

I do not understand !
You can make me a little example?

Example: Address lamp is (1/1/1 and 1/1/2 and 1/1/3)
Now I want to make  it Response  on a read request . (1/1/1, 1/1/2, 1/1/3).
'Group read' What is?
,' Event.dst ' what is?

You can send me a backup LM with this content?
I'm so grateful to everyone who helped.
Sad Confused


RE: aycontrol and status of lights! - Erwin van der Zwart - 26.03.2016

Hi,

Normaly you don't need the script if you get feedback from KNX devices. The script is most of the time only needed when reading internal objects from LM.

First you need to check your read flags of your KNX object "(1) in the screenshot". As i see in your description you use your switching object also as the feedback object.
I would never do it like that and use the feedback object(s) of the device. This way you have a real status feedback and you know for sure the action is executed by the actuator.
If you use the feedback object of the actuator make sure to set them as 'active feedback' to have it send telegrams on changes.

If the object is set to multiple group adresses make sure the send flag (S) is set to the correct group address you want the response send back to.  "(2) in the screenshot"

The read flag for switching objects is normaly default disabled. Make sure you enable the read flag if you wnat the object to response on a read request.
But again, i would always use the status object of the device..  "(3) in the screenshot"

I also created a small project so you can see how to use the response script on read response for internal objects.

Some additional information on your questions:

groupread is the type of the event, this way we can determine if the telegram is a read or write action. If type is groupwrite we don't want to respnse withe the current object value.

event.dst is one of the fields (dst) in the event table, this field holds the group address of the event, this way we know what address we need to send the reply back to.

Succes (;

BR,

Erwin van der Zwart


RE: aycontrol and status of lights! - phongvucba - 26.03.2016

Sad
My inside cabinet, only LM3.
I use 16-channel Digital output for light.
so on the ETS only LM3. without any of the actuator.
"The feedback object (s) of the device", this is not possible, because I do not have any actuator.
Meanwhile, Aycontrol can not read the status of 16 digital output/
thank so much Erwin van der Zwart!


RE: aycontrol and status of lights! - Erwin van der Zwart - 26.03.2016

Hi,

Okay, that is also posible (: This means you only have internal objects.

Then you should use the script i put
inside the back-up from previous post.

BR, 

Erwin


RE: aycontrol and status of lights! - phongvucba - 29.03.2016

very very thank so much!
i have do it!
i love everyone...Smile)


RE: aycontrol and status of lights! - davidchispas - 18.12.2020

Hello, how can I get LM to respond to a request to read an object? I have a screen that when it restarts it makes a request to read objects, and some of them are only in LM.


RE: aycontrol and status of lights! - admin - 18.12.2020

See this: https://forum.logicmachine.net/showthread.php?tid=1720