Logic Machine Forum
Some LM Ambient questions - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Some LM Ambient questions (/showthread.php?tid=730)



Some LM Ambient questions - leonidas - 11.04.2017

Hello, just started testing LM Ambient and came up with few questions:
  1. Is it possible to control front LED with KNX object? (now it's always off)
  2. How to control buzzer with KNX object? (for alarming)
  3. When using gesture mode, can I adjust RGB LED light intensity?
  4. In LM-Wall tab where is 4 sensors (air,humidity, etc.). If I delete one of those by mistake, how can I add it back?
  5. To add thermostat feature should I use scripts or there is some default function for it?
Really appreciate any help Smile


RE: Some LM Ambient questions - admin - 11.04.2017

1. In LM-Wall tab, there's LED Config button. Front LED is called "Ambient LED"

2. Try this:
Code:
function beep(freq, time)
  local path = '/sys/class/pwm/pwmchip0/pwm1/'
  io.writefile(path .. 'enable', 1)
  
  local period = math.floor(10 ^ 9 / freq)    
  local cycle = math.floor(period / 2)

  io.writefile(path .. 'period', period)
  io.writefile(path .. 'duty_cycle', cycle)

  os.sleep(time)

  io.writefile(path .. 'enable', 0)
end

-- 700hz for 1/10 second
beep(700, 0.1)

3. Not possible at this moment

4. It does not actually delete anything, it just resets the configuraion to default. If you delete the home page app, you can re-install it through the app admin

5. Only via a script


RE: Some LM Ambient questions - leonidas - 11.04.2017

Should I somehow enable front LED?
Because by adding object LM-wall -> LED config -> Ambient LED and sending some % value to it doesn't turn LED on


RE: Some LM Ambient questions - admin - 11.04.2017

Looks like a software issue, this will be fixed in the next release which is coming by the end of this month.


RE: Some LM Ambient questions - leonidas - 12.04.2017

Can I do a restore for LM Ambient from LM 5 Lite?

What I want, is to move all logics and visualizations between LM 5 Lite and LM Ambient


RE: Some LM Ambient questions - admin - 12.04.2017

Backups are compatible between these devices


RE: Some LM Ambient questions - gjniewenhuijse - 17.05.2021

(11.04.2017, 07:51)admin Wrote: 2. Try this:
Code:
function beep(freq, time)
  local path = '/sys/class/pwm/pwmchip0/pwm1/'
  io.writefile(path .. 'enable', 1)
 
  local period = math.floor(10 ^ 9 / freq)   
  local cycle = math.floor(period / 2)

  io.writefile(path .. 'period', period)
  io.writefile(path .. 'duty_cycle', cycle)

  os.sleep(time)

  io.writefile(path .. 'enable', 0)
end

-- 700hz for 1/10 second
beep(700, 0.1)

Is this code still working? because my ambient doesn't beep
And is it also possible to control the buzzer volume from this script?