Page 1 of 1

espeasy + domoticz to dimmer light

Posted: 17 Oct 2018, 12:22
by megamarco83
Hi, i would have a nodemcu, with espeasy firmware and i would like to control and dimmer a light that is also controlled/dimmered by domoticz
is it possible?
for dimmer the light "phisically" i can use a rotary encoder connected to nodemcu and in espeasy inser a device as rotary encoder.
for connection of the light i can use this:
https://robotdyn.com/ac-light-dimmer-mo ... -110v.html
https://arduinodiy.wordpress.com/2018/0 ... -via-mqtt/
but what kind of device i need to use in espeasy to control it?
and how can menage the control/dimmering the light using domoticz<->espeasy?
thanks

Re: espeasy + domoticz to dimmer light

Posted: 17 Oct 2018, 12:25
by grovkillen
It seems to be controlled using PWM level.

Re: espeasy + domoticz to dimmer light

Posted: 17 Oct 2018, 14:00
by megamarco83
but there are two pin: pwm and zero crossing
how to menage the zero crossing??

Re: espeasy + domoticz to dimmer light

Posted: 19 Oct 2018, 09:45
by megamarco83
mmm...no one that used espeasy and domoticz to dimmer a light? :)

Re: espeasy + domoticz to dimmer light

Posted: 19 Oct 2018, 20:26
by kimot
ESPeasy to Domoticz:
Use SendToHTTP using JSON API:

Set a dimmable light to a certain level

/json.htm?type=command&param=switchlight&idx=99&switchcmd=Set%20Level&level=6

Some lights have 100 dim levels (like zwave and others), other hardware (kaku/lightwaverf) have other ranges like 16/32
Level should be the dim level (not percentage), like 0-16 or 0-100 depending on the hardware used
When the light is off, it will be turned on

{
"status" : "OK",
"title" : "SwitchLight"
}


Domoticz to ESPeasy:
Use LUA script on Domoticz and event on ESPeasy

Inspiration:
http://www.domoticz.com/forum/viewtopic.php?t=21454

Re: espeasy + domoticz to dimmer light

Posted: 08 Nov 2018, 01:09
by megamarco83
kimot wrote: 19 Oct 2018, 20:26 ESPeasy to Domoticz:
Use SendToHTTP using JSON API:

Set a dimmable light to a certain level

/json.htm?type=command&param=switchlight&idx=99&switchcmd=Set%20Level&level=6

Some lights have 100 dim levels (like zwave and others), other hardware (kaku/lightwaverf) have other ranges like 16/32
Level should be the dim level (not percentage), like 0-16 or 0-100 depending on the hardware used
When the light is off, it will be turned on

{
"status" : "OK",
"title" : "SwitchLight"
}


Domoticz to ESPeasy:
Use LUA script on Domoticz and event on ESPeasy

Inspiration:
http://www.domoticz.com/forum/viewtopic.php?t=21454
today is arrived this one:
https://robotdyn.com/ac-light-dimmer-mo ... -110v.html
i connect PWN pin with GPIO 13 on nodemcu with espeasy
i set task1 as switch (normal switch) and send to controller idx of domoticz dummy device
but now if i simply use the http command i'm not able to dimmer the light (i connect an old tungstene light ) it could be only on or off
i use:
http://192.168.0.154/control?cmd=pwm,13,0
http://192.168.0.154/control?cmd=pwm,13,100
http://192.168.0.154/control?cmd=pwm,13,500
http://192.168.0.154/control?cmd=pwm,13,900
but i can not dimmer

should i use also the zero-crossing ping? how to set with espeasy?
thanks

Re: espeasy + domoticz to dimmer light

Posted: 09 Nov 2018, 20:01
by Meek
With that module, for effectively dim your lights, you would need a logic controller to detect the zero crsossing and fire up the output (triac?) at the right time.

I happen to develop such Wi-Fi enabled dimmer and I’m using an ESP12 for Wi-Fi communications and other control “stuff” and a dedicated AVR to do the zero crossing and firing up the triac.
MeekDimmer.jpg
MeekDimmer.jpg (143.28 KiB) Viewed 9285 times

Re: espeasy + domoticz to dimmer light

Posted: 10 Nov 2018, 10:00
by Domosapiens
Looks very professional ..Meek.