Rules when disconnected

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
JustmeNL
Normal user
Posts: 26
Joined: 09 Dec 2016, 23:10

Rules when disconnected

#1 Post by JustmeNL » 09 Dec 2016, 23:19

I'm using espeasy R140 on a couple of sonoff devices with Domoticz and MQTT. I really love this software!

I created two devices: a manual switch and a dummy output for MQTT.
The output is on GPIO 12 and the switch (Push button active low) on GPIO 0.

My rules are simple:

Code: Select all

on Manual#Switch do
  if [Manual#Switch]=1
      GPIO 12,1
      Publish domoticz/in, { "idx": xxx, "nvalue": 1 }
  else
      GPIO 12,0
      Publish domoticz/in, { "idx": xxx, "nvalue": 0 }
  endif
endon
The idea is that the switch works regardless of whether Domoticz is working. However I found that when de WiFi is down the rules are not processed.
Are there any plans to change this or did I make some mistake here?

yarysek
New user
Posts: 5
Joined: 24 Nov 2016, 09:07
Location: Poland

Re: Rules when disconnected

#2 Post by yarysek » 10 Dec 2016, 21:57

I have the same,
Instead using Publish command i use SendToHttp but have same problem, commands operate with a large lag or even not.
I think this is because Esp waiting for repeat from domoticz.
I thinking to use some thing like If function.

If connected do
SentToHttp....

But i don't have any idea now.
If you find any solution give me know about that.

yarysek
New user
Posts: 5
Joined: 24 Nov 2016, 09:07
Location: Poland

Re: Rules when disconnected

#3 Post by yarysek » 07 Jan 2017, 11:59

nobody can help us?

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: Rules when disconnected

#4 Post by ToniA » 07 Jan 2017, 15:03

I made a small code change to have a new event called 'System#MQTT': viewtopic.php?f=6&t=2431&p=11886#p11886

You can use this event to reset a timer, and then do something if the timer ever fires.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 41 guests