LogicMachine Forum
Script from specific part of a 6-byte? - Printable Version

+- LogicMachine 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: Script from specific part of a 6-byte? (/showthread.php?tid=6299)



Script from specific part of a 6-byte? - TobiasA - 11.02.2026

Hello!
I want to create a script that reads/checks a few groupadresses that are 6-byte and only look for a specific part of the 6-byte and if that part is '30'.

Then make an OR-gate that asks if any of my groupadresses shows 30 in the specific byte [6] send out true to a new groupadress else false.

See attached pictures. In logicmachine it is recorded as 'LTRF 3'. And in KNX it is shown as '30'.

Either a persistant script or I need the 6-byte adresses to start the other script that checks for the right byte.

I have tried for a while but cant come up with a solution!
Hope you understand my question.

Thanks for any help.  Smile

Best regards,
Tobias


RE: Script from specific part of a 6-byte? - admin - 11.02.2026

Add dalitest tag to all DALI test result group addresses. Create an event script, attach it to dalitest tag. Change 1/1/1 to your error status group address. Make sure that error status address is not tagged.

Code:
objects = grp.tag('dalitest')

err = false

for _, object in ipairs(objects) do
  ltrf = object.value.ltrf
  if ltrf == 3 or ltrf == 4 then
    err = true
    break
  end
end

grp.checkupdate('1/1/1', err)



RE: Script from specific part of a 6-byte? - TobiasA - 12.02.2026

Thanks for the help so far!

I cant get the event script to start. I see my dali-statuses coming in but my scrift wont activate.
What have I done wrong? See attached pictures.

Best regards,
Tobias


RE: Script from specific part of a 6-byte? - admin - 12.02.2026

Your event script is not attached to a tag. Go to Scripting > Event-based. Click the relevant script and select the correct tag in "Group address / tag" field.


RE: Script from specific part of a 6-byte? - TobiasA - 12.02.2026

I see, I did that now. Didnt know how to "attach a tag". Thanks alot.
But sadly I still dont see a reaction in my script when my dali-statuses activates and are tagged to my script.


RE: Script from specific part of a 6-byte? - admin - 12.02.2026

For the status object to change at least on of the test results must report an error.


RE: Script from specific part of a 6-byte? - TobiasA - 12.02.2026

Ofcourse! I thought I would get an update even if no one showed an error. But I tested again with an error and it works, the scripts sends an error (true) and when I then remove the error the scripts sends false.

Seems to be working like I want.

Thanks so much for your time and help! You saved me.