import export script - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: import export script (/showthread.php?tid=2136) |
import export script - fabiorusco - 29.06.2019 Hello, I need to export all the scripts of a Spacelynk, find and replace the "Main group address" and after import them in another visualization. Is it possible do it? How? Best regards RE: import export script - admin - 01.07.2019 Do you need to replace group addresses in script source code only or trigger group addresses for event scripts as well? RE: import export script - fabiorusco - 02.07.2019 (01.07.2019, 10:54)admin Wrote: Do you need to replace group addresses in script source code only or trigger group addresses for event scripts as well?I need change both, groups addresses in the script sand the trigger groups addresses. RE: import export script - Snoolik - 03.07.2019 (02.07.2019, 05:59)fabiorusco Wrote:(01.07.2019, 10:54)admin Wrote: Do you need to replace group addresses in script source code only or trigger group addresses for event scripts as well?I need change both, groups addresses in the script sand the trigger groups addresses. Hello, I made alike script for shifting all adresses through db updating today. It shifts all ga with a step in modbus mapping, visualization, trends, object logs and a trigger for event scripts. Also it can change name of ga. Code: log('start') For changing scripts you can try this: Code: function shift_knx(addr) Script was very simple just for testing: Code: log(grp.getvalue('0/0/23')) Both of this scripts were tested on 20180828 LM Firmware. Homelynk can have little difference in db structure. If you have any questions, I'll try to answer =) RE: import export script - fabiorusco - 03.07.2019 I only need to change the "Main group address", in all script and trigger group address for event script. example 15/7/1 should be 11/7/1 (from 1 to 17, excluded 15 that is the number from I start). RE: import export script - Snoolik - 04.07.2019 (03.07.2019, 14:32)fabiorusco Wrote: I only need to change the "Main group address", in all script and trigger group address for event script. I edited my past code a bit to improve its understanding and rewrote script for changing ga in body of scripts. Now the "step" is the sum of the three parameters: main group + middle group + group address. If you need to change only main group then you can change first parameter of "step" and other set to 0. |