Welcome to the LightHaus Community!

Ask product questions, share tips and solutions, and participate in a range of discussions to fuel your discoveries!

Join the conversation:
  • Appliances
  • Solar Solutions
  • Home Automation
  • Home Eco Products
  • Resources
  • Partners
Reply
Professor
Posts: 39
Registered: ‎01-27-2014

Using Scripting to modify Home Automation

I've heard a lot about LUA for use in Home Automation. Who can tell me about LUA?

local seen={}

function dump(t,i)
	seen[t]=true
	local s={}
	local n=0
	for k in pairs(t) do
		n=n+1 s[n]=k
	end
	table.sort(s)
	for k,v in ipairs(s) do
		print(i,v)
		v=t[v]
		if type(v)=="table" and not seen[v] then
			dump(v,i.."\t")
		end
	end
end

dump(_G,"")

 I found this great site:  www.lua.org that give some examples. Can any EcoHaus products be modified with this code?

Dean
Posts: 41
Registered: ‎12-02-2013

Re: Using Scripting to modify Home Automation

Hi @HaileyB . Good find.  I too have been interested in scripting languages for home automation and came across this other. SMIL - has anybody used it?

Highlighted
Professor
Posts: 23
Registered: ‎02-07-2014

Re: Using Scripting to modify Home Automation

This is very helpful - Thank you!