Seite 1 von 1

#1 DOMIQ RS-232 integration with D-S2G-1 module

Verfasst: Mo 3. Okt 2011, 09:54
von lcn_iberica
Hi everybody,

Is there any manual/tutorial of how to integrate LCN with other subsystems via RS-232 using DOMIQ's D-S2G-1 module? Which tab in admin/config tool shall be used? Does it have to be done via LUA scripting? :confused:

Danke schön. :)

#2 RE: DOMIQ RS-232 integration with D-S2G-1 module

Verfasst: Mo 3. Okt 2011, 20:24
von DOMIQ
Hello! In a week or two we will publish detailed tutorial about using SG modules to integrate with Nuvo Multiroom system.
As a quick start, you can also use it directly through Events.

All received lines appear as LE.SER.line.1
If you want to send something, send it to channel LC.SER.line.1

We introduced LE and LC prefixes in order to filter all traffic from reaching all Remotes. More advanced use is done with Logic:

Code: Alles auswählen

ser = use 'SER.line.1'

function ser:onchange(data)
  print("Received: "..data)
  ser:send("Pong")
end

ser:send("Ping")

Tutorial will also include use of parser.lua, which makes it very easy to create protocol handlers based on regular expressions:

Code: Alles auswählen

pamp = parser()
pamp:add([[#Z(%d),ON,SRC(%d),VOL(%d+),DND(%d),LOCK(%d)]],function(z,src,vol,dnd,lock)
    local prefix="NUVO."..z.."."
    set(prefix.."vol",vol)
    set(prefix.."src",src)
    set(prefix.."act",1)
    zones[tonumber(z)] = tonumber(src)
end)

We also added functions get and set - they allow direct manipulation of state and let you implement "virtual" devices like NUVO above.

#3 RE: DOMIQ RS-232 integration with D-S2G-1 module

Verfasst: Di 4. Okt 2011, 09:42
von lcn_iberica
So then, integration is done via the "LOGIC" tab and LUA scripting, isn't it?

Can you tell us about some small guide/tutorial of LUA? Or will there be a small tutorial on DOMIQ website with the main concepts to do scripts for DOMIQ with LUA? That would be great. :thumbup:

Thanks. :rolleyes:

#4 RE: DOMIQ RS-232 integration with D-S2G-1 module

Verfasst: Di 4. Okt 2011, 18:44
von DOMIQ
Polish version of the tutorial is now online, it will take few days to finish translation...