espeasy + domoticz to dimmer light

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

espeasy + domoticz to dimmer light

#1 Post by megamarco83 » 17 Oct 2018, 12:22

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: espeasy + domoticz to dimmer light

#2 Post by grovkillen » 17 Oct 2018, 12:25

It seems to be controlled using PWM level.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: espeasy + domoticz to dimmer light

#3 Post by megamarco83 » 17 Oct 2018, 14:00

but there are two pin: pwm and zero crossing
how to menage the zero crossing??

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: espeasy + domoticz to dimmer light

#4 Post by megamarco83 » 19 Oct 2018, 09:45

mmm...no one that used espeasy and domoticz to dimmer a light? :)

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: espeasy + domoticz to dimmer light

#5 Post by kimot » 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

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: espeasy + domoticz to dimmer light

#6 Post by megamarco83 » 08 Nov 2018, 01:09

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

Meek
Normal user
Posts: 59
Joined: 31 Oct 2017, 15:50
Contact:

Re: espeasy + domoticz to dimmer light

#7 Post by Meek » 09 Nov 2018, 20:01

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 9286 times

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: espeasy + domoticz to dimmer light

#8 Post by Domosapiens » 10 Nov 2018, 10:00

Looks very professional ..Meek.
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests