Page 1 of 1

Intelligent dimmer

Posted: Monday 07 March 2016 23:23
by manjh
I am in the process of migrating my domotica solutions from a Nodo environment to Domoticz. I use RFLink and a wide range of KAKU devices.
Most simple solutions are a piece of cake, but I ran into a real tough one, for which I am looking for some creative minds to help.

I have a dimmer, which is controlled by three triggers: motion sensor, time, and a switch.
The dimmer mechanism itself is controlled by the value of a variable.
Value 1 is "off", 2 is 25%, 3 is 50%, 4 is 75% and 5 is 100%.
Based on the variable value, a KAKU is sent out automatically.

Motion sensor switches the value to 4 (at night only), and starts a timer.
When the timer runs out, it decreases the value with 1, and restarts itself.
When value reaches 2, timer is cancelled, so the light stays on at lowest level.

The on/off switch will increase/decrease the variable with 1.
Whenever the variable reaches 0, it is reset to 1. When it reaches 6, it is set to 5.

This functions great in Nodo at the moment. The lights in my kitchen ceiling are at 100% as long as someone is moving there. When the kitchen is empty, the light slowly dims until it reaches the low level. As soon as someone enters, it goes back to 100%.

My question is: can we do something like this in Domoticz? :?:

Re: Intelligent dimmer

Posted: Monday 07 March 2016 23:49
by simonrg
manjh wrote:My question is: can we do something like this in Domoticz? :?:
Simple answer is yes.

Your best bet is to write Lua scripts. There are several types of scripts here you will need device scripts which will be activated when a switch is pressed and time scripts which will dim your lights after time etc.. If you have a look through the wiki you will get an idea of how the scripts work - http://www.domoticz.com/wiki/Scripts#Lua_Scripts.