Solved! Since update endless feedback loop of a switching command between ESP EASY and Domoticz

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ruprecht
Normal user
Posts: 9
Joined: 04 Nov 2016, 10:02
Location: im Süden von DE

Solved! Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#1 Post by Ruprecht » 28 Jun 2019, 17:25

In our laundry drying room in the basement i have an automatic control of the fan with a sensor (BME280). This is done by a rule in ESP EASY, which turns on a fan automatically when the humidity is above 49%. This switch state of this fan is visible on Domoticz and the fan could be switched also over Domoticz manually. This worked so far as desired by me.

Today I've made an update to ESP EASY Mega 20190626. Now is there a feedback loop between ESP EASY and Domoticz. As soon as I switch on or off the fan manually via Domoticz, ESP EASY immediately returns this switching command as a new switching state to Domoticz and ESP EASY immediately returns this switching state as a new switching state to Domoticz and so on. Also, an on/off delay brought no improvement.

How do I get back the previous state of the controller where my manual command does not trigger an endless feedback loop?

Image

Image

Image

Code: Select all

On System#Boot do
  PCFGPIO,1,0
  PCFGPIO,2,0
  PCFGPIO,3,0
  PCFGPIO,4,0
  PCFGPIO,5,0
  PCFGPIO,6,0
  PCFGPIO,7,0
  PCFGPIO,8,0
  timerSet,1,60
endon

On Rules#Timer=1 do 

  //Taupunkt aussen   (Berechnung unter 50% Feuchte falsch!)
 TaskValueSet,9,1,[LAussenTemp#Temp]-(100-[LAussenTemp#Feuchte])/5     

  //Taupunkt innen      (Berechnung unter 50% Feuchte falsch!)
 TaskValueSet,9,2,[HeizTFD#Temp]-(100-[HeizTFD#Feuchte])/5                    

  //Lüfter an
  if [HeizLueft#LuefterH]=0 and [HeizTFD#Feuchte]>48 and [Taupunkt#TaupAussen]<[Taupunkt#TaupInnen]
    PCFGPIO,1,1
  endif

  //Lüfter aus
  if [HeizLueft#LuefterH]=1 and [HeizTFD#Feuchte]<44
   PCFGPIO,1,0
  endif 
  if [HeizLueft#LuefterH]=1 and [Taupunkt#TaupAussen]>[Taupunkt#TaupInnen]
   PCFGPIO,1,0
  endif

 timerSet,1,300
endon

Code: Select all

2019-06-28 16:25:42.289 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:42.779 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:43.290 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:43.812 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:43.281 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:43.803 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:44.445 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:44.894 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:44.436 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:44.885 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:45.382 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:45.887 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:45.373 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:45.879 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:46.500 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:46.492 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:47.211 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:47.685 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:47.202 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:47.676 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:48.183 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:48.695 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:48.174 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:48.686 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:49.309 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:49.786 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:49.297 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:49.777 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:50.290 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:50.785 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:50.281 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:50.776 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:51.855 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:51.846 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:52.338 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:52.792 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:52.329 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:52.783 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:53.322 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:53.803 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:53.313 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:53.798 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:54.517 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:54.988 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:54.508 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:54.979 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:55.507 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:55.985 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:55.498 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:55.976 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:56.488 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:56.949 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:56.479 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:56.940 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:57.410 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:57.930 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:57.401 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:57.921 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:58.395 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:58.880 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:58.386 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:58.870 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:59.410 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:59.883 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:25:59.406 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:25:59.878 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:00.806 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:00.797 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:01.296 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:01.758 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:01.287 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:01.749 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:02.284 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:02.774 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:02.275 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:02.765 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:03.284 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:03.757 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:03.275 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:03.748 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
2019-06-28 16:26:04.287 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:04.779 (Heizung) Light/Switch (Lüfter Heizraum (>49% Feuchte))
2019-06-28 16:26:04.278 Status: User: Admin initiated a switch command (40/Lüfter Heizraum (>49% Feuchte)/Off)
Last edited by Ruprecht on 03 Jul 2019, 17:01, edited 1 time in total.

User avatar
ThomasB
Normal user
Posts: 450
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#2 Post by ThomasB » 28 Jun 2019, 18:01

Try disabling the "Send to Controller" option in the PCF8574 plugin.

- Thomas

Ruprecht
Normal user
Posts: 9
Joined: 04 Nov 2016, 10:02
Location: im Süden von DE

Re: Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#3 Post by Ruprecht » 28 Jun 2019, 18:39

That would eliminate my feedback problem, but then I would lose the status display of the fan in Domoticz.

Currently I am solving the feedback problem by deleting the on/off actions in Domoticz. But now the manual control of the fan is not possible.

User avatar
ThomasB
Normal user
Posts: 450
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#4 Post by ThomasB » 28 Jun 2019, 18:59

That would eliminate my feedback problem, but then I would lose the status display of the fan in Domoticz.
The status data can be sent to Domoticz by your ESPEasy rules (use the publish command).

- Thomas

Ruprecht
Normal user
Posts: 9
Joined: 04 Nov 2016, 10:02
Location: im Süden von DE

Re: Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#5 Post by Ruprecht » 02 Jul 2019, 16:54

Again, the same result. It makes no difference whether the status is sent directly from the EspEasy device or Publish Command. Again, Domoticz responds with endless repeating this command.

In the meantime I believe that´s not a mistake but a feature which only did not occur with the old version mega-20180818. Presumably, the mistake sits in front of the screen.

How to program a switch with Domoticz + EspEasy which also displays the actual state if e.g. in the meantime a rule changes the switching state?

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

Re: Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#6 Post by kimot » 02 Jul 2019, 20:14

Disable "send to controller"

In Domoticz On / Off action use your pcfgpio commands.

And in your rules send json htttp command about switch state to Domoticz.


Then if you switch from Domoticz - it sets gpio and do not send back to Domoticz.

If you set switch by rules in ESPeasy- it sets gpio, send status to Domoticz by json http call and Domoticz immediately sends the same gpio command to ESPeasy
and in this time loop ends.

Ruprecht
Normal user
Posts: 9
Joined: 04 Nov 2016, 10:02
Location: im Süden von DE

Re: Since update endless feedback loop of a switching command between ESP EASY and Domoticz

#7 Post by Ruprecht » 03 Jul 2019, 16:58

Thanks for the "thinking help". Now everything works again without loop:

Domoticz
action on:
http://192.168.178.81/control?cmd=event,luefterein
action off:
http://192.168.178.81/control?cmd=event,luefteraus

EspEasy
Send to controller: disabled on this device

Rules:

Code: Select all

On System#Boot do
  PCFGPIO,1,0
  PCFGPIO,2,0
  PCFGPIO,3,0
  PCFGPIO,4,0
  PCFGPIO,5,0
  PCFGPIO,6,0
  PCFGPIO,7,0
  PCFGPIO,8,0
  timerSet,1,60
  SendToHTTP 192.168.178.19,8080,/json.htm?type=command&param=udevice&idx=40&nvalue=0
endon


On Rules#Timer=1 do 

  //Taupunkt aussen   (Berechnung unter 50% Feuchte falsch!)
 TaskValueSet,9,1,[LAussenTemp#Temp]-(100-[LAussenTemp#Feuchte])/5     

  //Taupunkt innen      (Berechnung unter 50% Feuchte falsch!)
 TaskValueSet,9,2,[HeizTFD#Temp]-(100-[HeizTFD#Feuchte])/5                    

  //Lüfter an
  if [HeizLueft#LuefterH]=0 and [HeizTFD#Feuchte]>48 and [Taupunkt#TaupAussen]<[Taupunkt#TaupInnen]
    PCFGPIO,1,1
    SendToHTTP 192.168.178.19,8080,/json.htm?type=command&param=udevice&idx=40&nvalue=1
  endif

  //Lüfter aus
  if [HeizLueft#LuefterH]=1 and [HeizTFD#Feuchte]<43
    PCFGPIO,1,0
    SendToHTTP 192.168.178.19,8080,/json.htm?type=command&param=udevice&idx=40&nvalue=0
  endif 
  if [HeizLueft#LuefterH]=1 and [Taupunkt#TaupAussen]>[Taupunkt#TaupInnen]
    PCFGPIO,1,0
    SendToHTTP 192.168.178.19,8080,/json.htm?type=command&param=udevice&idx=40&nvalue=0
  endif

 timerSet,1,300
endon


On luefterein do
  if [HeizLueft#LuefterH]=0
    PCFGPIO,1,1
    SendToHTTP 192.168.178.19,8080,/json.htm?type=command&param=udevice&idx=40&nvalue=1
  endif
endon


On luefteraus do
  if [HeizLueft#LuefterH]=1
    PCFGPIO,1,0
    SendToHTTP 192.168.178.19,8080,/json.htm?type=command&param=udevice&idx=40&nvalue=0
  endif
endon

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests