Domoticz with ESPEasy

I would like to have light with switch (it should work even without domoticz) but I would like to use power of domoticz also ;-)

In ESP (ESP6) I've devices:

  1. Switch input:
    • name: button
    • IDX: 25
    • 1st GPIO: GPIO16
    • Pull UP: set
    • Inversed: not set
    • Switch Type: Switch
    • Switch Button Type: Push Button Active Low
    • Send Boot state: not set (you can set it if you want)
    • Send Data: set
  2. Switch input
    • name: okno
    • IDX: 23
    • 1st GPIO: GPIO16
    • Pull UP: set
    • Inversed: set
    • Switch Type: Input
    • Switch Button Type: Normal Switch
    • Send Boot state: not set (you can set it if you want)
    • Send Data: set
  3. Switch input
    • name: zlew
    • IDX: 24
    • 1st GPIO: GPIO12
    • Pull UP: set
    • Inversed: set
    • Switch Type: Input
    • Switch Button Type: Normal Switch
    • Send Boot state: not set (you can set it if you want)
    • Send Data: set

In domoticz I've three "On/off" switches:

  • "ESP6-okno"
    • IDX: 23
    • On Action: http://esp6.lan/tools?cmd=GPIO,14,0
    • Off Action: http://esp6.lan/tools?cmd=GPIO,14,1
  • "ESP6-zlew"
    • IDX: 24
    • On Action: http://esp6.lan/tools?cmd=GPIO,12,0
    • Off Action: http://esp6.lan/tools?cmd=GPIO,12,1
  • "ESP6-both"
    • IDX: 25
    • On Action: http://esp6.lan/control?cmd=event,zapal
    • Off Action: http://esp6.lan/control?cmd=event,zgas

ESPeasy Rules:

On button#Switch do
  if [button#Switch]=0.00
    event zgas
  else
    event zapal
  endif
endon

on zapal do
  gpio,12,0
  gpio,14,0
endon

on zgas do
  gpio,12,1
  gpio,14,1
endon

As you can see when ESP6-both is changed I call "rules" from ESP

You can read more about rules in Rules Tutorial.

Kommentare

Bitte melden Sie sich Logan oder registrieren Sie sich um kommentieren zu können.

Just my blog...

Mon Di Mi Do Fr Sa So
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
eZ Publish™ copyright © 1999-2025 eZ Systems AS