Page 1 of 1

Creating a Dimmer without any Switch/Light option

Posted: Wednesday 24 October 2018 12:01
by pipiche
In the context of a dimmable Bulbe, I would like to create a domoticz device which is a simple dimmer (without the Switch capability) .
The reason behind that is that a Bulbe could have a level control set to 100% , but still off and from an update standpoint, so basically when you collect what is the level of the bulbe dimm then you get 100% and when updating Domoticz it get On , while the Bulbe is still Off

Re: Creating a Dimmer without any Switch/Light option

Posted: Wednesday 24 October 2018 12:10
by emme
the dimmer control act exactely that way

the dimmer slide move from 0% to 100% the brightness (dim level)
then if you click on the icon you get on/off control

I think that by design 0% act also as off, so to avoid it simply put at 1%....
ciao
M

Re: Creating a Dimmer without any Switch/Light option

Posted: Wednesday 24 October 2018 12:14
by pipiche
@emme, that what I understood,

My point is that in the reality I can have a dimmer to 100% but still Off and I'm wondering what is the way to do it in Domesticz.

Re: Creating a Dimmer without any Switch/Light option

Posted: Wednesday 24 October 2018 12:26
by emme
.mh... so I think I do not understand your question.....

...you have 2 different commands with dimmers:
- Switch ON/OFF
- Dim level (value 0..100 in percentage)

so you can actually have a dimmer set to 100% and actually off.
if you switch it on (physically or logically) it will power to the last level.

at code level (dzVents) you can use instruction like:

domoticz.devices('myDimmer').dimTo(100) -- set dimmer to full power
domoticz.devices('myDimmer').switchOff() -- off the dimmer

domoticz.devices('myDimmer').switchOn() -- back to old level (100)

was this what were you looking for?

Re: Creating a Dimmer without any Switch/Light option

Posted: Wednesday 24 October 2018 13:40
by pipiche
emme wrote: Wednesday 24 October 2018 12:26 ...you have 2 different commands with dimmers:
- Switch ON/OFF
- Dim level (value 0..100 in percentage)
That is exactly what I want to do, but not from dzVents, but from a Python Plugin !