Intelligent dimmer

Moderator: leecollings

Post Reply
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Intelligent dimmer

Post 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? :?:
Hans
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Intelligent dimmer

Post 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.
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest