Home
LogicMachine3 Re:actor manual here
Contents
1. 7 3 Touch visualization Touch visualization is designed for iPhone 1Pod iPad Android touch screen devices All objects which are added in Logic Machine configuration by default are visible in touch visualization 1f there is no Hide in touch option enabled There are three access levels read write admin Read only Write viscontrol viscontrol Write admin level visadmin visadmin 110 The main window is Building view where you can choose which Floor from which Building to control Once you choose the floor all objects which are assigned to it are listed and can be controlled lt Dining room gt Temperature 27 0 27C 2 Go to Trend logs gt Lamp2 Lamp2 EA Lamp2 e Lamp2 Launching visualization on touch device 1Pad in this case Make sure your iPad is connected wirelessly to the Logic Machine either through separate access point or directly to Logic Machine s USB WiFi adapter In the browser enter Logic Machine s IP default 192 168 0 10 Click on the Touch Visualization icon Save the application as permanent shortcut in your iPad 111 4 System configuration System configuration allows managing router functionality on KNX EIB Logic Machine as well as do access control management upgrade firmware see network and system status and others System Network Services Status Help
2. 3 114 4 4 REBOOT LOGIC MACHINE Eod nudi Unidad 114 4 5 SHULDOWN LOGIC ______ ___ ______ L D LS 114 4 6 INTEREACBECONEIGURATION tede gt 115 01 Ethernet Garg erapos seed o d EROR EE DEAE Eee Fee ea n 116 4 7 ROUTING VP TT ERQ 117 DI pec 117 dq oS SPLIT OUI et E coe eL I eMe les 117 4 8 AU S e bn ts ec adn 118 4 9 a 118 4 10 SYSTEM MONITORING 119 4 11 IND 6 LR RN IR T T E ENTM S 119 4 12 E AE S L O TOTO 120 4 13 NETWORK SATUS utes 66 dle a egt uM 120 4 14 NETWORK 121 4 15 ed HOME RC TNR T _ _ _____ 121 4 16 RUNNING PROCESSES dort QUE TIS Codes ________ _ _ _ __ _ 122 USER MODE SCHEDUDBDENRS 123 S TEENS EM I MN MEM M MM E A E __ 6___ 123 3 2 HOUDA RR HC ER 124 TREND LOGS cc M 125 MODBUS RTU TCP INTERCONNECTION WITH LM X2
3. eee eee eee eerte 127 7 1 _ _ 6 6_6 __ _____6____ 127 T2 VISUALIZING MODBUS OBJECTS RR od Pans uut ene p peso a o oM a e ea a eau eto S 128 7 23 USAGEBRXAMPEETMODBUS sateen ____ ____ 128 7 4 USAGE EXAMPLE MODBUS RTU tert dot loser ehe basta eo ares dea Soi nnda 129 T MODBUS SLAVE ea vele bc edes Ert eret ed 130 7 6 MODBUS WORKING WITH SEVERAL SLAVES ON THE SAME RS485 CONNECTION ecce 133 6 BACNETIP INTERCONNECTION WITH LM Z2 22 cccccccccccccccccccccccccccccccccccccccccccccccccccccscccccccccees 136 7 ENOCEAN INTERCONNECTION WITH REACTOR 138 41 PNOGEAN IN TEREACES Ee 138 2 ENOCEANIO MAPPING 136 7 3 TO ENOCEANIMAPPING E eps UE LL 140 8 DMX INTERCONNECTION WITH END 142 8 1 8 NRI EU NR RIETI _ _ RA 144 9 3GMODEM CONNECTION WITH LM2 eeeesvvicctcscoee vc eR Fee Pee PEE eue aee Coa Ve EE Ges eene 146 9 ra 146 9 2 SNIS HANDLER PROGRAM
4. Yahoo weather f 11 28 AM Yahoo weather 11 27 AM Yahoo weather 11 27 AM Yahoo weather 11 27 AM Yahoo weather 11 27 AM Yahoo weather f 11 27 AM Yahoo weather 11 27 AM Yahoo weather 11 26 AM Yahoo weather 11 26 AM Yahoo weather 11 26 AM Yahoo weather 11 26 AM Yahoo weather 11 26 AM Yahoo weather 11 26 AM Yahoo weather 11 25 AM Yahoo weather 11 25 AM Yahoo weather 11 25 AM gig E Error tab content by RSS RSS can be used to read Error tab content as well In this case the URL would look like http remote remote 192 168 1 21 1 cgi bin scada remote request cgi m rss amp r errors 159 Login Password for remote RSS requests Login and password can be changed in System Configuration gt System gt User access 2 Admin Remote tab User access Admin Remote Visualization Login admin Password ses Repeat password Login remote Password Repeat password 160
5. 18 QUICK STARTUP 20 DEFAULT IP CONBIGURA toad tdt A 20 DISCOVER LOGIC MACHINE IP ADDRES S a D indi bine 22 FIRMWARE UPGRADE vested quo Up redisse uu dude dS ona ua depu din tula posses tam da cei UD 23 LOGIC MACHINE FOR KNX EIB NETWORK CONFIGURATION MANAGEMENT WITH ETS eene 24 KNX ANDIF ROUTER SEE TINGS 4 gessi uet med ae 2 QUICK GUIDE CREATE VISUALIZATION FOR dco se epa ineo su 3l GRAPHICAL USER INTERFACE LOGIN exec ce veu sa aea D poser 36 LLOGI MACHINE CONFIGURATION sernai ena eo pe paa e e evo ue eI o aerae aua era oa ea eoe ve dev epu cocos 37 1 1 REACTOR d e Dedi dolut A 38 Dd C UN 39 qur see eae 41 Dd 5 REVET iia 42 Pd ERU 43 rc 47 De Me WORDEN tube dotar ese as tas esse t fte EI LEE io d 47 F2 Event based SCriPUNE sess vis t t tem or Febr D OP PU 50 Jorge KEAN STIP O
6. Alerts Logs Error log Help Error time 22 02 2013 09 29 51 21 02 2013 06 08 46 16 02 2013 07 12 08 15 02 2013 23 51 55 12 02 2013 15 23 39 11 02 2013 18 48 30 11 022013 17 47 40 08 02 2013 20 00 02 nn 349 49 69 44 Script name init script weather_data_Yahoo weather_data_Yahoo weather_data_Yahoo init script init script init script event Volume down 4 4 Page Error description Line 6 attempt to index global temperature a nil value Line 20 attempt to index field current a nil value Line 20 attempt to index field current a nil value Line 20 attempt to index field current a nil value Line 6 attempt to index global temperature a nil value Line 6 attempt to index global temperature a nil value Line 6 attempt to index global temperature a nil value cannot open lib genohm scada scripting 57 lua No such file or directory Lina 2 nennt ta inda alahal amnarntura missale lors n Displaying errors 1 25 of 200 1 13 Logs Logs can be used for scripting code debugging The log messages appear defined by log function 106 15 05 2012 14 20 33 15 05 2012 14 20 28 15 05 2012 14 20 23 15 05 2012 14 20 18 arg 1 table f2 number 20 1 number 10 arg 2 number 127 arg 3 string test arg 1 table f2 number 20
7. maximum output value PWM period seconds pulse width modulation period Comments comment of the object VVVVVVVV WV 40 1 1 2 Analog output Analog output can be used either as Ibyte 0 100906 or 2byte voltage output Analog output 1 X Name Analog output 1 Link to object 1 1 20 Analog output 1 io Status object 6 Lock object e Write to bus Mode i 0 100 1 byte Voltage 2 byte Minimum voltage 1 Maximum voltage 10 A Transition time seconds 2 a comments Save Cancel gt Name name of the port gt Link to object group address to link the object with By pressing the button the field will be automatically filled with the next free group address gt Status object status object group address gt Lock object lock object group address gt Write to bus defines either to write or not to bus on value change gt Mode 0 100 Lbyte Voltage 2byte output mode Minimum voltage minimum voltage value Maximum voltage maximum voltage value Transition time seconds transition time between two values Comments comment of the object 4 1 1 3 Resistive input Resistive input can be either PT 1000 temperature sensor PT100 temperature sensor or show the data in raw form Resistance input 1 x Name Resistance input 1 Link to object 1 1 21 Resistance input 1 Lock object Write to bus v Mode
8. MILAN ci uM o 51 Schedule SCIP 51 Bee 0 419 51 F20 OD ECET ON S Ea ads 22 1 2 7 Returned object functions group communication 53 Lxx COROUDOOIn nhtcanon Hn OH sen er v ____ 54 12 0 Oet TURCHOW CXOMDIGS e Eva 54 1 2 10 Data type Tuncuons data CBE s RR VD SER WEE t UU NIE 55 L2ll URP 55 storage POI m dete ORT 56 1 2 15 57 1 2 14 LOS UNCON EA aT ERE D D215 AlN ub E Reo 58 1 2 16 evt dn mde sow 58 1 2 17 58 1 2 18 TUN ms Lo p MM A 59 1 2 19 and outDut FUNCTIONS ied nre an VN 64 1 2 20 STI COM OLIN OMSL Sera 64 IAE JSON IDEA a rap Es ahs 65 12 22 ETE 65 12 29 ma rt uS 1 2 24 OUI UT
9. Help Plan x Levels Plans Layouts Widgets Parent Main gt Visible an imm n Duplicate Move up Move down Name r Main Foon is new Usermode Touch Layout Mi ER 9 o lim Plan Usermode Touch Usermode visualization Show Y o Touch visualization Show m Background image lv Background color FFFFFF Repeat background image Admin only access Save Add new level Version 20130816 CPU IO 24 Memory 15 22 Add objects to newly created visualization map After the building and floor structure is defined in Buildings tab it is visualized in Visualization tab Controlled and monitored objects can be added and managed in this section Both side bars can be minimized by pressing on left right arrow icon making the map more visible especially on small displays Q 192 168 1 211 cgi bin scada index cg whl Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization icons Utilities Alerts Logs Error log Help Buildings Floor plan editor 8 house gt SEE EEEE EEEE Object E boiler j LI 252 Main object 9 Status object Use main object amp Custom name g E 3 Read only Hide in touch Sort order Hide background Icon No icon text only x 2 5 t lt m o 5 Floor link 8 4 5 1 Camera 3 raph 1 Text lab
10. bytes from 192 168 1 188 seq 2 ttl 64 time 8 383 ms bytes from 192 168 1 188 5 3 ttl 64 time 8 385 ms bytes from 192 168 1 188 seg 3 ttl 64 time 8 385 ms 192 168 1 188 ping statistics 5 packets transmitted 5 packets received 2 packet loss round trip min avg max 8 383 8 394 8 432 ms 4 15 System log Operating system log is available in Status gt System log x System log Feb 22 12 59 01 LogicMachine cron info crond 620 USER root pid 10291 cmd lua lib genohm is gt Feb 22 12 59 01 LogicMachine cron info crond 620 USER root pid 10290 cmd lua lib genohm Feb 22 12 58 01 LogicMachine cron info crond 620 USER root pid 10247 cmd lua lib genohm Feb 22 12 58 01 LogicMachine cron info crond 620 USER root pid 10246 cmd lua lib genohm Feb 22 12 57 01 LogicMachine cron info crond 620 USER root pid 10210 cmd lua lib genohm Feb 22 12 57 01 LogicMachine cron info crond 620 crond USER root pid 10209 cmd lua lib genohm Feb 22 12 56 02 LogicMachine cron info crond 620 crond USER root pid 10168 cmd lua lib genohm Feb 22 12 56 02 LogicMachine cron info crond 620 crond USER root pid 10167 cmd lua lib genohm 121 4 16 Running processes System running processes can be seen in Status Running processes window Funning processes x PID Command 3 1 init e F 2 kthreadd e 3 ksoftirgd 0 9 4 Lkworker 0
11. 1000 2 7 100 RAW 2 Send delta 1 Send timer seconds 73 Value compensation 0 Comments Cancel gt Name name of the port gt Link to object group address to link the object with By pressing the button the field will be automatically filled with the next free group address gt Status object status object group address gt Lock object lock object group address Write to bus defines either to write or not to bus on value change gt Mode PT1000 PT100 RAW type of input sensor Send delta send the data upon specific delta value has changed Send timer seconds time interval to send the reading Value compensation compensation of the value Comments comment of the object 42 1 1 4 Analog input Analog inputs can be used either as Voltage Binary On Off Binary Short Long or Step dimmer Voltage input Analog input 1 x Name Analog input 1 Link to object 1 1 22 Analog input 1 Yo Lock object Write to bus Fal Mode Voltage Binary On Off Binary Short Long Step dimmer Send delta 2 Send timer seconds Value compensation 0 Comments Sawe Cancel gt Name name of the port Link to object group address to link the object with By pressing the S button the field will be automatically filled with the next free group address Status object status object group address Lock o
12. 67 22 29 Mathematical TURCHORHS ES Dre aD M eb ebd 66 1 2 26 Tube quan DUO TOS ossia eite POE cod cM TOO UN 70 I2 25 OPEN ESISTEM 70 1 2 20 Extended neon HET tuf 72 73 1 2 30 COMMON FUNCTIONS 74 1 2 SAFUO SOF CIT HN 74 2 24 74 1 3 a odds 76 OPOPA NE EE NE 76 122 papae 77 Laa Chane TIC ODIOCDSIale ied crm pd oui a de dere bana e e 78 lO ODICCECONIEOL DOI a ed i 79 DONC MA URDU TU 79 1 4 OBIECT 80 Like EAPO TOPS RO E Ua e cu Cane 81 1 5 SCHEDULER 84 Lads Add new SCHOO CH ost ret aca dod oa aa a d Lalo orte t t Aou d let 84 MSOC OUICT ECVE ON e 85 Laa SCH CAUCE TOI AVS p e e rie es REA OI 82 1 6 rasa MT 86 86 1 7 VIS
13. asiest way to create complex installation Resistive sensors Analog Inputs RS485 1 RS485 2 24V Main KNX 123 4 5 6 1 2 3 4 5 6 7 aa a 15 Resistive sensor input 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 1 2 Digital Outputs em Re actor enocean s LogcMachine est way to create complex installation Resistive sensors Analag Inputs RS5485 5485 2 24V Main 123458 123 4 8 GNDA 2222925083 Analog output 01 02 03 04 05 06 07 09 10 11 12 13 14 15 1611 2 Digital Outputs pias actor enoceam e LogicMachine to create complex installat Resistive sensors Analog Inputs 5485 1 RS9485 2 24V Main 1232459 12 2 4 5 6 7 8 E Factory default discover IP There is a reset button on the side of Logic Machine 2 You can either reboot the device by pressing this button or reset the configuration to factory defaults e Press and hold for lt 10 sec reboot the device e Press and hold for gt 10 sec reset networking with IP to factory default e Press and hold for gt 10 sec and again press and hold for gt 10 sec full reset of configuration to factory defaults There is also another possibility to discover IP address LM3 has built in zeroconf utility by default so using the following applications you can find out the IP Windows ServiceBrowser Linux PC Avahi Android ZeroConf Browser 105 Disc
14. 0 e 5 Ewarker u t E rcu_kthread e 7 khelper m 5 kwarker u 1 w 122 5 User mode schedulers User mode schedulers contains user friendly interface for end user to manage scheduler tasks for example specify thermostat values depending of the day of the week time and holidays 5 1 Events Each scheduler is mapped to specific group address in administration panel see section 1 4 of this manual lt Outdoor lamp gt Outdoor lamp Status active period 1 January 31 December G Edit Add event AC v Event is active Value Run at Run at Holidays Light off Light off 13 00 Sa Su Holiday 12 00 v Tu We Th Fr Sa Su Holiday Value Light on Save Cancel When adding the new task for specific scheduler you can specify day of the week start time value to send to the object 123 5 2 Holidays In Holidays special days are specified which are then used adding new events lt Holidays gt Name Date Add holiday New Year 31 December 2013 Edit Delete Holidays New holiday 24 October Gc Edit Delete Outdoor lamp AC Click on Add new holiday button to specify a holiday lt Holidays gt Outdoor lamp Add holiday Name Date AC Name New Year 31 December 2013 New holiday Holidays Date New holiday 24 October October 2013 We Th Fr Sa Su gt 3 2 3 4 gt B T amp 9 WE A 12 18 14 MEN 16 17 15 19 20 21 22 23 24 25 26 2T 28 29 30
15. Save Cancel e Control type type of the visual control element o Slider or e o BDurect input Step e 5 12 Minimum value Maximum value 1 3 3 Change the object state In the object list by pressing on the button you can change the state of the object The appearance of the New value depends on what visualization parameters are set for specific object Set object value Set object value x Object name Weather T High Object name Output 1 Group address Sf 1 5 Group address 1211 Data type 09 2 byte floating point Data type 01 001 switch Mew value 21 Mew value false Save Cancel cave Cancel 1 3 4 Custom values If special value naming is necessary use this icon to set it up only for Boolean and Integer data types 78 Custom values x Default text Bedroom light Object value 0 Display text Light off e Object value 1 Display text Light on e cave Cancel 1 3 5 Object control bar new object Auto update enabled Fj 4 Page 2 2 Add new object Manually add new object to the list Auto update enabled Specifies either the object list is updated automatically or not Clear Clear the list of group addresses Next Previous page move to next or previous page Refresh refresh the object list 1 3 6 Filter objects On the left side of the object list there is filtering
16. Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Enocean Alerts Logs Error log e Help Internall O Number Name Linked to object Events Active Input output value Set value Configuration Lock Log Digital output 1 1 1 4 Digital output 1 B amp Mode Binary Output normal F gt Digital output 2 1 1 5 Digital output 2 4 amp Mode Binary Output normal ri an Digital output 3 1 1 6 Digital output 3 5 amp Mode Binary Output normal Digital output 4 1 1 7 Digital output 4 gj amp Mode Binary Output normal 7 F Digital output 5 1 1 8 Digital output 5 5 amp Mode Binary Output normal Digital output 6 1 1 9 Digital output 6 gj Mode Binary Output normal El 7 Digital output 7 1 1 10 Digital output 7 gj amp Mode Binary Output normal Digital output 8 1 1 11 Digital output 8 amp Mode Binary Output normal 7 an Digital output 9 1 1 12 Digital output 9 5 Mode Binary Output normal rj El 10 Digital output 10 1 1 13 Digital output 10 B amp Mode Binary Output normal F F EN Digital output 11 1 1 14 Digital output 11 B amp Mode Binary Output normal gt Digital output
17. boolean No EnOcean FFF63C room ead Fan Auto 01 1 bit boolean EnOcean 00034 es Name or group address Je Data type Paras EA IEEE EN mE 3 rus Not specified M room Scones 01 4 bit boolean EnOcean 00034 Tags match any room panel Set Point 09 2 byte floating point EnOcean 00034 room panel Temperature 09 2 byte floating point EnOcean 00034 399 propi 3999 OOO0OO0OOO0OO0OO LED Dimmer 3 05 001 scale 139 7 3 to EnOcean mapping You should click on Add new device button to add EnOcean device which will be communicated from specific KNX object Logic Machine Neighbours Select neichbou start page Enocean KNX EnOcean Address Device name Profile nterfare ast telegram Mapping Teach in Device x Interface LOCAL BaseID FF85CA80 Address offset 0 Device name Profile Save Cancel 2 Add new device Clea Page 10011 No devices to display Once the device is added you should pair it with specific device in EnOcean network press Tech in button Note EnOcean device should be set in learning mode in order to pair it successfully Logic Machine Enocean KNX EnOcean Address Device name Profile Interface Last telegram Mapping Teach in FFFG6EFS1 Pushbutton 05 02 01 Rocker Switch 2 Rocker BAP 192 168 145 Teach in x Telegram transmitted successfully OK Add new device Page 1 of 1 Displaying devices 1 1 of 1
18. f1 number 10 arg 2 number 127 arg 3 string test arg 1 table f2 number 20 f1 number 10 arg 2 number 127 arg 3 string test arg 1 table 12 number 20 f1 number 10 arg 2 number 127 arg 3 string test 4 Jota 107 1 14 Help Documentation for scripting syntaxes is displayed in Help tab 192 168 1 211 cg bin scada index cgi Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization icans Utilities E im m aa Error log amp X Help Note all user scripts share the same data storage Make sure that same keys Help topics gt not used to store different types of data SS Scripting Basics and script types Examples Object functions Data type functions The following examples shows the basic syntax of storage set Result will return Common functions storage alerts boolean true since the passed parameters are correct Scheduled scripting date time format 1 1 E Extended function library result storage 3et my stored value l l2 21 This example will return false as the result because we are trying to store function which is nat possible testin function i t return t t end result sthrsge setIi mv stoPBdowalue testin this will result in The following examples shows the basic syntax of storage get
19. Assuming that key value was nat found first call will return nil while second call will return number 0 which was specified as a default value result gtorage get umy stored 1 _1 returna nil if value 1 not to Version 20101207 Embedded Systems 2010 108 2 User mode visualization User mode visualization contains created visualization maps There are three access levels read write admin password access can be also disabled Read only Write viscontrol viscontrol Write admin level visadmin visadmin Main M Dining room Bedroom nj wool Jejog 1 109 2 1 Custom design Usermode visualization Through Custom CSS styles it is possible to create different type of visualization maps 1 2 Topwep 1 2 BbIKA bpa 3 BbIKA A WX BeHTMAb ale ANT Sete TB SS Ewe b SSS
20. Filter Object parameters x Set v Name or group address Object name Button 4 Group address Data type esie Data type 01 001 switch Y Logging enabled F Tags match any Export object Tags Current value on Object comments BACnet visible Save Cancel 5 666066600060660006000006000 E Filter Reset Add new object Auto update enabled j Clear Page 1 1072 PLI Displaying objects 1 25 of 31 Version 20120228 c Embedded Systems 2011 136 Note BACnet service restart and Reinitialize Device requests will reload all objects priority array will be reset to NULL 137 7 EnOcean interconnection with Reactor Logic Machine3 Reactor has EnOcean transceiver built in with no limitation on supported count of devices 7 1 EnQOcean interfaces EnOcean interface Base address can be found in Enocean 2 Interfaces tab Logic Machine Neighbours Select neighbour Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Alerts Logs Error log Help Interfaces KNX EnOcean ID Base address LOCAL FF8SCA80 Rescan Version 20130927 CPU IO 0 35 0 23 0 24 Memory 8 7 2 KNX mapping All
21. KNX and IP Router settings KNX specific configuration is located in Network configuration gt Network gt KNX connection window KNX connection x General SRC filter DST group filter DST indiv filter Secure tunnel Mode TP UART ACK all group telegrams KNX address 15 15 255 KNX IP features v Multicast IP 224 0 23 12 Multicast TTL 1 Multicast interface eth Maximum telegrams in queue 100 General tab VV NN NN WV Mode TP UART IP Tunneling EIBnet IP Tunneling NAT mode EIBnet IP Routing KNX connection mode LogicMachine3 Re actor has TPUART interface by default built in Note If there is no KNX TP connected to the device it will automatically offer to switch to KNXnet IP qmode ACK all group telegrams acknowledge receipt of telegram to all group communication Parameter KNX corresponding interface in OS of the system KNX address KNX physical address of the device KNX IP features Use this device with KNX IP features e g for KN Xnet IP network configuration Multicast interface multicast interface to use when sending KNX telegrams to other KNX networks over TCP IP Multicast IP multicast IP address Maximum telegrams in queue count of maximum telegrams in the queue 27 Source filter tab KNX connection General SRC filter DST group filter DST indiv filter Secure tunnel SRC policy No filter I Address list One individual group address pe
22. Network usage for interface In 5 Kbps Switch to bytes s Out 0 Kbps AutoScale follow 4 1 Changing password The login and password configuration window is located in System gt User access 112 User access x User access x Admin Remote Visualization Admin Remote Visualization Login admin Password access Enabled mm Password e Read write access including admin only floors Repeat password dns Login visadmin Login remote Password PIE Repeat password Repeat password e Read write access except for admin only floors Login viscontrol Password Repeat password Read only access Login visview Password Repeat password OK Cancel Access control is separated in 3 tabs Admin Remote access parameters for Logic Machine Network Configuration RSS and XML Visualization access parameters for Touch and User mode visualization 4 2 Packages System gt Packages shows the packages installed in the system You can add new packaged by pressing on Packages x Package name Version avahi daemon 0 6 30 2 e base files 43 33 r30646 e busybox 1 15 3 3 4 e dropbear toes e 0 0 5 e Flashsysz 85 e genahm scada 20120419 9 haserl Theo Use e Ww Actions o 113 4 3 Upgrade firmware System gt Upgrade firmware is used to do a full upgrade of the system both OS part as well as Logic Machine
23. Only the following Lua data types are supported e boolean number e string e table storage set key value Sets new value for the given key Old value is overwritten Returns boolean as the result and an optional error string storage get key default Gets value for the given key or returns default value nil 1f not specified if key 1s not found in the data storage Note all user scripts share the same data storage Make sure that same keys are not used to store different types of data Examples e The following examples shows the basic syntax of storage set Result will return boolean true since the passed parameters are correct result storage set my stored value 1 E 12 21 e This example will return false as the result because we are trying to store a function which is not possible testfrefunction t return t t end W NO result storage set my stored value 2 testfin this will result in an error 56 The following examples shows the basic syntax of storage get Assuming that key value was not found first call will return nil while second call will return number 0 which was specified as a default value l result storage get my_stored_value_3 returns nil if value is not found 2 result storage get my stored value 3 0 returns if value is not found When storing tables make sure to check the returned result type Assume we have created a storage item with key test obje
24. Return values success decoded data as Lua variable type depends on data type value length in bytes error nil error string 1 2 11 Data types The following data types can be used for encoding and decoding of KNX data Data representation on Lua level and predefined constants in bold is given below 1 bit boolean dt bool boolean 2 bit 1 bit controlled dt bit2 number 4 bit 3 bit controlled dt bit4 number 1 byte ASCII character dt char string I byte unsigned integer dt uint8 number 1 byte signed integer dt int8 number 2 byte unsigned integer dt uint16 number 2 byte signed integer dt int16 number 2 byte floating point dt float16 number 3 byte time day dt time table with the following items o day number 0 7 o hour number 0 23 o minute number 0 59 o second number 0 59 3 byte date dt date table with the following items o day number 1 31 o month number 1 12 o year number 1990 2089 55 4 byte unsigned integer dt uint32 number 4 byte signed integer dt int32 number 4 byte floating point dt float32 number 4 byte access control dt access number currently not fully supported 14 byte ASCII string dt string string null characters 0 are discarded during decoding 1 2 12 Data storage function storage object provides persistent key value data storage for user scripts
25. changing object value in the gauge gt Data object KNX group address Size size of the gauge Custom name custom name for the object gt Read only make the gauge read only 98 8 Floor 1 ig Floor 2 ig Floor 3 B E Bungalow ig Cinema Room im Living Room Dressing Room lim Kitchen ig Conservatory fig w c im Room o Study fig Study 8 Guest House lum Bedroom lim Lounge fig Shower Room 3 C Study ig Study GJ 5 Layouts Widgets im test Data object Size Custom name Read only 1 1 5 temp 200 Add to plan Reset Save and reload plan Once the gauge parameters are defined press Add to plan button and newly created object will appear on the map You can move the object to the location it will be located Press on Save and reload plan button so the objects starts functioning 1 8 9 Frame 3 3 Main Dining room ig Bedroom Floor2 im Bedroom up 3 5 House 2 ig Kitchen E Layouts 3 5 Widgets am thermostat Plan width Plan height 4 i e gag i T E Source Url Width Height Custom name Hide in Touch Url 480 320 _ Add to plan_ Cancel Save and reload plan gt gt gt gt gt
26. configuration gt User mode visualization defined visualization maps with objects gt Touch visualization Visualization system for iPhone iPod iPad Android touch screen devices gt User mode schedulers User defined schedulers Trend logs Trends for data logs 36 1 Logic Machine configuration This 15 a home directory for Logic Machine configuration management The main menu consists of the following menus Reactor LM3 Re actor specific IO settings Scripting scripting repository management Objects list of KNX network objects Object logs KNX bus object historical logs Schedulers administrator interface for user mode schedulers Trend logs administrator interface for trend logs Vis structure building definition and image file upload Visualization Visualization management control and monitoring Vis icons icon management Utilities utilities including import from ETS reset object DB backup update system installation Alerts alert messages defined with alert function Logs log messages defined with og function Error log error messages in KNX bus Help documentation for scripting syntaxes 37 1 1 Reactor Reactor IO configuration and mapping to KNX is done under Reactor tab No additional software is needed to configure KNX mapping of IO ports Logic Machine Neighbours Select neighbour v Startpa Reactor Scripting Objects Object logs
27. d 1 2 lamp bath 01 001 switch on No p oe f AMO i di x 1441 temperature_room 09 2 byte floating 249 92 Yes E DA Q 1443 temperature boiler 09 2 byte floating 249 92 No E A Q Rn Enocean Fan speed 05 001 scale 100 No ALL Fiter Reset Add new abject Auto update enabled Ejciear 14 4 1 of 2 gt DI Displaying objects 1 25 of 40 Version 20110824 Embedded Systems 2011 31 Create floor structure and add objects to the map Connect to Logic Machine Logic Machine with default access parameters IP 192 168 0 10 login password admin admin gt Q 1921681213 WW Al QUE lt lt 2 2 1 v 4 Logic Network User mode Touch User mode Machine configuration visualization visualization schedulers Create building floor structure and add objects to the map In Vis structure menu the structure of the visualization is defined and visualization backgrounds are uploaded Use icon to add floor Select which item to add x Add second level Add plan Choose either to add as second floor level or add plan for this particular floor level Logic Machine Neighbours Select neighbour Iv Start page Reactor Scripting Objects Object logs Schedulers Trend logs Vie ctructura irnalizatian Wie _oranhice ltilitiac Enacaan Alarte Lanc Error log
28. end end return result end write single byte and convert to 8 bits function writebyte offset byte local bits for 1 8 do table insert bits bit band 1 bit rshift byte i 1 end mb writebits offset unpack bits end end local udp server init if not server then require socket server socket udp server setsockname 127 0 0 1 28016 server settimeout 1 remote command handler function cmd data local id cmd value ac addr offset command format id cmd value id cmd value unpack data split tonumber id or check if ac is valid ac aclist id if not ac then return end default offset offset id 1 152 on off if cmd ON or cmd OFF then mb writebits offset cmd ON temperature settings elseif cmd TEMP then value tonumber value value ok if value then calculate register offset and write encoded value offset id 1 156 mb writeregisters offset encodetemp value end operation mode elseif cmd MODE then value tonumber value verify bounds if 0 lt value and value lt 3 then convert to a c value and write writebyte offset 8 value 1 end fan speed elseif cmd SPEED then value tonumber value verify bounds if lt value and value lt 3 then convert to a c value and write writebyte offset 16 value 2 end end end end read
29. graph Auto open window graph window is automatically opened Hide background hide icon background 96 Once the graph parameters are defined press Add to plan button and newly created object will appear You can move the object to the location it will be located Note that while being in editing mode the object will not work Press on Save and reload plan button so the objects starts functioning Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis icons Utilities Alerts Logs Error log 1 F Object Plan link Camera Graph Data object Y Custom name Icon No icon text only Width 640 E Height 480 Number of points 10 Auto open window 7 Hide background 7 Add to plan Reset 2 Home Text label Floor 1 Floor 2 ig Floor 3 B 5 Bungalow lim Cinema Room Living Room Dressing Room im Kitchen ug Conservatory tml w c Utiltiy Room B E Study lia Study 8 E Guest House Bedroom Lounge lig Shower Room Study lig Study o 5 Layouts Widgets ig test lt gt lt gt lt gt lt 0 1 17 28 5117 28 5517 29 1217 29 1717 29 2217 29 2617 29 3117 29 3517 29 43 Gauge w Unlock current plan for editing 4 m r 1 8 6 Text Label Text labels can be added and moved across the visuali
30. gt gt Source Url Schedulers Trend logs frame source Url Source URL of the page to integrate Width width of the frame Height height of the frame Custom name custom name of the frame object External link external link URL when pressing on the image Hide in Touch defines either to hide frame in Touch visualization 99 urs Select neighbour im Dining room __ lis Bedroom B GyFloor2 li Bedroom up 8 3 House 2 im Kitchen Layouts Status active period 1 January 31 December Edit E Widgets MS thermostat Value Runat Add event Source Schedulers Light of X Delete n C Height 320 Light off G Edit X Delete Custom name Hide in Touch a ES Addtoplan Cancel Unlock current plan for editing 1 9 Vis graphics The list of predefined icons list of images and backgrounds is available in Vis graphics tab alarm bell off alarm bell on alarm off png alarm on png arrow alt dow arrow alt4eft arrow alt right arrow alt up p arrow down png arrow eft png arrow right png arrow up png 0 ON 9 back forward back forward blue off png blue on png camera png cdock alt off png dock alt on png dock off png clock on png d
31. json 22 require crc16 23 require socket 24 25 localip chunk chunks data 26 read interface data d data json pdecode io readproc if json 243 29 ifnot data ornot data ethO then 30 error cannot get interface data 3l end dus 33 ip header 34 HDL iphdrz 35 broadcast address 35 HDL bcastse data eth bcast Jd 150 Stor S9 40 41 42 43 44 45 46 47 48 49 50 Dl D2 934 54 dos 58 BU Bl 02 63 6G By 68 869 Ts Tos 14 returnnil crc daa split ip address into chunks enunks data stbhO inetaderE splict add ip address chunks fori 1 4 do chunk tonumber chunks i HDL iphdrzHDL iphdr String char chunk end end HDL decodesfunction packst locallen Geta SIG primary header ifpacket sub 5 14 HDL magicthen returnnil magic end Leading code lfpaeketisub l5 16 9SHDL lecodethen returnnil lcode 59 end get data Length and check against lenspacket byterlT 4 iflenandlen 16 packet len then 64 B5 returnnil len end get packet data and check crc date epacketisuD lT len 14 orcepacketibyite len 4 15 OxlOO packetibyte len 16 if crole6 data crcthen end return parsed packet Change HDL parameters in the function to correct ones 151 HDL destination ip d
32. line Use e g 1 1 or 1 1 to filter all addresses in the given line Note KNX IP features are required for filter to work gt DST indiv filter No filter Accept selected individual addresses Drop selected individual addresses policy to apply to the list of destination addresses Address list list of individual addresses One address per line Use e g 1 1 to filter all addresses in the given line Note KNX IP features should be on for filter to work 20 Secure tunnel tab You can make a secure tunnel between two KNX networks In comparison with standard tunnels which use UDP protocol this tunneling uses TCP what makes it very reliable thanks to package delivery acknowledgement This ensures that sender always knows if the package is delivered to the recipient KNX connection x General SRC filter DST group filter DST indiv filter Secure tunnel Secure tunnel Client m server IP Local IP Network mask Password Secure tunnel creates an encrypted network between several nodes Password must match for every node in a single network Local IP IP address of the node on the secure tunnel network Server IP real IP address of the server node Local IP and Server IP must be on different subnetworks Cancel Secure tunnel Disabled Client Server secure tunnel mode Server IP in case of secure client server IP should be specified here Local IP
33. local IP address Network mask network mask Password password 30 Quick guide create visualization for iPad PC Import objects Fastest way is to import ESF file from ETS in Utilities 2 Import ESF file Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization icons Utilities Enocean Alerts Logs Error log 7 Help Import ESF file Import ESF file ESF file Choose File No file chosen It will be necessary to set correct data type for some imported objects Existing objects wil not be overwritten Objects with the same name are considered duplicates and might not get imported Save Cancel Version 20110824 Embedded Systems 2011 Or connect LM to the bus and it will detect objects automatically in Objects tab once they are activated Objects can be added manually as well Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization icons Utilities Enocean Alerts Logs Error log Help Object Filter Group add Object name Data type Current value Logging en Tags Object comments Se Name or group address e E E EEO UE E actrees boolean 1 A 2 D 2 A 2 Not specified Tags match any 2 L2 A 2 14 lamp 01 001 switch on Yes
34. object visible by remote XML requests and in BACnet network 11 KNX BACnet gateway functionality 1s used Poll interval seconds perform automatic object read after some time interval Tags assign this object to some tag which can be later used in writing scripts for example All_lights_first_floor Current value Current value of the object Object comments Comment for the object VV WV There is a possibility to sort the objects by one of the following Name Group address Data type Current value Tags Comments 1 3 2 Object visualization parameters By pressing on the button of the corresponding object you can set specific visualization parameters for this type of object 1 bit Visualization params X Object Button 1 1 1 1 Control type Checkbox Toggle Checkbox ry rel e Control type type of the visual control element o Toggle o Checkbox 4 bit 3 bit controlled Visualization params X Object ttt 9311 Step size eg PU Save Cancel Step size step size for example for blinds control 2 bit 1 bit controlled 1 byte unsigned integer scale 1 byte signed integer 2 byte unsigned integer 2 byte signed integer 2 byte floating point temperature 4 byte unsigned integer 4 byte signed integer 4 byte floating point 77 Visualization params X Object Send always 30 2 2 3 Control type Slider Minimum value 0 ES Maximum value 100
35. of steps to use e g 3 steps 0 127 255 2 steps 5 3 number of channels to set 4 channels 3 94 first channel number 6 offset 1 8 fori offset channels do 9 v math random 0 steps 1 255 steps 1 l10 DMX set i math floor v Il end 145 9 3Gmodem connection with LM2 Logic Machine 3 has standard 3G modem driver built in Huawei and other vendor support Currently this can be used for SMS notifications only receiving and sending commands Further 3G router support will be added Command syntax a Write to bus W ALIAS VALUE b Read from bus R ALIAS On read request script will reply with SMS message containing current value of selected object ALIAS can be a Group address e g 1 1 1 b Name e g Obj1 If name contains spaces then it must be escaped usign double quotes e g Room Temperature NOTE a Object data type and name must be set in Objects tab Otherwise script won t be able to read and write to object b Only ASCII symbols are accepted in the message 9 1 Examples Binary write send the following SMS to switch kitchen lights on W 1 1 1 true Scaling write send the following SMS to set value 67 for red LED W LED1Red 67 Temperature floating point write send the following SMS to make setpoint in the living room to 22 5 degrees W Room Setpoint 22 5 Head send the following SMS to read the security panel value R 2 1 1 9 2 SMS ha
36. possible To perform the filtering type the name group address tag or specify the data type of the object and press on Filter button 79 Logic Machine Start page Scripting Objects Objectlogs Schedulers Trend logs Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Help Object filter Group Object name Data type Current Log Ex Tags Object comments Se 411 Button Play Pa 01 1 bit boolean 0 EnOcean 001ESE Name or group address y t 412 Button Nexttrack 01 1 bit boolean 0 7 Em 2 4 1 3 Button C Volume 01 1 bit boolean 0 7 7 EnOcean 001ESE amp 2 Q Data type 4 1 4 Button D Volume 01 1 bit boolean 1 001 5 E 2 Not specified Tags match any Eas gent Quat naw Duin aneale anaes ehe Moe ape le noting ioco Version 20130208 Embedded Systems 2013 1 4 Object logs Object historical telegrams are available in Object logs Once logging is enabled for object all it s further history will be logged Object log fiter g Log time Object add Type Source ad Objectname Decoded value Data type Object data numb Gb dsl 20 02 2013 14 18 21 1 16 read 15 15 255 temp 09 001 Temperature 20 02 2013 14 16 41
37. str sep Splits the given string into chunks by the given separator Returns Lua table knxlib decodeia indaddressa indaddressb Converts binary encoded individual address to Lua string This function accepts either one or two arguments interpreted as two single bytes knxlib decodega groupaddressa groupaddressb Converts binary encoded group adress to Lua string This function accepts either one or two arguments interpreted as two single bytes knxlib encodega groupaddress separate Converts Lua string to binary encoded group adress Returns group address a single Lua number when second argument 1s nil or false and two separate bytes otherwise ipairs t Returns three values an iterator function the table t and 0 so that the construction for i v in ipairs t do body end will iterate over the pairs 1 t 1 2 t 2 up to the first integer key absent from the table next table index Allows a program to traverse all fields of a table Its first argument is a table and its second argument is an index in this table next returns the next index of the table and its associated value When called with as its second argument next returns an initial index and its associated value When called with the last index or with ni in an empty table next returns nil If the second argument is absent then it 1s interpreted as nil In particular you can use next t to check whether a table is empty The order in which the in
38. telegrams received from EnOcean devices appears in Enocean 2KNX section Logic Machine Neighbours Select neighbour Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Enocean lt Logs Error log Help Interfaces EnOcean KNX KNX EnOcean ID Device name Profile Interface Last telegram Mapping 001B321B 2button 05 02 01 Rocker Switch 2 Rocker LOCAL 02 01 2001 06 56 57 Sap Q 00225472 4button 05 03 01 Rocker Switch 4 Buttons LOCAL 02 01 2001 06 56 59 amp Q Showing all devices 7 Clear j4 Page 1 of 1 aD Displaying devices 1 2 of 2 Version 20130927 CPU IO 0 36 0 27 0 25 Memory 8 Once some specific device has to be mapped to KNX the corresponding row has to be clicked and profile has to be chosen There are all main profiles predefined in the list Logic Machine Neighbours Select neighbour Startpage Jbjects ect loc e Trer e lies Enocean Alerts Logs Errorlog Help Interfaces EnOcean KNX canis ID Device name Device name 2button Mapping 00183218 2bullon Profile 05 02 01 Rocker Switch 2 Rocker gt ENT E 00225472 4button ae A 12001 06 56 59 05 03 01 Rocker Switch 4 Buttons 05 04 01 Key Card Activated Switch 05 10 00 Window Handle 3 06 00 01 Single Input Contact 107 02 01 Temperature Senso
39. this particular plan including background color and plan image if they are not defined separately for this specific plan Usermode visualization Show Show and make default Hide visibility for this particular plan 1n Usermode visualization Touch visualization Show Show and make default Hide visibility for this particular plan in Touch visualization Background image choose background image from the list added in Vis graphics 2 Images Backgrounds Background color choose background color of the plan Repeat background image either to show the image once or repeat it and fill the whole plan Admin only access enable admin only access for this floor VV VV WV When clicking on Background image the following window appears with background images which has to be added in Vis graphics gt Images Backgrounds in advance Select image x e apartment 2 jpq apartment3 jpg images jpg 88 You can duplicate the plan with all its objects and settings by pressing on icon Er Levels can be sorted by pressing and icons 1 7 1 Layouts Widgets Layouts are used as templates for further use when adding Levels in Levels Plans tab Layouts will not be visible from the Usermode Touch visualizations When you add any background objects to layouts level in Visualization they will automatically appear on all linked Levels Layout X Parent Layouts Name Background image Background color FFFFF
40. true false if script 1s found nil otherwise 1 2 21 SON library Note json is not loaded by default use require json before calling any functions from this library json encode value Converts Lua variable to JSON string Script execution 15 stopped in case of an error json pencode value Converts Lua variable to JSON string in protected mode returns nil on error json decode value Converts JSON string to Lua variable Script execution 15 stopped in case of an error json pdecode value Converts JSON string to Lua variable in protected mode returns nil on error 1 2 22 Conversion Compatibility layer mcore is an alias of cnv cnv strtohex str Converts given binary string to a hex encoded string cny hextostr hex keepnulls Converts given hex encoded string to a binary string NULL characters are ignored by default but can be included by setting second parameter to true cnv tonumber value Converts the given value to number using following rules numbers and valid numeric strings are treated as is boolean true is 1 boolean false is 0 everything else 1s nil cny hextoint hexvalue bytes Converts the given hex string to and integer of a given length in bytes cny inttohex intvalue bytes Converts the given integer to a hex string of given bytes 65 cnv strtohex str Converts the given binary string to a hex encoded string cnv hextostr hexstr Converts the given hex encoded string t
41. write is triggered for address 1 1 1 We want to send SMS to numbers 23335555 and 23335556 with 1 1 1 actual status l require socket 2S Glgent Ssocker ucpt 148 5 in the message field the number where SMS has to be send should be specified at the beginning 6 localmsg 23335555 1 1 1 changes its value to tonumber event datahex Jcllentssengto msg 127 08 0 1 12535 Ba 9 msg 23335556 1 1 1 changes its value to tonumber event datahex 10 c6112ent sendto umsg 127 0 0 1 12535 149 10 HDL protocol integration in Logic Machine 3 Note Please contact Embedded Systems team to receive a special package to integrate HDL support into your LM2 Once you have the file add it in Network configuration gt System gt Packages 10 1 HDL function Add HDL script in Scripting gt Tools gt User function library HDL destination ip dstipz 192 168 1 7 packet constant data magic HDLMIRACLE lcode string char OxAA OxAA Source device settings OO a Ur Srcsubnet 1 WO srcdevice 254 10 devicetype OxFFFE 11 command types 12 cmd 13 chanreg 0x0031 single channel regulate 14 chanregreply 0x0032 single channel regulate answerback 15 chanstat 0x0033 read status of single channel targets l6 chanstatreply 0x0034 single channel targets status answerback 15 1 185 193 20 HDL init fu uncetion 21 require
42. 1 1 46 read 15 15 255 temp 09 001 Temperature 20 02 2013 14 15 01 1 1 6 read 15 15 255 temp 09 001 Temperature ds 20 02 2013 14 13 21 1 1 6 read 15 15 255 temp 09 001 Temperature 3 id 20 02 2013 14 11 41 1 1 6 read 15 15 255 temp 09 001 Temperature 1 Name or group address 20 02 2013 14 10 01 1 1 6 read 15 15 255 temp 09 001 Temperature 20 02 2013 14 08 21 1 1 6 read 15 15 255 temp 09 001 Temperature Value 20 02 2013 14 06 41 1 16 read 15 15 255 temp 09 001 Temperature 20 02 2013 14 05 01 1 1 6 read 15 15 255 temp 09 001 Temperature 20 02 2013 14 03 21 1 1 6 read 15 15 255 temp 09 001 Temperature Source address 20 02 2013 14 01 41 1 1 6 read 15 15 255 temp 09 001 Temperature 20 02 2013 08 55 37 1 1 6 write 15 15 255 temp 42 09 001 Temperature 141A 20 02 2013 08 55 35 1 16 write 15 15 255 temp 43 09 001 Temperature 1433 Fiter Reset 14 4 1 of 44 Displaying logs 1 25 of 1002 Version 20130208 Embedded Systems 2013 Filtering is available when there is a need to find specific period information Start date start date and time for log filtering End date start date and time for log filtering Name or group address specific name or group address of object Value specific object value Source address specific source address VVVVV You can clear all logs by pressing on Clear button 80 1 4 1 Export logs Example Once an hour ma
43. 12 1 1 15 Digital output 12 B amp Mode Binary Output normal r7 gt Digital output 13 1 1 16 Digital output 13 5 amp Mode Binary Output normal 7 is Digital output 14 1 1 17 Digital output 14 4 amp Mode Binary Output normal 7 o is Digital output 15 1 1 18 Digital output 15 B amp Mode Binary Output normal 7 a 16 Digital output 16 1 1 19 Digital output 16 B amp Mode Binary Output normal 7 F mn Analog output 1 1 1 20 Analog output 1 B 0v amp Mode 0 100 1 byte Minimum voltage 1V Maximum voltage 10V Transition time 2 sec a i Resistance input 1 1 1 21 Resistance input 1 B 250 C Mode PT1000 C Send delta 1 C Send mode Bus write 7 a m Analog input 1 1 1 22 Analog input 1 5 11 08V Send delta 2V Send mode Bus write ai an is mc m7 38 1 1 1 Digital output You can set up digital output either as binary output or PWM Binary output is usually used to control external relays contactors PWM output is used to control external devices like thermoelectric valves Binary On Off output Digital output 1 xi Name Digital output 1 Link to object 1 1 4 Digital output 1 vo Status object Lock object Write to bus El Mode Binary On Off gt PWM 0 100 Invert output On delay seconds 0 73 Off delay seconds D Comments
44. 1s interpreted as above For all classes represented by single letters 96a 9oc etc the corresponding uppercase letter represents the complement of the class For instance S represents all non space characters The definitions of letter space and other character groups depend on the current locale In particular the class a z may not be equivalent to l Pattern Item A pattern item can be character class which matches any single character in the class a single character class followed by which matches 0 or more repetitions of characters in the class These repetition items will always match the longest possible sequence a single character class followed by which matches 1 or more repetitions of characters in the class These repetition items will always match the longest possible sequence e a single character class followed by which also matches 0 or more repetitions of characters in the class Unlike these repetition items will always match the shortest possible sequence e a single character class followed by which matches or 1 occurrence of a character in the class for n between and 9 such item matches a substring equal to the n th captured string see below e bxy where x and y are two distinct characters such item matches strings that start with x end with y and where the x and y are balanced This means that if one reads the string from left to right count
45. 1s received whichever happens first Returns data plus number of bytes read or in case of error nil plus error message res err port read bytes timeout Parameters e bytes number of bytes to read e timeout maximum time to wait for read to complete minimum value and timer resolution is 0 1 seconds Flushes any read unsent bytes 154 port flush Closes serial port no other port functions may be called afterwards port close Examples Write to port port write test Blocking read script will block until 10 characters are read data port read 10 Timeout read script will wait for 10 characters for 20 seconds data port read 10 20 Close serial port Port close Resident script RS 485 echo test open port on first call if not port then require serial port serial open dev ttyS2 baudrate 9600 parity even duplex port flush end port ready if port then read one byte char port read 1 1 send back if read succeeded if char then port write char end end 155 12 Object value export via XML Make KNX objects XML readable In the Objects tab click on the objects which you want to receive the current value by XML request Check the Export object Logic Machine Objects Object Object name Output 1 Name or group address Group address Data type 01 001 switch M Data type Logging enabled Export obj
46. 31 17 2 3 4 5 6 7 8 9 10 7 Recurring every year 124 Graph Test1233 Feb 2013 Data almia almia By clicking on the hidden blue menu you can change to different trends where each is mapped to a specific KNX group address Trend logs Setpoint Test1233 Feb 2013 Current Current trend is drawn in blue you can choose either to show Day Month or Year view Previous previous time period you can choose either to show Day Month or Year view Toggle previous when enabled a yellow trend line appears showing Previous trend above Current trend Home Logic Machine home screen 125 Datapoints can be shown also in a way of table which can be later exported as CSV file Setpoint Feb 2013 Download CSV Feb 2013 Jan 2013 Graph Data 126 7 Modbus RTU TCP interconnection with LM2 Modbus RTU 15 supported over RS485 interface Modbus TCP is supported over Ethernet port Modbus communication is done directly from scripts usually resident script is used to read Modbus value after some specific time interval and write them into KNX object Once script 15 added you can add the code in the Script Editor There lots of predefined code blocks in the Helpers Script editor email on change 2 x Editor Helpers pEditor HL Alerts and logs Time functions Miscellaneous Modb
47. AAC AXIS M1011 00408C8F 1AAC HP LaserJet Professional M1212nf MFP HP LaserJet Professional M1212nf MFP LogicMachine on LogicMachine LogicMachine on LogicMachine name LogicMachine local 00 6 6 RE 192 168 1 10 E Web Server on amatilinea Host name amatilinea local i 1 192 168 1 57 4 Looking up NetworkSpace2 local on Realtek RTL8169 8110 Family PCI Gic Linux PC The utility called Avahi can be downloaded here www avahi org Avahi Discovery Ire atho IPv4 v local v owhttpd tcp OWFS 1 wire Web Web Site 00 0WSQwre Wb 0 Oowserver tcp OWFS 1 wire Server 7 Workstation ubuntu84 00 13 f7 28 35 86 Service Type _http tcp Service Name OWFS 1 wire Web Domain Name local Interface IPv4 Address ubuntu 2 l0cal 192 168 0 99 51588 TXT Data empty Android The freely available app called ZeroConf Browser can be downloaded in Play Store ZeroConf https play google com store apps details id com grokkt android bonjour amp hl en Browser 22 a ZeroConf Browser AME 7 _DEVICE INFO gt gt File Transport Protocol FTP 2 HTTP Server Web Server on amatilinea cp loca NetworkSpace2 http tcp loca NetworkSpace2 local 80 path 10S Mac OS The freely available app called Discovery
48. Alerts Logs Error log Object filter Group address Object name Event Data type Current value Log Export Tags Object comments Updated at Setv Vis p Custo 14A lamp1 7 01 001 switch off 01 01 2001 07 22 03 B Name group address E 14 2 Lamp2 le 01 001 switch off 01 01 2001 07 22 13 E 8 zj 01 1 bit boolean 0 7 01 01 2001 02 00 33 E B cima m Temperature 0 09 001 Temperature oc 01 01 2001 07 22 28 e B Not specified Tags match all Apply filter Cancel Add new object Auto update enabled Clear Page 1 of 1 D Displaying objects 1 4 of 4 Version 20130927 CPU IO 0 11 0 210 19 Memory 8 1 3 1 Object parameters To change the settings for existing or new objects press on the specific list entry Object parameters x Object name Temperature Group address Data type 09 001 Temperature po Units suffix C Log Export F Poll interval seconds 30 5 Current value 23C Object comments Save Cancel Object name Name for the object Group address Group address of this object Data type KNX data type for the object This has to be set once the LM sniffs the new object for proper work Units suffix units for the object which will appear on the visualization along with the value Log enable logging for this object Logs will appear in Objects logs menu Vv VV WV 76 Export Make
49. C 1 5W EnOcean 868MHz 10BaseT 100BaseTX RS485 USB2 0 TPUART2 Digital output Resistive sensor inputs Analog binary inputs Analog outputs KNX bus Power supply 7 KNX EIB compatible 16 380 mA continues current on output Optoislated from KNX EIB bus Additional 24V power source is supported 6 PT100 PT1000 0 20 Q 7 0 30V with configurable threshold voltage 12bit resolution 2 0 10V I2bit resolution 20mA max current Bus Connection Terminal 0 8mm2 Clamp 1 5mm2 Operating elements Enclosure Usage temperature Storage temperature Weight Warranty Warranty Serial IO LED Material Color Dimensions 5C 45C 25C 55C 150g 2 years 2 years Clam 1 5012 Clam 1 5mm2 CPU load Activity Polyamide Gray 104 W x90 H x51 L mm LogicMachine3 Re actor kit contains Embedded board with preinstalled software Plastic DIN rail case 808 antenna 4 x 8pin extension connectors Terminal connection schemes KNX TP 01 02 03 04 05 06 OF 08 09 10 11 12 13 14 15 16 1 2 Digital Outputs osystems Reactor lt LogicMac nine The easiest way to create complex installation Resistive sensors Analog Inputs RS4B85 1 RS4B5 2 22V Main 12345 6 1 2 3 4 5 6 7 8 6908680868855 RS485 0000000070000 01 02 03 04 05 06 08 09 10 11 12 13 14 15 161 2 24 V Output Digital Out
50. F Repeat background image Sawe Cancel Widgets are used to combine several objects under one object in visualization Background image for the widget should be added in Vis graphics gt Images Backgrounds in advance Widget X Parent Widgets Mame thermostat Background image grey png Background color SFFFFFF Repeat background image 7 Save Cancel 89 When you have defined the widget in Layouts Widgets tab you can add objects to it in Visualization tab Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Uti Main Dining room li Bedroom a Floor Bedroom up a E House 2 Kitchen E Layouts 3 3 Widgets thermostat Change Touch object order When you have added necessary objects to the widget you can choose it when adding objects for main Levels e g Bedroom in Main level Object Main object 1 3 3 Status object Use main object m Custom name Read only Hide in Touch Hide background Send fxed value No bus write E In Usermode Touch Pin code Display mode No widget _ n icon Sess Off icon 2 Show control E In Usermode Addtoplan Cancel 90 Once added you can try out the widget in Usermode visualization by clicking on added object temperature sensor icon on the left the widget appears on click 1 8 Visualization After the building and floor stru
51. In Vis structure menu the structure of the visualization is defined and visualization backgrounds are uploaded Logic Machine Neighbours Select neighbour gt Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Enocean Alerts Logs Error log Help Levels Plans Layouts Widgets Name Visible Description Duplicate Move up Move down 3j Main G5 gt 9 o Dining room Usermode Touch En 9 Q lum Bedroom Usermode Touch Ey E Floor2 En im Bedroom up Usermode Touch En 9 E House 2 En 9 Q Kitchen Usermode Touch Ey 9 Q Add new level By default there is Main level added To add a new level building press Add new level button Level x Level name Description Save Cancel Once a new level is added you can add second level or upload floor pictures related to this particular building To add a new entry click on the green icon to delete a specific entry press on the red icon Q Select which item to add x Add second level Add plan 87 Plan x Parent Main Name Dining room Layout Usermode visualization Show Touch visualization Show Background image Background color FFFFFF Repeat background image 7 Admin only access Save Cancel Plan name name for the plan Layout layout for this specific plan All object from Layout will be duplicated on
52. LogicMachine3 Re actor Product Manual M M embedded B Osystems Reactor enocean LOgicMachines 0 create complex installation Document Issue 1 0 June 2013 Technical Support support openrb com Copyright Copyright 2011 Embedded Systems SIA All Rights Reserved Notice Embedded Systems SIA reserves the right to modify the information contained herein as necessary Embedded Systems SIA assumes no responsibility for any errors which may appear in this document Information in this document is provided solely to enable system and software implementers to use KNX EIB Logic Machine product Trademarks LogicMachine is a trademark of Embedded Systems SIA AII other names and trademarks are the property of their respective owners and are hereby acknowledged Introduction Logic Machine is your easiest way to program complex logic in KNX EIB Modbus BACnet EnOcean networks The Logic Machine will enable you to efficiently customize building automation processes easily delivering unlimited flexibility benefit to end users in a cost effective way Logic Machine is an embedded platform with integrated TPUART Ethernet USB interfaces Logic Machine allows to use it as IP Router cross standard gateway logic engine visualization WEB SCADAserver Scripting templates provides user friendly flexible configuration interface Via applying custom scripts the Logic Machine can simultan
53. Save Cancel gt Name name of the port gt Link to object group address to link the object with By pressing the amp button the field will be automatically filled with the next free group address gt Status object status object group address gt Lock object lock object group address Write to bus defines either to write or not to bus on value change gt Mode Binary on Off PWM 0 100 output mode gt Invert output defines either to invert the output value On delay seconds delay in seconds when getting in On state Off delay seconds delay in seconds when getting in Off state Comments comment of the object 39 PWM 0 100 output B Digital output 1 A Name Digital output 1 Link to object 1 1 23 New object Status object Lock object o Write to bus v Mode Binary On Off ig PWM 0 100535 Minirnum output 9 1 Maximum output 96 100 A PWM period seconds 60 Comments cave Cancel Name name of the port Link to object group address to link the object with By pressing the button the field will be automatically filled with the next free group address Status object status object group address Lock object lock object group address Write to bus defines either to write or not to bus on value change Mode Binary on Off PWM 0 100 output mode Minimum output minimum output value Maximum output
54. Tools x Script name Sleey Resident script conditioner B Q 5 Script name DMX handler M a weather data A Sleep interval seconds 0 Active Category w Description Save Cancel Version 20110824 Embedded Systems 2011 Once the resident script is added we can add the program source in Script Editor not then d epMXx ranitti channels 3 LUrangltion 2 F W end Setter used in other scripts DMX set channel value e channel DMX channel number 1 512 e value DMX channel value 0 255 8 1 Examples Predefined scene example The following example should be placed inside a resident script Sleep time defines scene keep time at least 1 second l ifnot scenes then 144 3 channel scene scenes Lo Oy O fy Op U o1 1 Oy 255 1 D 225r U 7 2557 2559 P Oy X55 T I2 000 a Cl wea WH Usb Os 50949 oo P3 Lsj lx 13 current 1 14 L5 16 set current scene values 17 scene scenes current 18 fori v inipa nirs scene do 19 DMX set i v 20 2l 22 switch to next scene 23 current current 1 24 1f current gt scenes then 225 current 1 26 Random scene example The following example should be placed inside resident script Sleep time defines scene keep time at least 1 second l number
55. UALIZATION STRUCTURE ut 87 Low SCT S cre ns ier cb CM tem dde E dct Rei 89 1 8 VTS TZ MEO cers NUT T UE 9 Jh CONOR fy nette hah Ru Laeta dy tix satel 9 Los OE 93 LUN TTE 94 ELOA Les 94 TEE 96 97 ru A 98 COS 98 DE n a 99 1 9 e Ree 100 1 10 TITE S RH J J _ _ gt 102 1 11 NITR tiu e LU MT eR a eun 105 1 12 ERROR 106 Id EOG E ML Mx IR C E RE E I 106 1 14 Jp RE PM T TEC MN TR TM REPRE RUNE 108 USER MODE VISUALIZATION eB Yep ceo SER en ex eU do eoo eus 109 2 1 CUSTOM DESIGN USERMODE VISUALIZATION aha Pa A Ge V a EAR E a Yeh Reg 110 TOUCH VISUALIZATION eie ee eet eie ba vea vies 110 SYSEENECONFIGURA TION a e Een e dete CP Ee ce en ovt essa ve esu OR ndo REESE 112 4 1 CAN 112 4 2 AC ____ _______ ___ __ ________ SE 113 4 3 UPGRADE BUR ARE
56. Utilities Alerts Logs Error log Help Import ESF file Import neighbours Reset clean up Factory reset Date and time Install updates Backup Restore Configuration System ms m 7 E A A Version 20130927 CPU IO 0 36 0 33 0 31 Memory 8 Import ESF file imports ETS object file It will be necessary to set correct data types for some imported objects Existing objects will not be overwritten Objects with the same name are considered duplicates and might not be imported Import ESF file x ESF file Choose File No file chosen It will be necessary to set correct data type for some imported objects Existing objects will not be overwritten Objects with the same name are considered duplicates and might not get imported Save Cancel Reset object clean up delete all objects from the Logic Machine they disappear from visualization aswell X Reset clean up Objects Object logs Alerts Logs Error logs F3 Eg Eg Eg pg p Script storage Save Cancel Factory reset delete all configuration and return to factory defaults Factory reset x Warning factory reset will delete everything make sure you have backed up before doing e 50 Logic Machine will reboot after reset is complete Are you sure you want to proceed Yes No 102 Date and time data and time settings Date and time Current Tue Jan 2 03 20 43 2001 Time 3 20 43 a G
57. Version 20120104 Embedded Systems 2011 Further this device can be mapped with specific KNX addresses When KNX object value will be updated the telegram will be sent to respective EnOcean device 140 Q 192 168 1 211 cgi bin scadajindex cgi Button A 01 1 bit boolean Group address Send telegram Button B 01 1 bit boolean Group address Send telegram 141 8 DMX protocol support is realized upon RS485 serial port Usage d DMX init parameters Parameters e channels optional defaults to 3 number of DMX channels to use e resolution optional defaults to 20 number of DMX updates per second Larger value gives smoother transitions but increases CPU usage e transition optional defaults to 2 soft transition time in seconds e port optional RS 485 port name usually you don t have to change this value Common function The following program has to be added in Common functions library DMX default params defaults storage key skey dmx chan RS 485 port port dev ttyS2 number of calls per second resolution 20 total number of channels to use channels 3 transition time in seconds does not include DMX transfer time transition 2 value setter set function i v validate channel number if type i number and i 1 and i 512 then validate channel value if type v numb
58. an for editing button the following main menus appear for configuration 91 Plan editor Object Main object 1 1 1 lampi vM Status abject Use main abject Custom name Lamp Read only E Hide in Touch Hide background v Send fixed value Mo bus write E In Usermode Touch Pin code 1234 Widget No widget Display mode Icon and value od On icon lamp an png Off icon lamp off png Show control E In Usermode Text styles Add to plan Cancel Plan link Graph Text label Image Gauge Save and reload plan Object new object to be added to the map Plan link linking several floors with special icons Camera IP web camera integration into visualization Graph Real time graph to monitor value of scale type objects gt Text Label text label to put on visualization Image Add specific image on the visualization gt Gauge Metering gauge Frame add frame object to the visualization On the left side of the plan Vertical guide and Horizontal guide fields appears once the plan editor is unlocked This is used to see guidelines for adapting specific plan to specific device resolution Vertical guide 640 Horizontal quide 440 92 1 8 2 Vv Vv Y NW NN Object Main object list of existing group addresses on KNX EIB bus the ones available for configuration in Obje
59. anged to a smaller value excess logs will be deleted on next auto clean up every 15 minutes Note Log policy only affects new objects current per object log settings are kept unchanged Warning Excessive object logging degrades Logic Machine performance System by clicking on the arrow near System button KNX Connection and User Access settings can be access By clicking on the System button network configuration window opens in new browser s tab KNX connection User access 1 11 Alerts In Alert tab a list of alert messages defined with alert function in scripts 1s located The messages are stored on the compact flash 105 Alert time 01 11 1970 10 20 42 01 01 1970 10 20 22 01 11 1970 10 20 02 01 01 1970 10 12 58 4 4 Page On the communication panel you can jump by pages Message read error read error read error read error 1 lot 83 EL and reload the page Example l temperature 25 3 if temperature 24 then Displaying alerts 1 25 of 2317 4 Page 1 of 93 122 Temperature Levels are too high 25 3 alert Temperature level is too high 1f temperature end 2 da 4 resulting message Da B 1 12 Error log Error messages from scripts are displayed in Error log tab Logic Machine Start page Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis icons Utilities
60. as its result type v Returns the type of its only argument coded as a string The possible results of this function are nil a string not the value nil number string boolean table function thread and userdata 1 2 29 User libraries User libraries usually contain user defined functions which are later called from other scripts Logic Machine Start page Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Event based Resident Scheduled User libraries _ Common functions Start up init script Tools Pq m s 2 List view Script name 4 Editor Keep Add new script wl B user test You have to include your library in the script with the following command require user test Secure the code There is an option keep source available for user libraries Once disabled the code is compiled in the binary form and can t be seen for further editing If this option is enabled the source code is seen in the editor User library x Script name test Keep source Save Cancel Include the library in the scripts To use functions defined in user library they should be included in the beginning of the script for example user library with the name test should be included like this require user test 1 2 30 Common functions Common functions contains library o
61. ation map Useful for example to grab dynamic weather cast images Logic Machine Start page Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Help Structure i i i i i Plan editor E zur a 3 3 ome aq Object FI 1 2 Plan link us Floor 2 ig Floo Camera Graph lum Cinema Roo Text label lam ng Ri Image lam D lum E Source url http openrb com wp conter lmj vato i m ia v width 200 is imal Ut Height 250 2 3 Study tidy External link Study Bedroom jag unge ywer Ro 5 8 Stud Stud ayi Nidg iam Link to lounge Add to plan Reset 1 Gauge Vertical guide 1024 gt Horizontal guide 768 X Save and reload plan Image source Local Remote image source location Source url Select image Source URL of the image or image from local database Width width of the image Height height of the image External link external link URL when pressing on the image VVVVV Once the image parameters are defined press Add to plan button and newly created object will appear on the map You can move the object to the location it will be located Press on Save and reload plan button so the objects starts functioning 1 8 8 Gauge Gauge allows visualizing and
62. ay Sunday is 1 yday day of the year and isdst daylight saving flag a boolean If format is not t then date returns the date as a string formatted according to the same rules as the C function strftime 70 When called without arguments date returns a reasonable date and time representation that depends on the host system and on the current locale that is os date 1s equivalent to os date c os difftime t2 t1 Returns the number of seconds from time t1 to time t2 In POSIX Windows and some other systems this value is exactly 12 11 os execute command This function 1s equivalent to the C function system It passes command to be executed by an operating system shell It returns a status code which is system dependent If command is absent then it returns nonzero if a shell 1s available and zero otherwise os exit code Calls the C function exit with an optional code to terminate the host program The default value for code is the success code 0s getenv varname Returns the value of the process environment variable varname or nil if the variable is not defined os remove filename Deletes the file or directory with the given name Directories must be empty to be removed If this function fails 1t returns nil plus a string describing the error os rename oldname newname Renames file or directory named oldname to newname If this function fails it returns plus a string describing the er
63. bject lock object group address Write to bus defines either to write or not to bus on value change Mode Voltage Binary On Off Binary Short Long Step dimmer input mode Send delta send the data upon specific delta value has changed Send timer seconds time interval to send the reading Value compensation compensation of the value 43 Binary On Off Analog input 1 Name Link to object Lock object Write to bus Made On press rising edge Toggle On release falling edge No action Midpoint voltage 10 Comments Save gt Name name of the port gt Link to object group address to link the object with By pressing the S button the field will be automatically filled with the next free group address Status object status object group address Lock object lock object group address Write to bus defines either to write or not to bus on value change Mode Voltage Binary On Off Binary Short Long Step dimmer input mode gt On press rising edge Send 0 Send 1 Toggle action on rising edge Onrelease falling edge Send 0 Send 1 Toggle action on falling edge Midpoint voltage voltage midpoint to determine the On Off state Fi Analog input 1 1 1 23 Mew object 2 Voltage i Binary On Off j Binary Short Long Step dimmer 44 Cancel Binary Short Long Analog input 1 x Name Analog input 1 Li
64. by using grp find alias or grp tag tags mode have the following functions attached to them Always check that the returned object was found otherwise calling these functions will result in an error See the example below object write value datatype Sends group write request to object s group address Data type is taken from the database if not specified as second parameter Returns Lua boolean as the result object response value datatype Similar to object write Sends group response request to object s group address 53 object read Sends group read request to object s group address Note this function returns immediately and cannot be used to return the result of read request Use event based script instead object update value datatype Similar to object write but does not send new value to the bus Useful for objects that are used only in visualization 1 2 8 Group communication functions These functions should only be used if it is required to access objects by group address directly it is recommended to use single or multiple object functions grp write alias value datatype Sends group write request to the given alias Data type 15 taken from the database if not specified as third parameter Returns Lua boolean as the result grp response alias value datatype Similar to grp write Sends group response request to the given alias grp read alias Sends group read request to the given alias Note this fun
65. c Machine s IP default 192 168 0 10 e Click on the User mode visualization or Touch visualization icon e Save the application as permanent shortcut in your iPad lt boiler gt Digital output 1 x Digital output 1 x Floort e Unknown x Launching visualization on PC iPad or any other touch device with large enough screen Make sure your PC touch device is able to access Logic Machine and enter it s IP in the browser default 192 168 0 10 e Click on the User Mode Visualization and enter the floor you want to see 34 o Then minimize side bar by pressing on left arrow icon to make the map more visible C 192 168 1 211 cgi bin scada vis index cgi Visualization gt TII ite i Pre 35 Graphical User Interface Login KNX EIB Logic Machine has IP address 192 168 0 10 set by default to LAN interface Use this address as www address in the browser s address field Note Make sure that the PC connecting to the Logic Machine has IP set from the same subnet After successful login a default page appears gt 1921681213 wv Logic Network User mode Touch User mode Machine configuration visualization visualization schedulers gt Logic Machine visualization creator scripts object relations alerts KNX objects and KNX objects designing building view and visualization maps gt Network configuration IP and KNXnet IP specific
66. can be downloaded in App Store https fitunes apple com en app discovery bonjour browser id30544 1017 8 For iPad install the iPhone iPod version of the utility LogicMachine on LogicMachine LogicMachine local 80 192 168 1 10 TXTRecord path Firmware upgrade Note Before each upgrade please backup your visualization scripts and object in Logic Machine gt Tools gt Backup as the database is cleaned during the upgrade Note After each upgrade we strongly recommend to clean your browser cache Use web browser to perform upgrade of the software of Logic Machine Firmwares are available in a form of images and could be downloaded from support page ofwww openrb com Complete system upgrade can be done in Network Configuration System Upgrade firmware 23 Upgrade firmware Firmware File Chooze File File chosen It mill take about 5 minutes For upgrade to complete Your system wil reboot twice All config Files wil be kept unchanged Do not unplug your router while updgrade is in progress Logic Machine visualization upgrade can be done in Utilities tab and press on Install updates icon After LMU file is chosen from the corresponding location press Save button The device will be rebooted after 5 seconds and new firmware will be installed Utilities Install updates x Update package file Choose File No file chosen Make sure that update package can be installed for the version yo
67. cess or nil on error io writefile file data Writes given data to a file Data can be either a value convertible to string or a table of such values When data 1s a table then each table item 1s terminated by a new line character Return boolean as write result when file can be open for writing or nil when file cannot be accessed Example Write event status to log file located on plugged USB flash drive 1 value knxdatatype decode event datahex dt bool 2 data string format s value is 5 os date c tostring value 3 write to the end of Log file preserving all previous data 4 file io open mnt usb log txt 5 file write data r n 6 file close Output Mon Jan 3 05 25 13 2011 value is false Mon Jan 3 05 25 14 2011 value is true Mon Jan 3 05 25 32 2011 value is false Mon Jan 3 05 25 33 2011 value is true Example Read data from file config in format key value 1 for line in io lines mnt usb config txt do 2 split Line by sing items line split 4 two items Line seems to be valid 5 if items 2 then 6 key items 1 trim Js value items 2 trim 8 alert config Xs s key value 9 end 10 end 1 2 20 Script control functions script enable scriptname 64 Enable the script with the name scriptname script disable scriptname Disable the script with the name scriptname status script status scriptname Returns
68. ct data Ob SC objectdata temperature 23 1 objectdata scene default NO HL result zstorage set test object data objectdata store objectdata variable as test object data Now we are retrieving data from storage Data type 1s checked for correctness objectdata storage get test object data if type objectdata table then if objectdata temperature 24 then do something if temperature Level is too high end BP W end 1 2 13 Alert function alert message varl var2 var3 Stores alert message and current system time in the main database AII alerts are accessible in the Alerts module This function behaves exactly as Lua string format Example 1 temperature 25 3 2 if temperature gt 24 then 3 resulting message Temperature Levels are too high 25 3 4 alert Temperature level is too high 1f temperature 2 1 2 14 Log function log varl var2 var3 Converts variables to human readable form and stores them in the main database All items are accessible in the Logs module 57 Example l Log function accepts Lua nil boolean number and table up to 5 nested Levels type variables 2 a 4 kevl value1 key2 2 3 b z test 4 2123 45 2 Logs all passed variables 6 log a b c 1 2 15 Scheduled scripting date time format Scheduled scripting uses standard cron format for date time paramete
69. ction returns immediately and cannot be used to return the result of read request Use event based script instead grp update alias value datatype Similar to grp write but does not send new value to the bus Useful for objects that are used only in visualization 1 2 9 Object function examples Find object by name and write new value 1 myobject grp find My object 2 grp find will return nil if object was not found 3 if myobject then 4 myobject write 1 update object vaLue with 1 2 Find object by address and write new value Ju yobjectsegrp cI2100 0 171715 verify that the requested object was found if myobject then myobject write 52 12 dt floatl6 explicitly set data type to dt floati6 2 byte floating point NO 54 5 end Switch all binary objects tagged lights off l lights grp tag lights 2 lights write false Group write to the specified group address and data type l grp write 1 1 1 true dt bool write 1 bit to 1 1 1 2 grp write 1 1 2 50 dt scale write 1 byte 505 to 1 1 2 1 2 10 Data type functions data types knxdatatype object provides data encoding and decoding between Lua and KNX data formats knxdatatype decode value datatype Converts hex encoded data to Lua variable based on given data type Data type 15 specified either as KNX primary data type integer between 1 and 16 or a secondary data type integer between 1000 and 16000
70. ctions common functions to call from other scripts Start up init script initialization script that is run upon system starting 1 1 1 Adding a new script When pressing on the arrow on the lower side of the Event based Resident or Scheduled buttons two possibilities appear List view sort scripts in list view Add new script add new script to the list Logic Machine Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Event based Resident Scheduled User libraries Common functions s List view Group address tag Description Add new script 47 Neighbours Select neighbour gt Start page Enocean Alerts Logs Error log Help Start up init script Tools De a Y Dupli Editor Active The following fields should be filled when adding a new script Event based Event based script x Script name Scene away Group address tag 2 2 2 Active Fj Execute on group read F Category vi Description save Cancel Script name the name of the script Group address Tag specific group address or tag name on which the script will be triggered gt Active specifies whether the script is active green circle or disabled red circle gt Execute on group read specifies whether the script is executed on KNX group read telegram gt Category a new or existing name of the category the script will be included This w
71. cts tab Status object list of status objects on KNX EIB bus Custom name Name for the object Read only the object is read only no write permission Hide in touch do not show this object in Touch Visualization Hide background Hide icon background Send fixed value Allows to send specific value to the bus each time the object 1s pressed No bus write do not send telegram into the bus once clicked on this object in Usermode Touch visualizations PIN code PIN code which will be asked to provide when click on this object to perform group write Widget specify widget which will be launched when click on this object Display mode icon and value icon value how to display the object Default Icon Default icon of scale type objects Icons library is located in Vis graphics 2 Icons tab On icon On state icon for binary type objects Icons library 1s located in Vis graphics 2 Icons tab Off icon Off state icon for binary type objects Icons library is located in Vis graphics 2 Icons tab Show control scale type object specific setting defining either to show the control in Usermode visualization without icon 27 00 For scale type objects additional button appears while specifying parameters Additional icons It s possible to define different icons for different object values in the window Additional icons x Min value 10 Min value 0 Min value 10 Min value 20 Max value Icon sun mo
72. cture is defined in Vis structure tab it 1s visualized in Visualization tab Controlled and monitored objects can be added and managed in this section Both side bars can be minimized by pressing on icon making the map more visible especially on small displays Logic Machine Neighbours Select neighbour Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Alerts Logs Error log Structure i Plan editor 3 Main object in Dining room ig Bedroom Main object 5 amp y Floor2 Status object Use main object m Bedroom up 3 5 House 2 Custom name Kitchen Read only F 23 Layouts 5 Widgets ide in Touch thermostat Hide background v Send fixed value No bus write F In Usermode Touch Pin code Widget No widget Display mode Icon M E On icon music on png Off icon music off png Show control In Usermode Add to plan Cancel Plan link Camera Graph Text label Image Gauge Frame Plan width 1024 s Plan height 768 A M Save and reload plan 4 Version 20130927 CPU IO 0 43 0 40 0 33 Memory 8 1 8 1 Plan editor Plan editor is located on the right side of the visualization map By clicking on Unlock current pl
73. current status for each a c unit for id ac in ipairs aclist do local stat mode temp speed offset address offset offset id 1 152 on off status stat mb readdiscreteinputs offset if type stat boolean and ac stat stat then 1 8 6 0 addrtemp 134 8 7 0 8 7 1 ac stat stat grp write ac addrstat stat dt bool end operation mode mode readbyte offset 8 if type mode number and ac mode mode then ac mode mode send proper value to knx if 1 lt mode amp amp mode lt 5 then grp write ac addrmode mode 1 dt uint8 end end fan speed speed readbyte offset 16 if type speed number and ac speed speed then ac speed speed send proper value to knx if 2 lt mode amp amp mode lt 7 then grp write ac addrspeed speed 2 dt uint8 end end temperature offset id 1 156 1 temp readinputregisters offset if type temp number and ac temp temp then ac temp temp grp write ac addrtemp decodetemp temp dt float16 end end pead command from client local data server receive if data then cmd data end Common function program function decodetemp value local hex lmcore inttohex value 2 return knxdatatype decode hex dt floati6 end function encodetemp value local hex knxdatatype encode value dt float16 datahex return tonumber hex 16 end send request to modbus resid
74. default value 1s 1 and can be negative A value of true as a fourth optional argument plain turns off the pattern matching facilities so the function does a plain find substring operation with no characters in pattern being considered magic Note that if plain is given then init must be given as well If the pattern has captures then in a successful match the captured values are also returned after the two indices string format formatstring Returns a formatted version of its variable number of arguments following the description given in its first argument which must be a string The format string follows the same rules as the printf family of standard C functions The only differences are that the options modifiers 1 L n and h are not supported and that there 15 an extra option The option formats a string in a form suitable to be safely read back by the Lua interpreter the string 15 written between double quotes and all double quotes newlines embedded zeros and backslashes in the string are correctly escaped when written For instance the call string format q string with quotes and new line will produce the string 59 string with quotes and new line The options c d e f 2 i o X and x all expect a number as argument whereas q and s expect a string This function does not accept string values containing embedded zeros except as arguments to the q opti
75. dices are enumerated 1s not specified even for numeric indices To traverse a table in numeric order use a numerical for or the ipairs function The behavior of next is undefined if during the traversal you assign any value to a non existent field in the table You may however modify existing fields In particular you may clear existing fields pairs t Returns three values the next function the table 7 and nil so that the construction for k v in pairs t do body end will iterate over all key value pairs of table t tonumber e base Tries to convert its argument to a number If the argument is already a number or a string convertible to a number then tonumber returns this number otherwise it returns nil 72 An optional argument specifies the base to interpret the numeral The base may be any integer between 2 and 36 inclusive In bases above 10 the letter A in either upper or lower case represents 10 B represents 11 and so forth with Z representing 35 In base 10 the default the number can have a decimal part as well as an optional exponent part In other bases only unsigned integers are accepted tostring e Receives an argument of any type and converts it to a string in a reasonable format For complete control of how numbers are converted use string format If the metatable of e hasa tostring field then tostring calls the corresponding value with e as argument and uses the result of the call
76. e 20 12 read 3 phase system voltage from 32 bit register 13 rl r2 mb readregisters 0x1000 2 result sbst lsbasrftirl 16 r2 15 dgrp write 5 5 l result I9 17 read 3 phase system current from 32 bit register 18 1 r2 mb readregisters Ox100E 2 13 sbait lshirtirl 19 rZ 20 gfpwrite b 5 Z2 result Some Modbus devices keep enocded values in registers you need to encode them first from HEX to use in the further scripts For example value 0xOcba after executing the below commands will give temperature equal to 24 2 l hex slmoore riuttohex value 2 2 temp skrnxQatatype decode hex dl tloatlo Here is an example of function which is doing byte shift get single bit from a numeric vaLue function getbit value bnum value tonumber value or 0 Value Dit tehite value return bit band value 1 dm Gr TO end 9 getbit value 0 first bit and so on 129 7 5 Modbus Slave examples Add the following code to Common functions 1 modbus proxy 2 mbproxy 5 supported function List 4 functions 4 readdo 6 readcoils da readdi 8 readdiscreteinputs B readao 10 readregisters 11 readai 12 readinputregisters 13 writebits 14 writemultiplebits 15 writeregisters 16 writemultipleregisters 17 reportslaveid LB getcoils I3 getdiscreteinp
77. e value of m is in the range 0 5 1 or zero when x is zero math huge 68 The value HUGE VAL a value larger than or equal to any other numerical value math ldexp m e Returns 2 e should be an integer math log x Returns the natural logarithm of x math log10 x Returns the base 10 logarithm of x math max x Returns the maximum value among its arguments math min x Returns the minimum value among its arguments math modf x Returns two numbers the integral part of x and the fractional part of x math pi The value of pi math pow x y Returns x You can also use the expression xy to compute this value math rad x Returns the angle x given in degrees in radians math random m n This function is an interface to the simple pseudo random generator function rand provided by ANSI C No guarantees can be given for its statistical properties When called without arguments returns a uniform pseudo random real number in the range 0 1 When called with an integer number m math random returns a uniform pseudo random integer in the range 1 m When called with two integer numbers m and n math random returns a uniform pseudo random integer in the range m n math randomseed x Sets x as the seed for the pseudo random generator equal seeds produce equal sequences of numbers math sin x Returns the sine of x assumed to be in radians math sinh x Ret
78. ec edes e v anes E cU Us RUE 146 9 3 SEND SMS MESSAGES TO SPECIFIC SIM NUMBERS AFTER GROUP READ OR GROUP WRITE IS TRIGGERED 148 10 HDL PROTOCOL INTEGRATION IN LOGIC MACHINE 3 2 ccscccccccccccccccccccccccccccccccccccces 150 10 1 ELD RUNG FON nie 150 10 2 USAGE EXAMPLE HDL DIMMER CONTROL c ccscssccsscscssccsccssceccscescsccsconscsccsccssescescascussseceseececesceeceses 152 10 3 USAGE EXAMPLE SHDL RELAY CONTROL 4 inh asc OARS 152 11 COMMUNICATION WITH RS232 RS485 SERIAL PORTS cecsccsccscccccccccccccccccccccccccccscees 154 12 OBJECT VALUE EXPORT VIA XM Dwi 156 12 1 AERTS ERRORS VALUES ieu etui 158 13 READ ALERTS RSS FEEDS FROM LOGIC MACHINE 159 Device specification Application Logical functions WEB SCADA visualization for PC and touch devices cross standard gateway between KNXnetIP Modbus TCP IP Modbus BACnet MS TP BACnet IP EnOcean HDL GSM and other protocols integration with third party devices over RS232 or RS485 serial ports DALI AV IR Data logger with trends HVAC Types of product Re actor Standards and norms compliance CE conformity EMC PCT Technical data Power supply Power consummation Interface Connections LM3 REACTOR EMBS CE 111231 01 EN61000 6 1 EN61000 6 3 Certificate 7 36V D
79. ect Tags match any Tags Current value off Object comments Relay 1 Save Cancel Filter Displaying objects 1 25 of 35 XML request from external PC The XML request looks like this http remote remote 192 168 1 21 I cgi bin scada remote request cgi m xml amp r objects Parameters address object address e g 1 1 1 name object name e g My object data decoded object value e g 42 or 01 01 2012 datatype object datatype e g 1 or 5 001 standard KNX data types time object update time UNIX timestamp date object update time RFC date comment object comment e g Second floor entry lights tags optional array of object tags e g Light Second floor Note To get list of objects that have been updated after specific time you can pass an optional updatetime parameter UNIX timestamp format 156 e 192 168 1 211 cgi bin scada remote request cgi m 2xml amp r objects This XML file does not appear to have any style information associated with it The document tree 1s shown below w lt objects gt w lt object gt lt comment gt lt name gt Weather Temperature lt name gt lt address gt 5 1 2 lt address gt lt date gt Tue 14 Feb 2012 23 41 45 1000 lt date gt lt time gt 1329298905 lt time gt lt data gt 4 lt data gt lt datatype gt 9 lt datatype gt lt object gt w lt object gt lt comment gt lt name gt Weather T Low lt name g
80. ects tab e Add Event based script which will monitor newly created object e In Scripting Editor specify the following code for this script 152 lslocal value dpt decode event datanex dL bool 2 HDL chanreg l1 1L 1 Test the program If you change the value for object 4 1 2 in Objects menu with Set Value it will automatically change the relay state in HDL network 153 11 Communication with RS232 RS485 serial ports The following are the naming of Serial ports for different versions of Logic Machine LM3 Reactor GND GND RS 485 B poder RS 485 B GND GND RS485 2 RS485 2 24V GND RS 485 B RS485 4 24V Functions Include library before calling serial functions require serial Opens given port returns port handle or in case of error nil plus error message port err serial open device params Parameters e device port device name required e params parameters table optional defaults in bold o Jbaudrate 300 600 1200 2400 4800 9600 19200 38400 57600 115200 230400 parity none even odd databits 5 6 7 8 stopbits 1 2 o duplex full half Note half is required for RS 485 Reads the specified number of bytes execution is blocked until read is complete res err port read bytes Parameters e bytes number of bytes to read Reads until timeout occurs or the specified number of bytes
81. ee group address Status object status object group address Lock object lock object group address Write to bus defines either to write or not to bus on value change Mode Voltage Binary On Off Binary Short Long Step dimmer input mode Dimmer step value on which the brightness value will change by one step On preset brightness preset when getting in On state Midpoint voltage voltage midpoint 46 1 2 Scripting Scripting menu allows adding and managing various scripts depending on the type of the script Lua programming language is used to implement user scripts Most of the Lua language aspects are covered in the first edition of Programming in Lua which is freely available at http lua org pil Note Data format in most cases data is stored and transferred between Logic Machine parts using hex encoded strings 2 bytes per I byte of data There are six main types of scripts Event based scripts that are executed when a group event occurs on the bus Usually used when nearly real time response is required Resident scripts that use polling to check for object state changes Usually used for heating and ventilation when data is gathered from more than one group address Scheduled scripts that run at the required time and day Can be used for various security systems and presence simulations User libraries user defined scripts to call from other scripts Common fun
82. efault off png default on png door off png Lica gs gt L A i s Pp door on png fan off png fan on png goto down png goto eft png goto right png goto up png green off png green on png heat cold off heat cold on key off png g 4 4 ES CES 2 ii g P T 9 2 e SSS SSS SS key on png lamp off png lamp on png lock alt off png lock alt on png lock off png lock on png meter off png meter on png music off png music on png ok cancel off Add icons Delete selected Press on Add new icon button to add a new entry The system accepts any size icons GIF is also supported 100 Add new graphics X Name optional File No file chosen Name can contain letters numbers underscore and minus sign ZIP archive containing multiple graphics can be uploaded each item cannot exceed 2MB whole archive size cannot exceed 16MB Cancel Name optional the name of the icon File Icon file location Images Backgrounds tab is used to upload image files for visualization purposes Visualization Vis graphics Utilities apartment2 jpg apartment3 jpg grey png images jpg plan1 png 101 1 10 Utilities There are following utilities in the tab available Logic Machine Neighbours Select neighbour gt Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics
83. el Unlock current floor plan for editing Version 20110824 Embedded Systems 2011 Existing objects can be added to the map by clicking on Unlock current floor plan for editing button Once the object parameters are defined press Add new object button and newly created object will appear You can move the object to the location it will be located Note that while being in editing mode the object will not work 33 192 168 1 211 cgi bin scada index cgi wo Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization icons Utilities Alerts Logs Error log Help Buildings Floor plan editor TENES P house Object floor1 1 M f Floor link boiler nit Camera dams E SS Source url http 192 168 1 212 mjpg vid 5 Width 300 Height 200 Custom name Entry camera Hide background Sort order 2 m 2 a 3 Add new object Reset Graph Text label Save and reload floor plan Version 20110824 Embedded Systems 2011 When all necessary objects and cameras are added press Save and reload floor plan button so everything starts functioning Launching visualization on touch device iPad in this case e Make sure your iPad is connected wirelessly to the Logic Machine either through separate access point or directly to Logic Machine s USB WiFi adapter e In the browser enter Logi
84. elf channels chan delta self channels chan target self channels chan current self ticks self channels chan ticks self ticks end end end main loop handler function DMX run local i bs bm as am delta local res self params resolution if not self calibrated then bs bm os microtime end self getvalues transition loop for i 1 res do self step self dm send wait until next step os sleep self sleep end calibrate delay loop to match 1 second if not self calibrated then as am os microtime delta as bs am bm 1000000 if delta gt 1 05 then self sleep self sleep math max 10 self sleep res else self calibrated true end end end Single transition step function DMX step local chan t transition for each channel for chan 1 self params channels do t self channels chan ticks transition is active if t gt 0 then 1 1 self channels chan self channels chan target self channels chan delta t self channels chan ticks t self dm setchannel chan self channels chan current end end end DMX handler programs DMX handler should be placed inside a resident script Sleep time interval must be set to 0 143 Logic Machine Stark page Scripting Objects Object logs Buildings visualization Visualization icons Utilities Enocean alerts Logs Error lag Help Event based Resident Scheduled
85. ent function accmd id cmd value local request client require socket check if value has been passed value value and tonumber value create request string request string format d s id cmd upper if value then request string format s s request value end send udp packet socket udp sendto request 127 0 0 1 28016 end Example on off VRF system value knxdatatype decode event datahex dt bool accmd 1 value and or Example set mode of VRF system value knxdatatype decode event datahex dt uint8 accmd 1 MODE value Example set the speed value knxdatatype decode event datahex dt uint8 accmd 1 SPEED value Example set the temperature value knxdatatype decode event datahex dt float16 accmd 1 TEMP value 135 BACnetIP interconnection with LM2 You can configureBACnet Device ID and Password used for remote device reloading in Network Configuration gt Network gt BACnet BACnet Device ID Password Restart server To make KNX EIB objects BACnet readable writable mark necessary objects in Logic Machine as Export object Binary objects will appear as Binary Values other numeric values will appear as Analog Values Other types are not currently supported KNX bus writes changes the Relinquish Default property Logic Machine Objects Dect logs Jallzation Isuallzation Lie Alert L Error lag Object
86. ent to file flush over the default output file io input file When called with a file name it opens the named file in text mode and sets its handle as the default input file When called with a file handle it simply sets this file handle as the default input file When called without parameters it returns the current default input file In case of errors this function raises the error instead of returning an error code io lines filename Opens the given file name in read mode and returns an iterator function that each time it is called returns a new line from the file Therefore the construction for line in io lines filename do body end will iterate over all lines of the file When the iterator function detects the end of file 1t returns nil to finish the loop and automatically closes the file The call io lines with no file name is equivalent to io input lines that is it iterates over the lines of the default input file In this case it does not close the file when the loop ends io open filename mode This function opens a file in the mode specified in the string mode It returns a new file handle Or in case of errors nil plus an error message The mode string can be any of the following r read mode the default e write mode append mode e r update mode all previous data is preserved w update mode all previous data is erased e at append update mode pr
87. eously act as thermostat security panel lighting controller etc Technical support Any faulty devices should be returned to Embedded Systems If there are any further technical questions concerning the product please contact our support available Mon Fri 9 00 17 00 GMT 02 00 Please write to support Q2 openrb com Firmware updates are available at www openrb com A Caution Security advice The installation and assembly of electrical equipment may only be performed by skilled electrician The devices must not be used in any relation with equipment that supports directly or indirectly human health or life or with application that can result danger of people animals or real value Mounting advice The devices are supplied in operational status The cables connections included can be clamped to the housing if required Electrical connection The devices are constructed for the operation of protective low voltage SELV Grounding of device is not needed When switching the power supply on or off power surges must be avoided Contents DEVICE SPECIFICATION m 0055 7 TERMINAL CONNECTION SCHEMES isccsssesteeceteccceccteciscliceccctasseatevccsccensssscacteascctsecstesiseacadsueusseastestedsdessseduestcocss 10 FACTORY DEFAULT DISCOVER IP iocvssecseseussresvssetesseescwavatiansbscoussbeccedenslussseviveasesdeesdeweaactesesiuesieielecscnestssdeuse 18 STANDARDS SUPPORTED a
88. er and v gt 0 and v lt 255 then storage set DMX defaults skey i v end end end DMX init returns new DMX object function DMX init params require luadmx local n setmetatable index DMX 1 local k v set user parameters n params params copy parameters that are set by user for k v in pairs DMX defaults do if n params nil then n params k v end end n reset return n end function DMX reset local err chan self dm err luadmx open self params port error while opening if err then os sleep 1 error err end 142 DMX interconnection with LM2 set channel count self dm setcount self params channels number of transaction ticks self ticks math max 1 self params transition self params resolution calculate sleep time self sleep 1 self params resolution reset channel map self channels fill channel map for chan 1 self params channels do self channels chan current 0 target 0 ticks 0 turn off by default storage set self params skey chan 0 self dm setchannel chan 0 end end get new values function DMX getvalues local chan val check for new values for each channel for chan 1 self params channels do val storage get self params skey chan target value differs set transcation if val self channels chan target then self channels chan target val s
89. ers represents the character x itself a dot represents all characters a represents all letters represents all control characters d represents all digits 1 represents all lowercase letters represents all punctuation characters s represents all space characters represents all uppercase letters ow represents all alphanumeric characters x represents all hexadecimal digits z represents the character with representation 0 62 x where is any non alphanumeric character represents the character x This is the standard way to escape the magic characters Any punctuation character even the non magic can be preceded by a when used to represent itself in a pattern set represents the class which is the union of all characters in set A range of characters can be specified by separating the end characters of the range with All classes x described above can also be used as components in set All other characters in set represent themselves For example or _ w represents all alphanumeric characters plus the underscore 0 7 represents the octal digits and 0 7 1 represents the octal digits plus the lowercase letters plus the character The interaction between ranges and classes is not defined Therefore patterns like a Z or have no meaning set represents the complement of set where set
90. esjson poecode valus 40 value jvalue nilandjvalueor value 41 send to bus 42 grp write name value 43 read request 44 else 2 0D J Grp tand name 46 send read request and wait for update 47 ifobjthen 48 49 0s sleep 1 50 read new value value sgrp getvalue name 147 22 got value send response 53 1f value nilthen 94 Jvelue Son pencode value 55 if obj name then 56 name string format s s obj name obj address 27 end 58 cmd string format Value of Xs is s name jvalue 29 modem sendsms sender cmd 60 end 61 end 62 end 63 end 64 end 65 incoming sms handler 66 handler function sms 67 alert incoming sms from 4s s sms sender sms data 68 sms from known number call parser 69 iftable contains numbers sms sender then 70 parser sms data sms sender 71 end 72 end 73 set sms handLer 74 modem setsmshandler handler 75 send pin if set 76 ifpincodethen 77 pincode 78 79 set to pdu mode 80 modem send AT CMGF 0 81 enable sms notifications 82 modem send AT CNMI 1 1 0 0 0 93 alert SMS handler started 84 end 85 modem run 9 3 Send SMS messages to specific SIM numbers after group read or eroup write is triggered Task Assume we have an Event based script which triggers a program once group read or group
91. est params 1 mb 50 res mb fn unpack request params 51s else Bas res mb fn mb 523 end 54 55 return res 56 end Ss 58 server rpc server 127 0 0 1 28002 mbproxy handler 0 01 393 end 60 6L mb handleslave 62 server step Example event script which changes modbus slave coil address 0 Must be mapped to a group address with binary value 1 value s event getvalue 2 mb mbproxy new 3 mb setcoils value Example event script which changes modbus slave register address 5 Must be mapped to a group address with scaling 0 100 value l value s event getvalue 2 mb mbproxy new im mb setregisters 5 value 7 6 Modbus working with several slaves on the same RS4 5 connection The example was designed to interconnect with 16 VRF system in one line through 1 Logic Machine2 Resident script modbus init if not mb then require luamodbus mb luamodbus rtu mb open dev ttyS2 9600 E 8 1 H mb connect mb setslave 1 a c list aclist 133 a c 0 id 1 addrstat 8 4 0 addrmode a c 1 id 2 8 5 0 addrspeed addrstat 8 4 1 addrmode 8 5 1 addrspeed 8 6 1 addrtemp read 8 bits and convert to single byte function readbyte offset local bits mb readdiscreteinputs offset 8 local result 0 for 1 8 do if bits i then result result bit lshift 1 i 1
92. et from system Date 02 01 2001 3 Timezone UTC Save Cancel Install updates install Logic Machine update file lmu Logic Machine will reboot after successful update Install updates x Update package file Choose File No file chosen Make sure that update package can be installed for the version you are using Logic Machine will reboot after successful update Save Cancel Backup backup all objects logs scripts visualization Restore restore configuration from backup Restore x LM backup file Choose File No file chosen Warning maximum backup size is 16MB Current database scripts and visualization will be deleted Logic Machine will reboot after successful restore Save Cancel 103 Configuration by clicking on the arrow KNX Connection and User Access settings can be access By clicking on the Configuration button system general settings appear Configuration x Interface language English List items per page 25 Automatic address range start 1 1 1 Discover new objects Yes bus sniffer enabled Object log size 1000 Default log policy Log only selected objects a Alert log size 200 A Log size 200 zi Error log size 200 A Usermode sidebar Show as overlay auto hide w Usermode view Center plans enable auto sizing m Show alerts in Usermode If log size is changed to a smaller value excess logs will be deleted on next auto clean up every 15 minu
93. evious data is preserved writing is only allowed at the end of file The mode string can also have a b at the end which is needed in some systems to open the file in binary mode This string is exactly what is used in the standard C function fopen 67 io output file Similar to 10 input but operates over the default output file 1 2 25 Mathematical functions This library is an interface to the standard C math library It provides all its functions inside the table math math abs x Returns the absolute value of x math acos x Returns the arc cosine of x in radians math asin x Returns the arc sine of x in radians math atan x Returns the arc tangent of x in radians math atan2 y x Returns the arc tangent of y x in radians but uses the signs of both parameters to find the quadrant of the result It also handles correctly the case of x being zero math ceil x Returns the smallest integer larger than or equal to x math cos x Returns the cosine of x assumed to be in radians math cosh x Returns the hyperbolic cosine of x math deg x Returns the angle x given in radians in degrees math exp x Returns the value math floor x Returns the largest integer smaller than or equal to x math fmod x y Returns the remainder of the division of x by y that rounds the quotient towards zero math frexp x Returns m and e such that x 2 e is an integer and the absolut
94. f globally used functions They can be called from any script any time without special including like with user libraries Functions like sunrise sunset Email are included by default in Common functions Common functions 1 2 3l Start up init script Init script is used for initialization on specific system or bus values on system start Init script 1s run each time after system is restarted for some reason start up init Script 1 2 32 Tools Logic Machine Neighbours Select neighbour gt Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Enocean Alerts Logs Error log Help Resident Scheduled User libraries Common functions Start up init script ig Export helpers f Script name Group address tag Description Category Hive Import helpers all on 2 2 2 p lo Restore helpers Backup user scripts gt 5 Restore from archive Print script listings 2 Show logs window 92 168 0 10 cgi bin scada index cgi CPU IO 0 25 0 24 0 18 Memory 7 74 Export helpers export scripting helpers Import helpers import scripting helpers Restore helpers restore default scripting helpers Backup user scripts backup all scripts in gz file Restore from archive restore script from archive gz file with two possibilities o Remove existing scrip
95. function coil value callback function which is executed for each coil write 5 mb setwriteregistercb function coil value callback function which is executed for each register write 131 Handler script example T modbus init Fm if not mb then 34 require luamodbus 4 mb luamodbus rtu 5 mb open dev ttyS2 38400 E 8 1 6 mb connect gis 8 slave id on mb setslave 1 LQ Ili init slave storage for coils discrete inputs holding registers and input registers 12 mb setmapping 10 10 10 10 13 14 coil write callback 154 mb setwritecoilcb function coil value 16 if coil 0 then Ts grp write 1 1 1 value dt bool 18 else 19 alert egil 4d s Zs eod tostring value 20 end 21 end 22 234 register write callback 24 mb setwriteregistercb function register value 25 if register 0 then 26 send value Limited to 0 100 87 grp write 4 1 5 math min 100 value dt scale 28 else 29 alert register Xd d register value 39 end 31 end 32 end 33 38 server part init if not server then 36 require rpc STe 38 tncoming data handler 39 local handler function request 40 local fn res 41 42 tostring request fn 43 44 if not mb fn then 45 return nil unknown function fn 52 46 end 47 48 if type request params table then 49 table insert requ
96. ill not affect on script action helps only by grouping the scripts and watching by categories in Tools gt Print script listings page Description description of the script Resident Resident script x Script name weather data Yahoo Sleep interval seconds 60 Active Category a Description The script is fetching weather data for Riga and storing inta KMx objects Cancel 48 Script name the name of the script Sleep interval seconds interval after which the script will be executed Active specifies whether the script is active green circle or disabled red circle Category a new or existing name of the category the script will be included This will not affect on script action helps only by grouping the scripts and watching by categories in Tools gt Print script listings page gt Description description of the script Scheduled Scheduled script x Script name Floor heating off Minute Haur amp 3 19 Day of the month Month of the year Every month of the year Day of the week Every day of the week Active F Category w Description Turns floor heating OFF at 8 00 and 19 00 Dave Cancel gt Script name the name of the script gt Minute Minute gt Hour Hour Day ofthe month Day of the month Month of the year Month of the year Day ofthe week Day of the week gt Active specifies whether the script is active green circ
97. ing 1 for an x and 1 for a y the ending y is the first y where the count reaches 0 For instance the item b matches expressions with balanced parentheses Pattern A pattern is a sequence of pattern items A at the beginning of a pattern anchors the match at the beginning of the subject string A at the end of a pattern anchors the match at the end of the subject string At other positions and have no special meaning and represent themselves Captures A pattern can contain sub patterns enclosed in parentheses they describe captures When a match succeeds the substrings of the subject string that match captures are stored captured for future use Captures are numbered according to their left parentheses For instance in the pattern a w s the part of the string matching a w s is stored as the first capture 63 on and therefore has number 1 the character matching 1s captured with number 2 and the part matching s has number 3 As a special case the empty capture captures the current string position a number For instance if we apply the pattern aa on the string flaaap there will be two captures 3 and 5 A pattern cannot contain embedded zeros Use z instead 1 2 19 Input and output functions 10 1515 path Checks if given path file or directory exists Return boolean io readfile file Reads whole file at once Return file contents as a string on suc
98. izing Modbus objects Use grp write to assign Modbus object to KNX object and then use this new KNX object in the visualization 7 3 Usage example Modbus TCP Task read three registers from Modbus TCP device and write the result in Alerts l initmodbus on first script execution 2 ifnotmbthen 3 require luamodbus 4 mb luamodbus tcp Seend om 7 prepare connection to given ip and port D mbtopeni l92 158 14 100 12302 Ja 10 open connection and check the result ll ifmb connect then 12 read 3 input registers function returns 3 variables 13 local x y mb readinputregisters l 3 14 15 first variable will be nill if read failed 16 217 x then 17 local message string ftormat l 3 X 18 alert message 19 end 20 21 end session 22 mb close 23 else 24 alert connection failed 25 end 128 7 4 Usage example Modbus RTU Task read two parameters 3 phase system voltage 3 phase system current from Modbus Multimeter 32 bit registers and store the data in the KNX group addresses Make sure to connect LM2 with Modbus device correctly RS485 A with RS485 B with initmodbus on first script execution 1fnotmbthen require luamodbus mb luamodbus rtu nbiopeni dev ttyS2 9500 E 8 1 H mbroonnect NID OO FB end sets slave ID to read write data from to 10 mb setslav
99. jects tonumber object address 15 datatypestonumber object datatype 16 name etostring object name 3 IY 18 end 19 20 csv buffer 21 buffer date address name value 81 22 24 26 2T EB 29 20 3d 32 36 a 41 46 47 48 49 s 54 03 s 54 Bos Ss 56 99 60 Bl 62 53 64 55 get object Logs query SELECT src address datahex logtime eventtype FROM objectlog WHERE logtime ORDER BY id DESC for _ row inipairs db getall query logtime do object objects tonumber row address found matching object and event type is group write if object androw eventtype write then datatype object datatype check that object datatype is set Cu 34 395 ifdatatypethen decode data data knxdatatype decode row datahex datatype remove null chars from char string datatype 38 29 40 ifdatatype dt charordatatype dt stringthen data data gsub z date to DD MM YYYY elseifdatatype dt datethen 42 43 44 45 data string format 2d 2d 2d data day data month data year ttme to HH MM SS elseifdatatype dt timethen data string format 2d 2d 2d data hour data minute data second end else data set end format csv row logdate os date 4Y m d H M S row logtime csv string format q q q q logdate knxlib decodega
100. k By default 255 255 255 0 24 Gateway IP gateway IP address DNS server DNS server IP address MTU maximum transmission unit the largest size of the packet which could be passed in the communication protocol By default 1500 VVV WV 4 6 1 Ethernet interface data throughput graph On the main window of the Ethernets tab if you click on the illa button a new window is opened It draws a real time graph of the traffic flow passing the interface both In and Out There is a possibility to switch the units of measurement bytes s or bytes s Network usage for interface eth In 35 KEps Switch to bytes s Out 10 Kbps AutoScale follow 116 4 7 Routing Table System routing table is located in Network Routes menu The window is divided in two parts Static routes and Dynamic routes 4 7 1 Dynamic routes Routes Dynamic Static Interface Destination Gateway 192 168 2 0 192 168 1 0 224 0 0 0 default 192 165 1 1 gt Interface interface name gt Destination destination IP address gt Network mask network mask gt Gateway gateway IP address 4 7 2 Static routes Route Interface Destination Network mask Gateway 117 Network mask Eier uenientem dl Eosrzog cou 224 0 0 0 0 0 0 0 Interface interface name gt Destination destination IP address Network mask network mask Gateway gateway IP address 4 8 ARP table Address Res
101. ke CSV file with all objects logs and send to external FTP server with IP 192 168 1 11 login ftplogin password ftppassword e In Scripting gt Scheduled add the script which will run once an hour Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization icons Utilities Enocean Alerts Logs Error log Help Event basec Resident 2 X Scheduled script x Script name FTP CSV log Minute Script name Start at cron forn Editor Active Hour Floor heating on 06 16 e o Floor heating off 08 19 Day of the month m x security lighting 0 0 23 Month of the year Every month of the year gt 2 we Schedule 00 06 matte Day of the week Every day of the week v E auto shutter control 9 Active Category Y Description Save Cancel Version 20120104 Embedded Systems 2011 Add the following code in Script editor for this particular script l require socket ftp 3 ftp file 4 ftpfile string format ftp ftplogin ftppassword 192 168 1 11 s csv os date Y m d_ H M 2 get past hour data 3600 seconds 6 logtime os time 60 60 8 List of objects by id 9 10 11 objects with Logging enabled 12 query SELECT address datatype FROM objects WHERE disablelog 0 19 object inipairs 66 getall query 14 ob
102. le or disabled red circle gt Category a new or existing name of the category the script will be included This will not affect on script action helps only by grouping the scripts and watching by categories in Tools gt Print script listings page Description description of the script 49 List of scripts Logic Machine Scripting Objects Object logs Schedulers Trend logs Event based Resident Scheduled Y m Script name Sleep interval seconds test 10 test2 1 222 1 Version 20130207 Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log User libraries Common functions Start up init script Tools g NUS Description Category Duplicate Editor Active Gh led There five actions you can do with each of the script Duplicate Duplicate the script with its source code Editor Enter scripting editor to write specific code for the particular program Active Make script active green or deactivate it red Edit Edit script name description category and other parameters Delete Delete the script When pressing this icon the confirmation 15 asked to accept the delete 1 1 2 Event based scripting Help Start page Embedded Systems 2013 Event based scripting can be used to implement custom logic for group address events User defined function is executed when a group write or group read if checked whi
103. le adding the script event occurs for given group address Event information is stored in global event variable Variable contents dstraw integer raw destination group address e srcraw integer raw source individual address e dst string decoded destination group address for example 1 1 4 e src string decoded source individual address for example 1 1 2 e type string type of event either groupwrite eroupread groupresponse Currently user defined scripts are bound to group write events only dataraw integer string raw binary data e datahex string data as a hex encoded string which can be used to convert value to Lua variable Note event variable is available only in Event based functions not in Resident and Scheduled Note All event based scripts are executed in a single queue like manner Make sure event scripts do not contain infinite loops sleep calls or other blocking parts 50 Note To get event value in scripts use the following command a event getvalue 1 2 3 Resident scripting Resident scripts are executed infinite amount of times Scripts are put into inactive state after each call and are resumed after delay timer expires Noteleven though resident scripts are executed in parallel they should not have infinite loops or it will not be possible to reload scripts after editing 1 2 4 Scheduled scripting Scheduled scripts are executed when the
104. ndler program A resident script for SMS handler should be created with sleep interval 0 following code Note Change white list telephone numbers and SIM card s PIN code in the below script l init 146 ifnot modem then allowed numbers SMS message from other number will be ignored numbers 1234567890 0123456789 replace 0000 with SIM pin number or remove the Line below if PIN check is disabled pincode 9000 modem communication port ttyUSB2 for Huawei E173 comport ttyUSB2 O Ol d N 9 open serial port 10 modem AT init dev comport 11 command parser 135 parser function cmd sender 13 local find pos name mode offset value jvalue obj 145 cmagscmadst trm lo mode zcmd sub 1 1 upper 16 if mode W or mode R then 17 18 parse object name address 19 find seomorsub 1 and 20 offset find and 1 or 21 pad with space when in read mode 22 if mode R and find then ABo CHOBEN ss 24 25 find name 26 poszszcmd find find 1 offset true 21 name end not found stop 28 ifnotposthen 29 returnfalse 30 end 3l get name part dub a name somd sub l or f56rt pos Of r sser trimp 33 if mode W then 34 valus orfset ttrimt 35 ifnot value then 36 returnfalse 37 end 38 try decoding value 394 7valu
105. negative and are interpreted as indexing backwards from the end of the string Thus the last character is at position 1 and so on The string library provides all its functions inside the table string It also sets a metatable for strings where the index field points to the string table Therefore you can use the string functions in object oriented style For instance string byte s i can be written as s byte i The string library assumes one byte character encodings string trim str Trims the leading and trailing spaces off a given string string split str sep Splits string by given separator string Returns Lua table string byte s i j Returns the internal numerical codes of the characters 5 1 s i4 1 s j The default value for i is 1 the default value for j is 1 Note that numerical codes are not necessarily portable across platforms string char Receives zero or more integers Returns a string with length equal to the number of arguments in which each character has the internal numerical code equal to its corresponding argument Note that numerical codes are not necessarily portable across platforms string find s pattern init plain Looks for the first match of pattern in the string s If it finds a match then find returns the indices of s where this occurrence starts and ends otherwise it returns nil A third optional numerical argument init specifies where to start the search its
106. nged to lowercase All other characters are left unchanged The definition of what an uppercase letter is depends on the current locale string match s pattern init Looks for the first match of pattern in the string s If it finds one then match returns the captures from the pattern otherwise it returns nil If pattern specifies no captures then the whole match is returned A third optional numerical argument init specifies where to start the search its default value is 1 and can be negative string rep s n Returns a string that 1s the concatenation of n copies of the string s string reverse s Returns a string that 1s the string s reversed string sub s i j Returns the substring of s that starts at 1 and continues until j 1 and j can be negative If j is absent then it is assumed to be equal to 1 which is the same as the string length In particular the call string 1 7 returns a prefix of 5 with length j and string sub s i returns a suffix of s with length 7 string upper s Receives a string and returns a copy of this string with all lowercase letters changed to uppercase All other characters are left unchanged The definition of what a lowercase letter is depends on the current locale Patterns Character Class A character class 15 used to represent a set of characters The following combinations are allowed in describing a character class e x where x is not one of the magic charact
107. nk to object 1 1 23 New object o Lock object MIEL Write to bus j Voltage Binary On Off i Binary Short Long Step dimmer Short press Send 0 Long press 1 second Send 1 v Midpoint voltage 1 Comments Sawe Cancel gt Name name of the port gt Link to object group address to link the object with By pressing the F button the field will be automatically filled with the next free group address gt Status object status object group address gt Lock object lock object group address Write to bus defines either to write or not to bus on value change gt Mode Voltage Binary On Off Binary Short Long Step dimmer input mode gt Short press rising edge Send 0 Send 1 Toggle action on short press gt Long press 1 second Send 0 Send 1 Toggle action on long press gt Midpoint voltage voltage midpoint to determine the Short Long state 45 Step dimmer Analog input 1 VVVVVVV WV Name Link to object Lock object Write to bus Mode Dimmer step 95 On preset Midpoint voltage Comments Analog input 1 1 1 23 New object Ei Voltage Binary On Off 5 Binary Short Long Step dimmer 10 50 10 Save Cancel Name name of the port Link to object group address to link the object with By pressing the amp button the field will be automatically filled with the next fr
108. nt plan in case you have several smaller plans on one visualization and want to display the current one Font size size of font Text style text style bold italic underscore Custom font font name Font color font color YYYY NN NN NN Once the floor link parameters are defined press Add to plan button and newly created object will appear You can move the object to the location it will be located Note that while being in editing mode the object will not work Press on Save and reload plan button so the objects starts functioning 1 8 4 Camera Logic Machine supports third party IP web camera integration into its visualization 94 Logic Machine Scripting Objects Object logs Schedulers Structure E Stud tudy 22 Layouts Widgets Vertical guide 1024 Horizontal guide 768 VVVVVV V Note If IP camera requires user name and password enter the url in form Trend logs Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Help tink to lounge Source url source address of the video stream Width sub window width for displaying of picture Height sub window height for displaying of picture Custom name name for the object Icon icon for the object Auto open window automatically open video window Hide background hide icon background http USER PASSWORD IP Plan editor Object Plan link Came
109. o a binary string 1 2 23 operators bit bnot value Binary not bit band 1 x2 Binary and between any number of variables bit bor x1 x2 Binary and between any number of variables bit bxor x1 x2 Binary and between any number of variables bit lshift value shift Left binary shift bit rshift value shift Right binary shift 66 1 2 24 Input and Output Facilities The I O library provides two different styles for file manipulation The first one uses implicit file descriptors that is there are operations to set a default input file and a default output file and all input output operations are over these default files The second style uses explicit file descriptors When using implicit file descriptors all operations are supplied by table io When using explicit file descriptors the operation io open returns a file descriptor and then all operations are supplied as methods of the file descriptor The table io also provides three predefined file descriptors with their usual meanings from C 10 514 io stdout and io stderr The I O library never closes these files Unless otherwise stated all I O functions return ni on failure plus an error message as a second result and a system dependent error code as a third result and some value different from on SUCCESS io close file Equivalent to file close Without a file closes the default output file io flush Equival
110. olution Protocol table is listed in Network ARP table ARP table X Interface IP address Mask MAC address Flags etho 192 168 1 208 00 0 2 2 35 9 Ox etho 192 168 1 100 us D0 1c cO 54 88 cb Ox 4 9 FTP server You can enable access to FTP server of Logic Machine by enabling this service in Service 2 FTP Server FTP server _ Server status Enabled A Fort 21 Username ftp Password e Leave password to blank to keep it unchanged Server status secure tunnel mode Port port of the service gt Username login name ftp Password password length 4 20 symbols 118 4 10 System monitoring System monitoring is used to monitor system processes hardware In case of failure the system will be rebooted or specific task restarted System monitoring x check once in 15 seconds set daemon 15 with start delay 120 reboot system when memory or cpu usage is too high check system SHOST if cpu usage user gt 90 for 20 cycles then exec sbin reboot if memory usage gt 90 for 10 cycles then exec sbin reboot if loadava 1min gt 18 then exec sbin reboot http server check process uhttpd with pidfile var run uhttpd httpd pid start program etc init d httpd restart stop program etc init d httpd stop if failed port 80 with timeout 20 seconds then restart knx backend check process eibd with pidfile var run eibd start program etc init d eibd restart stop program e
111. on 60 string gmatch s pattern Returns an iterator function that each time it is called returns the next captures from pattern over string s If pattern specifies no captures then the whole match 1s produced in each call As an example the following loop l s hello world from Lua 2 for w in string gmatch s a do d print w 4 end will iterate over all the words from string s printing one per line The next example collects all pairs key value from the given string into a table s ud S from world to Lua for v in string gmatch s w w do LIE end For this function at the start of a pattern does not work as an anchor as this would prevent the iteration string gsub s pattern repl n Returns a copy of s in which all or the first n if given occurrences of the pattern have been replaced by a replacement string specified by repl which can be a string a table or a function gsub also returns as its second value the total number of matches that occurred If repl is a string then its value is used for replacement The character works as an escape character any sequence in repl of the form n with n between 1 and 9 stands for the value of the n th captured substring see below The sequence 0 stands for the whole match The sequence 9696 stands for a single 96 If repl is a table then the table is queried for every match using the first cap
112. on off v Max value 10 Icon sun moon on v IA Max value 20 Icon sun rain on M n 30 icon sun rain off UJ Add icon Save Cancel Once the object parameters are defined press Add to plan button and newly created object will appear You can move the object to the location it will be located Note that while being in editing mode the object will not work When all necessary objects are added press Save and reload plan button so the objects starts functioning You can edit each added object when clicking on it while in Editing mode 93 1 8 3 Plan link In order to make visualization more convenient there are floor links integrated You can add icons or text on the map which links to other floors Plan editor Object Plan link Plan Bedroom up Custom name Hide in Touch Hide background J Display mode Icon P Icon goto down png m Active state icon goto right png Add to plan Cancel Camera Graph Text label Image Gauge 4 Frame Save and reload plan Plan Linked plan name or link to Schedulers Trends Custom name name for the link Hide background Hide icon background Display mode Icon Value either to show icon or its value Icon Icon which will be showed in visualization 1f chosen no further parameters are available Active state icon active state icon if the link is to curre
113. ons Utilities Enocean Alerts Logs Errar lag le Help Alert time Message 15 02 2012 13 04 13 Yahoo weather forecast Riga 3 T high 13 T low 8 15 02 2012 13 03 13 Yahoo weather forecast Riga 3 T high 13 T lows 8 15 02 2012 13 02 13 Yahoo weather forecast Riga T 3 T high 13 T low 8 15 02 2012 13 01 13 Yahoo weather forecast Riga 3 T high 13 T lows 8 15 02 2012 13 00 13 Yahoo weather forecast Riga 3 T high 13 T low 8 15 02 2012 12 52 13 Yahoo weather forecast Riga T 3 T high 13 T low 8 15 02 2012 12 58 13 Yahoo weather forecast Riga T 3 T high 13 T law 8 15 02 2012 12 57 13 Yahoo weather forecast Riga T 3 T high 13 T law 8 4 4 Page 1 Displaying alerts 1 25 of 162 version 20120104 Embedded Systems 2011 Add new RSS feed in the RSS reader e Use the following URL e http remote remote 192 168 1 211 cgi bin scada remote request cgi m rss amp r alerts e 50 latest alerts will be shown e alert time will be shown in UNIX timestamp alert date will be shown as RFC date D Feedreader 3 14 Sees File View Tools Help Logic Machine alerts Next unread More gt All news URS base 43 i Yahoo weather forecast Riga T 4 T high Yahoo weather 11 28 AM 13 Tlow 8 Unread news 43 Yahoo weather f 11 28 AM ee aM
114. overy For more info please see here http openrb com discover ip of logic machine or streaming player Standards supported GSM dear KNX Logic Machine is compatible with the following standards KNX EIB TP KNXnet IP Modbus TCP Modbus RTU BACnet IP BACnet MS TP in development GSM Huawei E173 and similar modem support through USB for sending SMS notifications and controlling the installation by receiving SMS commands EnOcean built in bi directional transceiver DMX in the box through RS485 DALI support is done over RS485 by using external RS485 DALI interface Ekey biometrical access systems RS485 HVAC systems can be controller through RS232 interface by using scripting SMTP Email SSL SIP works as PBX for controlling calls in development XML export object values alerts or errors RSS read Error or Alert tab content JSON XMPP 18 The system is made so that each of the standards can be used with each other so Logic Machine can act as BACnet to Enocean gateway or Modbus to GSM etc 19 Quick startup guide 1 Mount the device on DIN rail 2 Connect the KNX bus cable 3 Connect 24V power supply to the device red pole to 24V grey pole to GND 4 Connect Ethernet cable coming from the PC Default IP configuration e ert e mm name ConfigurationPassword Read only visview User mode visualization Touch visualization Write vi
115. part Upgrade firmware x Firmware File Choose File Mo File chosen IE will take about 5 minutes upgrade to complete Your system wil reboot twice All config Files wil be kept unchanged Do nat unplug your router while updgrade is in progress 4 4 Reboot Logic Machine You can restart the Logic Machine by executing System gt Reboot command 4 5 Shutdown Logic Machine You can shutdown the Logic Machine by executing System gt Shutdown command It is advisable to shutdown the system before plug out the power because the database is saved safely 114 4 6 Interface configuration Ethernet interface 15 listed in the first tab There are possibilities to disable enable or to take a look at the traffic flow graph using special icons on the right side Interfaces Name Mac address Itu TX Bytes RX Bytes Errors eth 00 1B C5 00 1D 12 1500 OB 7 MB 0 0 By clicking the interface you get to the configuration Interface eth General Protocol Static IF he IP address 192 158 10 956 Network mask 255 255 255 0 Gateway IP 192 158 10 2 DNS server 8 8 8 8 Mtu Ok Cancel gt Protocol specific protocol used for addressing Static IP static IP address By default 192 168 0 10 DHCP use DHCP protocol to get IP configuration 115 Current IP the IP address got from DHCP server This field appears only if the IP address is given otherwise it s hidden Network mask network mas
116. puts OSystems LogicMachine The easiest way to create complex installation MH E COCHE X H Resistive sensors Analog Inputs RS485 1 RS465 2 24V Main The EIA 485 differential line consists of two pins A aka aka TxD RxD aka inverting pin B aka aka TxD RxD aka non inverting pin 11 24V power supply 12 13 14 15 16 1 2 gt dc actor amp LogicMachine S The easiest way to create complex installation openrb com Resistive sensors Analog Inputs RS485 1 RS4B5 2 24V Main 12345 6 123 4 5 6 7 8 80988 688808 054 m 12 Analog inputs e g reed contact THE 01 02 03 04 05 06 07 08 09 10 11 Digital Outputs 12 13 14 15 16 1 2 mbedded i LogicMachine st way to create complex installation Resistive sensors Analog Inputs RS5485 1 RS485 2 24V Main KNX 1 2 3 4 5 6 1 2 3 4 5 6 7 8 CS i Analog inputs 0 10V 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 1 2 Digital Outputs OSystems Reactor lt t CL LogicMachine jest way to create complex installation Resistive sensors Analog Inputs 1 345 8 1 2 4 5 6 7 8 Digital output 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 1 2 Digital Outputs embedded osystems 4 actor LogicMachine
117. r 40C 0C Version 20 130927 57 Tem 02007 13003 CPU IO 0 22 0 25 0 24 Memory 8 111 owing all devices Clear Page 1 of 1 Displaying devices 1 2 of 2 Once the device profile is set you can map functionality of the specific device to KNX group addresses by clicking on Mapping icon 138 Button A 01 1 bit boolean Group address ane O Write to bus Last telegram SEE NR TEES Mapping 00183218 Button B 01 1 bit boolean 02 01 2001 iid d 00225472 4button 02 01 2001 06 56 59 gt Group address Write to bus Button C 01 1 bit boolean Group address Write to bus Button D 01 1 bit boolean Group address Write to bus Options Button A Toggle Button B Toggle Button C Toggle S sS EK Button D Toggle When EnOcean gateway received telegram from specific device the respective row gets light green Select neighbour 00183218 2button 05 02 01 Rocker Switch 2 Rocker 02 01 2001 06 56 57 Version 20130927 PUO 0 31 0 25 Memory 8 Respective KNX group addresses get updated with the new values T Group add Object name Data mm Current value Um enabled Te bject comments Set value d 11742 Pushbutton2 Button 01 1 bit boolean EnOcean FFF63C 11743 Pushbutton3 Button 01 1 bit
118. r line Use e g 1 1 or 1 1 to filter all addresses in the given line Note IP features are required for filter to work gt SRC policy No filter Accept selected individual addresses Drop selected individual addresses policy to apply to the list of source addresses Address list list of individual or group addresses One address per line Use e g 1 1 or 1 1 to filter all addresses in the given line Note KNX IP features should be on for filter to work Destination group filter tab gt DST group filter No filter Accept selected individual addresses Drop selected individual addresses policy to apply to the list of destination group addresses Address list list of group addresses One address per line Use e g 1 1 to filter all addresses in the given line Note KNX IP features should be on for filter to work 28 KNX connection x General SRC filter DST group filter DST indiv filter Secure tunnel DST group filter filter Address list One individual group address per line Use e g 1 1 or 1 1 to filter all addresses in the given line Note KNX IP features are required for filter to work Destination individual filter tab KNX connection x General SRC filter DST group filter DST indiv filter Secure tunnel DST indiv filter Mo filter Address list One individual group address per
119. ra Source url Width Height Custom name Start page http 192 168 1 212 mjpg vi Auto open window 7 Hide background Sort order Graph Text label Image Gauge 300 200 gt P AT Save Duplicate Reset Save and reload plan Once the camera parameters are defined press Add to plan button and newly created object will appear in look of video camera You can move the object to the location it will be located Note that while being in editing mode the object will not work Press on Save and reload plan button so the objects starts functioning By pressing on video camera a new sub window appears with a picture from your IP web camera The window can be freely moved to other location so not to cover other visualization objects 95 Scripting Objects Objectlogs Schedulers Trend logs vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Help B 5 Home Object e rmi Floor 1 zi Floor 2 Main object lia Floor 3 Status object 5 Bungalow Cinema Room Custom name Living Room Read only 7 Dressing Room t lia Kitchen Hide in touch F Conservatory Sort order S ia w C Hide background F im Room B 5 Study E Send fixed value Study Display mode Icon and value M B E Guest House Bedroom Lounge fum Shower Room E Study Tu Add to plan Reset B E Layouts Widgets te
120. ror os time table Returns the current time when called without arguments or a time representing the date and time specified by the given table This table must have fields year month and day and may have fields hour min sec and isdst for a description of these fields see the os date function The returned value is a number whose meaning depends on your system In POSIX Windows and some other systems this number counts the number of seconds since some given start time the epoch In other systems the meaning is not specified and the number returned by time can be used only as an argument to date and difftime os tmpname Returns a string with a file name that can be used for a temporary file The file must be explicitly opened before its use and explicitly removed when no longer needed On some systems POSIX this function also creates a file with that name to avoid security risks Someone else might create the file with wrong permissions in the time between getting the name and creating the file You still have to open the file to use it and to remove it even if you do not use it When possible you may prefer to use io tmpfile which automatically removes the file when the program ends 71 1 2 28 Extended function library toboolean value Converts the given value to boolean using following rules nil boolean false 0 empty string 0 string are treated as false everything else as true string split
121. row address object name tostring data add to buffer table insert buffer csv end end upload to ftp only when there s data in buffer if buffer gt 1 then result err zsocket ftp put ftpfile table concat buffer r n end error while uploading 82 66 if err then 67 alert FTP upload failed s err 68 end 83 1 5 Schedulers Schedulers contain administration of user mode schedulers Schedulers allow for end user to control KNX group address values based on the date or day of the week Logic Machine Start page Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Alerts Logs Error log Help Schedulers Holidays A Name Object Start date End date Events Active ddd 4 1 4 Button D Volume DOWN 01 January 31 December termostats 4 4 3 01 31 Aile OUEST 14 1 01 January 31 December amp Q Programme horaire R 1 0 2 7 01 January 31 December Q Q Programme horaire R 2 1 0 0 01 January 31 December 2 Q march 1 0 0 01 February 31 March test domo 0 2 7 01 January 31 December Version 20130208 Embedded Systems 2013 1 5 1 Add new scheduler Scheduler Object 1 1 6 temp Active Name Thermostat 223 End date 31 December M Cancel gt Object the object group address which will be controlled b
122. rs Valid values are execute script every minute hour or day N execute script every N minutes hours or days N is an integer script is executed when current value divided by N gives 0 in modulo For example script with hour parameter set to 8 will be executed when hour 15 0 8 and 16 N execute script exactly at N minute hour or day N K execute script when minute hour or day is between N K range inclusive N K it is possible to specify several N and N K type parameters separated by comma For example script with minute parameter set to 15 50 52 will get executed when minute is 15 50 51 and 52 1 2 16 Time function os Sleep delay Delay the next command execution for the delay seconds os microtime Returns two values current timestamp in seconds and timestamp fraction in nanoseconds os udifftime sec usec Returns time difference as floating point value between now and timestamp components passed to this function seconds nanoseconds 1 2 17 Data Serialization serialize encode value Generates a storable representation of a value serialize decode value Creates a Lua value from a stored representation 58 1 2 18 String functions This library provides generic functions for string manipulation such as finding and extracting substrings and pattern matching When indexing a string in Lua the first character is at position not at O as in C Indices are allowed to be
123. s Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Help Name Object Log type 1 minute data Hourly data Daily data Monthly data Log size Created Test1233 5 1 8 Absolute value 1 hour 1 year 1 year 1 year 73 KB 2012 11 15 02 00 Setpoint 1 1 46 temp Absolute value 1 hour 30 days 30 days 1 year 2 KB 2013 02 12 15 25 Q Add new trend log Version 20130208 Embedded Systems 2013 1 6 1 Add new trend log Trend log X Object 1 1 6 temp Setpoint Log type bd 1 minute data 1 hour Hourly data 30 days M Daily data 30 days M Monthly data 1 year Save Cancel Object choose from list of object the one to make trends for Name name of the trend Log type Counter Absolute value type of the log Counter type is used to count the date Absolute value saves the actual readings I minute data average value of 1 minute for specific time interval data will be shown on the trend E g if 1 hour trend step will be 1 hour with average 60 readings data Hourly data average value of hourly data for specific time interval Daily data average value of daily data for specific time interval 86 Monthly data average value of monthly data for specific time interval Note One trend data point reading takes 8 bytes of flash memory E g reading some value once in every 10 minutes will consume 0 4MB of flash each year 1 7 Visualization structure
124. s from table the element at position pos shifting down other elements to close the space if necessary Returns the value of the removed element The default value for pos 15 n where n is the length of the table so that a call table remove t removes the last element of table t table sort table comp Sorts table elements in a given order in place from 1 to table n where n is the length of the table If comp is given then it must be a function that receives two table elements and returns true when the first is less than the second so that not comp a i 1 a i will be true after the sort If comp 1s not given then the standard Lua operator is used instead The sort algorithm 1s not stable that 1s elements considered equal by the given order may have their relative positions changed by the sort 1 2 27 Operating system facilities os date format time Returns a string or a table containing date and time formatted according to the given string format If the time argument is present this 1s the time to be formatted see the os time function for a description of this value Otherwise date formats the current time If format starts with then the date is formatted in Coordinated Universal Time After this optional character if format 15 the string t then date returns a table with the following fields year four digits month 1 12 day 1 31 hour 0 23 min 0 59 sec 0 61 wday weekd
125. scontrol Login name Write admin level visadmin Read only visview User mode visualization Touch visualization Write viscontrol Password Write admin level visadmin IP address on LAN 192 168 0 10 Networks mask on LAN 255 255 255 0 Change IP settings In Network gt Interfaces window click on the specific interface to change the IP settings 20 Interface eth General Protocol Static IP IP address 192 168 0 10 Network mask 255 255 255 0 Gateway IP DNS server gt Protocol specific protocol used for addressing o Static IP static IP address By default 192 168 0 10 o DHCP use DHCP protocol to get IP configuration Current IP the IP address got from DHCP server This field appears only if the IP address 1s given otherwise it s hidden Network mask network mask By default 255 255 255 0 24 Gateway IP gateway IP address DNS server DNS server IP address MTU maximum transmission unit the largest size of the packet which could be passed in the communication protocol By default 1500 When changes done the following icon appears in top right corner This should be applied changes to take effect 21 Discover Logic Machine IP address Windows PC Easiest way is by using the utility ServiceBrowser which can be downloaded here http marknelson us 201 I 10 25 dns service discovery on windows http tcp H AXIS M1011 00408C8F 1
126. st Plan link Link to lounge g Sah Text label E Image Gauge at Unlock current plan for editing 1 8 5 Graph Real time graphs be integrated into visualization system to monitor the current and old value of scale type objects Make sure logging is enabled for the object in Object tab which values is planned to be shown in the graph o Ss Home Floor 1 Floor 2 08 Floor 3 8 5 Bungalow rmi Cinema Room Living Room lia Dressing Room lia Kitchen lia Conservatory lia W C Utitiy Room E Study Study 2 E Guest House im Bedroom lig Lounge fig Shower Room o E Study ial Study Layouts Widgets test E g 8 Aa HS x Data object 1 1 5 temp Custom name Width 1640 Height 480 Number of points 10 lt gt lt gt Auto open window 7 Hide background F Addtoplan Reset Text label Gauge 7 Save and reload plan Data object group address of the object Custom name name of the object Icon icon to launch the graph Width sub window width for displaying the graph Height sub window height for displaying the graph Number of points number of data points to show in the
127. st functions use alias parameter object group address or unique object name e g 1 1 1 or My object grp getvalue alias Returns value for the given alias or Lua nil when object cannot be found grp find alias Returns single object for the given alias Object value will be decoded automatically only if the data type has been specified in the Objects module Returns Lua nil when object cannot be found otherwise it returns Lua table with the following items e address object group address updatetime latest update time in UNIX timestamp format Use Lua os date to convert to readable date formats When object data type has been specified in the Objects module the following fields are available e name unique object name e datatype object data type as specified by user e decoded set to true when decoded value is available e value decoded object value grp tag tags mode Returns Luatable containing objects with the given tag Tags parameter can be either Lua table or a string Mode parameter can be either all return objects that have all of the given tags or any default returns objects that have any of the given tags You can useReturned object functions on the returned table grp alias alias Converts group address to object name or name to address Returns Lua nil when object cannot be found 1 2 7 Returned object functions group communication functions Objects received
128. stip 192 168 1 7 packet constant data magic HDLMIRACLE lcode string char xAA xAA source device settings srcsubnet 1 srcdevice 254 devicetype xFFFE command types cmd chanreg x 31 single channel regulate chanregreply x 32 single channel regulate answerback chanstat 0x0033 read status of single channel targets chanstatreply x 34 single channel targets status answerback 10 2 Usage example HDL dimmer control Task of this example is to change HDL dimmer value on specific KNX group address change e Add new object in Objects tab e Add Event based script which will monitor newly created object In Scripting Editor specify the following code for this script 1 value sdpt decode evenut datahex dt scale 2 HDL chanreg 1 12 1 value 1 HDL chanreg function description HDL chanreg dstsubnet dstdevice chan value delay Parameters dstsubnet device subnet e dstdevice device address e chan channel number 1 n e value value 0 100 or true false e delay transition time or delay in seconds 0 65535 by default 15 0 Test the program If you change the value for object 4 1 1 in Objects menu with Set Value it will automatically change dimmer state in HDL network 10 3 Usage example HDL relay control Task of this example is to change HDL dimmer value on specific KNX group address change e Add new object in Obj
129. system time matches the specified script start time Scheduled script is run only once after each timer call Scheduled scripting date time format Scheduled scripting uses standard cron Format datetime parameters Valid values are execute script every minute hour or day N execute script every M minutes hours or days M is an integer script is executed when current value divided bv M gives 0 in modulo Far example script with hour parameter set to will be executed when hour is 0 8 and M execute script exactly at M minute hour or execute script when minute hour day is between M K range inclusive ALK it is possible to specify several M and M E type parameters separated by comma Far example script with minute parameter sek to 15 50 52 will get executed when minute is 15 50 51 and 52 1 2 5 Script editor When a script is added icon appears in Editor column that allows opening a script in scripting editor and re working it with built in code snippets 51 1 if condition then dosomething Helpers 1 2 3 end 4 3 5 Conditionals If Then amp If AND Then OR Then If Then Else If Else If E Loops and iterators a E Math E Objects KNX bus aE Storage a E Script control 3j E Alerts and logs a j Time functions 33 j Miscellaneous 33 Serial 3j Modbus a Ss DMX Group addresses Objec
130. t lt address gt 5 1 4 lt address gt lt date gt Tue 14 Feb 2012 23 41 45 1000 lt date gt lt time gt 1329298905 lt time gt lt data gt 13 lt data gt lt datatype gt 9 lt datatype gt lt object gt w lt object gt comment gt lt name gt Weather T High lt name gt lt address gt 5 1 5 lt address gt lt date gt Tue 14 Feb 2012 23 41 45 1000 lt date gt lt time gt 1329298905 lt time gt lt data gt 8 lt data gt lt datatype gt 9 lt datatype gt lt object gt lt fobjects gt Login Password for remote XML request Login and password can be changed in Network Configuration gt System gt GUI Login gt Admin Remote tab GUI login x Admin Remote Visualization Login admin Password Repeat password e Admin user has access to Logic Machine and Metwork Configuration interfaces Login remote Password Repeat password 157 12 1 Alerts Errors values In similar way also Alerts and Errors can be read by XML requests Alerts XML request http remote remote 192 168 0 10 cgi bin scada remote request cgi m xml amp r alerts Errors XML request http remote remote 192 168 0 10 cegi bin scada remote request ce1 mzxml amp r errors 158 13 Read Alerts RSS feeds from Logic Machine It is possible to read Alerts and Errors messages by remote RSS readers Logic Machine Start page Scripting Objects Object logs Buildings Visualization Visualization ic
131. tc init d eibd stop knx monitor check process groupmonitor with pidfile var run gs groupmonitor pid start program sbin reboot stop program sbin reboot 4 11 NTP client NTP servers can be specified in Service gt NTP client window NTP client clock synchronization x server 1 D europe pool ntp org server 2 Leurope pool ntp org server 3 2 europe pool ntp org server 4 3 europe pool ntp org 119 4 12 System status General system status with CPU usage Memory usage Partition information can be seen in Status System status window System status General Memory usage Partitions Parameter Value CPL model ARMS926EJ 5 rev 5 v51 CPU BogoMips 226 09 Linux kernel version 3 10 13 System uptime Od 4h 43m Load averages 0 49 0 36 0 33 4 13 Network status Network overview of IP setting and transferred data can be seen in Status Network status window Network status Mac address IP address Mtu TX Bytes RX Bytes Errors eth 00 1B C5 00 13 4D 192 168 1211 1500 6 MB 6 MB oja mih 120 4 14 Network utilities Ping and Traceroute utilities are located in Status gt Network utilities window Both IP address and DNS names are accepted Network utilities x Ping Traceroute IP Hostname 192 168 1 100 ING 192 168 1 188 192 168 1 188 56 data bytes bytes from 192 168 1 108 560 8 ttl e4 time 8e 4332 ms bytes from 192 168 1 188 5 1 111 64 time 8 385 ms
132. tes Log policy only affects new objects current per abject log settings are kept unchanged Warning excessive object logging degrades performance Save Cancel Interface language interface language List items per page count of lines per page e g Objects Object logs Alerts etc Automatic address range start start group address when using automatic addressing in scripts IO settings and other Discover new objects either KNX object sniffer is enabled If yes once triggered all new objects will appear automatically in the Objects list Object log size max count of object logs Default log policy either to log status change for all objects or only for checked objects Alert log size max count of alerts logged Log size max count of logs Error log size max count of errors logged Usermode sidebar Show docked Show as overlay Hide defines how the side bar is located in Usermode visualization Usermode view Align plans to top left no size limit Center plans limit size Center plans enable auto sizing defines the look of Usermode visualization Show alerts in user mode once new Alerts is triggered it will pop up in User mode visualization 104 Home lt Floor 1 Floor 2 Floor 3 Bungalow Cinema Room Hallway Guest House Bedroom Shower Room Note Interface reload is required when changing List items per page or Language parameter Note If log size is ch
133. ts and import from backup o Append keeping existing s scripts VNN NN Restore scripting backup x Restore mode Remove existings scripts and import from backup Append keeping existings scripts Backup file Select backup file lad cave Cancel gt Print script listings shows all scripts with codes in list format sorted by Categories Category Presence Presence simulator id 1 Type Resident Active Yes Script sleep interval 20 Synchronizes O O 2 value with Q Q 1 if object exists presence variable will be a table nil otherwise presence knxobject get address O O 1 3 check that object exists and data has been decoded presence and presence decoded then result will be either value true nr value false alert valuse tostring presence data update O O0O 2 with the same data knxobject write U 0 2Z presence data dt hool else alertt read error end gt Show logs window show logs in separate window 75 1 3 Objects List of KNX network objects appears in Objects menu The object appears in the list by way of e sniffing the bus for telegrams from unknown group addresses if enabled in Utilities e adding manually e importing ESF file in Utilities Logic Machine Neighbours Select neighbour Startpage Reactor Scripting Objects Object logs Schedulers Trend logs Vis structure Visualization Vis graphics Utilities Enocean
134. ts by name Tags Data types 11 Save Save and close Close The idea is that not knowing the syntaxes you get a helper for writing your own scripts Code snippets save also a time and make the coding much more convenient After clicking on appropriate snippet it automatically adds code to the editor field There are five main groups of Script editor Helpers predefined code snippets like if then statement Helpers consist of three main sub groups Conditionals If Else If If Then etc Loops and iterators Array Repeat Untiletc Math Random value Ceiling Absolute value Round etc Objects KNX bus Get object value Group read Group write Update interval etc Storage Get data from storage Save data to storage Script control Get other script status enable or disable other scripts Alerts and logs Alert Log variables Formatted alert Time functions Delay script execution Miscellaneous Sunrise sunset etc Serial Communication through internal Logic Machine IO ports Modbus Create RTU TCP connection Write register Read register etc DMX Communication with DMX devices Group addresses existing group addresses on the KNX bus Objects by name chose object by name Tags choose object by tag Data types choose object by data type 1 2 6 Object functions erp provides simplified access to the objects stored in the database and group address request helpers 52 Mo
135. ture as the key if the pattern specifies no captures then the whole match is used as the key If repl is a function then this function is called every time a match occurs with all captured substrings passed as arguments in order if the pattern specifies no captures then the whole match is passed as a sole argument If the value returned by the table query or by the function call 15 a string or a number then it 15 used as the replacement string otherwise if it is false or nil then there is no replacement that is the original match 1s kept in the string Examples x string gsub hello world 1 1 gt x hello hello world world string gsub hello world XO 0 1 x hello hello world x string gsub hello world from Lua w s w 2 1 xz world hello Lua from x string gsub home HOME user USER w os getenv gt x home home roberto user roberto X string gsub 445 return 4 5 function s return loadstring s end gt x 445 9 local t mame lua version 5 1 61 string gsub name version tar gz w t gt x lua 5 1 tar gz string len s Receives a string and returns its length The empty string has length 0 Embedded zeros are counted so a O000bc 000 has length 5 string lower s Receives a string and returns a copy of this string with all uppercase letters cha
136. u are using Logic Machine will reboot after successful update Save Cancel Logic Machine for KNX EIB network configuration management with ETS To use Logic Machine with KN Xnet IP functionality and program other KNX bus devices the device should be added into ETS Connection Manager Goto Extras gt Options 2Communication 2 Configure interfaces 24 ETS Connection Manager Configured Connections Properties Serial PENG COM USB i DP KNXnetIP siemens loupe EN net zlpP Mew connectian Standard connection Communication parameters KN amp net IF device PY indicates programming mode active lt gt IP Interface M148 192 158 1 210 LogicM achine 192 158 1 215 IP address D D D D Port 3671 model ENxXnet lP Diagnostic Wizard Put some freely chosen Name for the connection Chose Type KNXnet IP Press Rescan button and then choose from the drop down menu found Logic Machine Press OK Back in Options 2 Communication window select newly created interface as Communication Interface from the drop down menu e To test the communication with ETS press Test button 25 Options Database Presentation Strategy Communication Troubleshooting Select Communication Interface Configure Interfaces achine hal Problem Analysis Make sure that bus status is Online press 2 button in ETS 26
137. urns the hyperbolic sine of x math sqrt x Returns the square root of x You can also use the expression x 0 5 to compute this value math tan x Returns the tangent of x assumed to be in radians 69 math tanh x Returns the hyperbolic tangent of x 1 2 26 Table manipulations This library provides generic functions for table manipulation It provides all its functions inside the table table Most functions in the table library assume that the table represents an array or a list For these functions when we talk about the length of a table we mean the result of the length operator table concat table sep i J Given an array where all elements are strings or numbers returns table i sep table i4 1 sep table j The default value for sep 1s the empty string the default for i 1s 1 and the default for j is the length of the table If 7 is greater than j returns the empty string table insert table pos value Inserts element value at position pos in table shifting up other elements to open space if necessary The default value for pos is n where n is the length of the table so that a call table insert t x inserts x at the end of table t table maxn table Returns the largest positive numerical index of the given table or zero if the table has no positive numerical indices To do its job this function does a linear traversal of the whole table table remove table pos Remove
138. us Create Modbus TCP object Open Modbus TCP connection Z Set slave address E Read single Read multiple coils 11 mb close E Read discrete input 12 Read registers 13 E Read input registers single bit write multiple bits single register multiple registers Close modbus connection E IP 192 168 1 2 port 1234 192 168 1 2 1234 mb connecti read from address 1000 value mb ireadreqgqisters 1000 Bet register at address 1000 to 123 mh writeregistersil 00 123 Ol 1 tn Group addresses Objects by name Tags HI Data types Save Cancel 7 1 Master functions mb setslave slaveid Sets slave 14 to read write data from to mb readcoils start count mb readdiscreteinputs start count mb readregisters start count mb readinputregisters start count Reads count registers coils from the start address Returns all values on success and nil error description on error mb writebits start v1 v2 v3 mb writeregisters start v1 v2 v3 Writes values to registers coils from the start address Single write will be used when only one value is supplied multiple write otherwise Returns all of values written on success and nil error 127 description on error mb reportslaveid Reads slave internal data Returns values on success and nil error description on error 7 2 Visual
139. uts ZU getinputregisters 21 getregisters 22 setcoils PC setdiscreteinputs 24 setinputregisters ds setregisters 285 Jy 23 new connecton init 28 new function 29 require rpc 30 local mb setmetatable index mbproxy 32 mb slaveid 33 mb rpc rpc client 127 0 0 1 28002 34 99s for _ fn in ipairs mbproxy functions do 36 mb fw function self e 37 return mb request fn 384 end 35 end 40 A1 return mb 42 end a3 4 44 45 set Local sLave id 130 46 function mbproxy setslave slaveid 47 self slaveid slaveid 48 end 49 50 send rpc request for a spefic function 51 function mbproxy request fn local res err self rpc request D ds fn fn 54 params ses 554 slaveid self slaveid or 56 57 58 request error 59 if err then 60 return nil err 61 request ok 82 else 63 reply with an error 64 if res 1 nil then 65 return nil res 2 664 normal reply 67 else 68 return unpack res 69 end 10 end 71 end Handler resident script with 0 delay configuration 1 mb open dev ttyS2 38400 E 8 1 set baudrate and other serial port parameters 2 mb setslave 10 set slave device id 3 mb setmapping 10 10 10 10 set number coils discrete inputs holding registers and input registers 4 mb setwritecoilcb
140. y scheduler gt Active define this scheduler as active or not gt Name name of the scheduler gt Start date start date of the scheduler gt End date end date of the scheduler 84 1 5 2 Scheduler events Events for scheduler Thermostat x Start time Days of the week Value Active 12 00 We Th 24 X 22 00 Tu We Th 20 o a Add new event Event can be added both in administrator interface as well as by end user in the special User mode schedulers interface Event X Active v value Start time 25 00 Days of the week th Esa Esu v Hol Sawe Cancel Active define the event active or not Value value to send to the group address when the event will be triggered Start time start time for the event Days of the week days of the week when the event will be triggered Hol holidays which are defined in Holidays tab 1 5 3 Scheduler holidays Once the event will be marked to run in Hol Holiday entries will be activated Holiday X Name New Year Date 31 December 2013 Leave year blank for recurring holidays Save Cancel 85 Name the name of the holiday entry Date date of the holiday 1 6 Trend logs Trends logs are administration of user mode trends used to see historical object graphical values compare with other period values Logic Machine Start page Scripting Objects Object logs Schedulers Trend log
141. zation map Start page Object Plan link Graph Text label 7 5 Objects Objectlogs Schedulers Trendlogs Vis structure Visualization Vis icons Utilities Enocean Alerts Logs Error log Q Help G3 5 Home im Floor 1 iia Floor 2 Floor 3 5 Bungalow Cinema Room im Living Room Dressing Room im Kitchen ig Conservatory ia w c Room 5 Study Study 3 Guest House um Bedroom im Lounge Shower Room 3 Study Study 3 5 Layouts Widgets im test Text Text label Font size 16 Text styles B 7 Eu Custom font Tahoma m Font color 339966 2 _Addto plan Reset Save and reload plan Vertical guide ho SN Horizontal guide 768 Isl Text label text Font size label font size Text style style of the text bold italic underscored Custom font font name Font color label font color VVVV V 97 Once the label parameters are defined press Add to plan button and newly created object will appear on the map You can move the object to the location it will be located Press on Save and reload plan button so the objects starts functioning 1 8 7 Image Image section allows adding images from the internet into the visualiz
Download Pdf Manuals
Related Search
Related Contents
Samsung MM-E330D Käyttöopas Zotac ZT-70701-10M NVIDIA GeForce GTX 750 1GB graphics card 2 mg/ml ca May 2010 - Center Olympia 1x100 DIN A5 80 micron Guía de operación 3416 Copyright © All rights reserved.
Failed to retrieve file