• Professional advice
  • Order before 23.59 uur shipped today (choose Trunkrs)
  • Almost always available (+31 73 762 0 762)
  • Monday open late (odd weeks)

Halloween Light fir Home Center 2

Halloween lightws | HC2

Mark, a ROBBshop customer, has made a scary halloween scene for a light of your choice.
 

Pretty scary | Halloween scene for HC2

 

Below the code for the spooky Halloween scene. Enter the ID of the lamp that you want to use as a Halloween lamp.
What else do you need?

- FIBARO Home center 2
- Slimme z-wave dimmer

--[[
%% properties
--]]
local light_id = 59
local function setBrightness(dev, v)
  local br=0
  nv=0
  if (v > 60) then
    nv = 70
  else
    nv = 0
  end
  fibaro:call(dev,'setValue',nv)
  while not (br ~= v) do
    br = fibaro:getValue(dev, 'value')
    --fibaro:debug('br: '..br..'     v: '..v)
    fibaro:sleep(100)
  end  
end

while true do
  max_br=100
  fibaro:debug('Sending spooky light commands...')
  for i=1,500 do
    ran = tonumber(math.random())
    nv = math.ceil(max_br*ran)
    setBrightness(light_id,nv)
  end
  fibaro:debug('Waiting for command buffer to clear...')
  fibaro:sleep(21000)
end

 

Nice to combine with a smart doorbell or motion detector.
I wish you many scared moments.

 

3 Result(s)
3 Result(s)
 
Customer Service Phone

+31737620762
mon-fri: 10am-5pm and sat 10am-3pm

 
Adress

Gerstakker 16 5236 VG Empel Netherlands

Google maps