This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Export objects / GA
#1
Hi @all,

is there any way to export all objects/ GA in a file type that can we reimported later on?

I need to roll back to a month old controller backup and in the meantime I created many new virtual objects and I need to import them after roll back.

Many thanks for your help.

Best regards 
Steffen
Reply
#2
Install LM Sync app.
Reply
#3
Many thanks for the quick reply. Are there any other options? I have no internet access onside to connect to App Store.
Reply
#4
Old fashion script (:

Code:
--Export to FTP
objects_table = db:getall('SELECT * FROM objects')
jsonstring = require('json').encode(objects_table)
io.writefile('/www/user/objects.txt', jsonstring)
script.disable(_SCRIPTNAME)

Copy objects.txt from Apps FTP user folder to your other controller

Code:
--Import from FTP
objectstring = io.readfile('/www/user/objects.txt')
newobjects_table = require('json').pdecode(objectstring)
for _, object in ipairs(newobjects_table) do
  exist = grp.alias(object.name)
  if exist == nil then
    objectaddress = knxlib.decodega(object.address)
    grp.create({
      address = objectaddress,
      name = object.name,
      datatype = object.datatype,
      comment = object.comment,
      units = object.units,
      tags = object.tagcache,
      enums = object.enums,
      visparams = object.visparams,
    })
  end
end
script.disable(_SCRIPTNAME)
Reply
#5
Many thanks for the brilliant help as always!
Reply


Forum Jump: