Closed erokoder closed 5 years ago
@TD-er @Grovkillen @giig1967g @Oxyandy Please set log in spoiler. I can find it. TD or other admin. In log you can see correct behavior. But when include Delay, after few times, Mqtt lost, and that repeats every few time.
@radebebek Tomorrow I have more time to look at this. What do you mean by "set log in spoiler" ?
@TD-er Spoiler for hide text. Similarly to the forum site but it looks like there is no such possibility.
Hi @radebebek I can confirm that setting a delay of 10 seconds the UNIT disconnects from MQTT for me too. I am using shorter tdelays (500ms) and it works fine. Maybe a timeout?
A workaround could be to set a timer instead of a such long delay.
I also try workaround decision and working withour problems for now. I'll test for a couple of days to confirm. So Action Delay definitely has a problem. @giig1967g also confirm. So @TD-er We have a cause problem, now it just needs to be fix for the rest of the community.
on Import#moving=0 do
gpio,12,1
timerSet,1,10
endon
on Import#moving=1 do
gpio,5,1
timerSet,2,10
endon
on Rules#Timer=1 do
gpio,12,0
Publish SonoffDual/currentPosition,[Import#target]
Publish SonoffDual/statePosition,2
endon
on Rules#Timer=2 do
gpio,5,0
Publish SonoffDual/currentPosition,[Import#target]
Publish SonoffDual/statePosition,2
endon
Is this still an issue? If so open.
Hello all,
I am developing home bridge plugin with mqtt broker for up and down blinds. So, I want "up and down" blinds with Home App, and also I want "up and down" blinds with with a physical wall switch. Physical wall switch connected to GPIO0 AND GPIO9 (Sonoff Dual r2, lastes firmware v2.0-20180322) Control even is [Import#moving] that show // 0 = Stoped , 1=Moving Up , Moving Down. When app start moving down, App publish 1, after blinds moving finished, sonoff publish 2. So, I have problem with publish 2. For some reason after gpio,12,0 mqtt lost connection and dont publish 2, and also mqtt import dont update state moving to 2. A couple of times pass without problems, but every some time the connection is lost, and this is always on this part after gpio,12,0 or gpio,5,0. Also when mqtt lost connection, sonoff device lose ping and freezing browser for 3 sec.
I make some things easier with mqtt, and never lost connection to the same device son off dual r2. (So, The device is okay)
All Rules Code:
Picture