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.

Integration with ETS
#9
Hi,

Try this:
Code:
-- Load needed libs require('uci') require('json') -- Add objects without data type add_no_dpt = true jsonstring = [[ -- Paste here your JSON result from http://openrb.com/knxproj/ ]] -- Create formadata formdata = {   file = jsonstring,   json = true,   addempty = add_no_dpt, -- optional "add groups without data type" } -- Function to get vars function getvar(k)   return formdata[ k ] end -- Function upload (dummy) function upload()  -- empty function must be here as normaly the file gets uploaded end -- Execute action to create objects from JSON res = dofile('/lib/genohm-scada/web/objects/import.lua') --log(res) -- Disable current script script.disable(_SCRIPTNAME)
Reply


Messages In This Thread
Integration with ETS - by mjaanes - 01.12.2018, 10:33
RE: Integration with ETS - by Kai-Roger - 01.12.2018, 11:23
Integration with ETS - by mjaanes - 01.12.2018, 12:38
RE: Integration with ETS - by Kai-Roger - 01.12.2018, 13:29
Integration with ETS - by mjaanes - 17.01.2019, 13:55
RE: Integration with ETS - by Trond Hoyem - 18.02.2019, 07:12
RE: Integration with ETS - by Erwin van der Zwart - 18.02.2019, 22:58

Forum Jump: