GPIO after Sleep

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
henfri
Normal user
Posts: 13
Joined: 26 May 2018, 15:53

GPIO after Sleep

#1 Post by henfri » 04 Jun 2018, 21:45

Hello,

I am using this Rule

Code: Select all

on shpy#HintertuerZiel=1 do
  Publish %sysname%/setze,1
  gpio,15,1
  delay 100
  gpio,15,0
endon

on shpy#HintertuerZiel=0 do
  Publish %sysname%/setze,0
  gpio,13,1
  delay 100
  gpio,13,0
endon
and deep-sleep. shpy#HintertuerZiel is set/triggered by MQTT.
The rule is executed and I see the message "%sysname%/setze,0" via MQTT, bu it seems that the gpio is not set to 1/0.

Is there anything I am missing?
Then I set the value via MQTT while the system is not in Sleep, everything works. But when sending it while in Sleep, the rule *is* executed (otherwise I would not see the message "%sysname%/setze,0". Only the GPIO part does not work.

Greetings,
Hendrik

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: GPIO after Sleep

#2 Post by toffel969 » 05 Jun 2018, 12:41

henfri wrote: 04 Jun 2018, 21:45 Hello,

I am using this Rule

Code: Select all

on shpy#HintertuerZiel=1 do
  Publish %sysname%/setze,1
  gpio,15,1
  delay 100
  gpio,15,0
endon

on shpy#HintertuerZiel=0 do
  Publish %sysname%/setze,0
  gpio,13,1
  delay 100
  gpio,13,0
endon
and deep-sleep. shpy#HintertuerZiel is set/triggered by MQTT.
The rule is executed and I see the message "%sysname%/setze,0" via MQTT, bu it seems that the gpio is not set to 1/0.

Is there anything I am missing?
Then I set the value via MQTT while the system is not in Sleep, everything works. But when sending it while in Sleep, the rule *is* executed (otherwise I would not see the message "%sysname%/setze,0". Only the GPIO part does not work.

Greetings,
Hendrik
Two ideas :

1. The 100ms delay is too short to notice the GPIO changing. That depends on what is connected to the GPIOs. It will only go high for 0,1 sec.
2. Try and use pulse commands:

Code: Select all

on shpy#HintertuerZiel=1 do
  Publish %sysname%/setze,1
pulse,15,1,100
endon

on shpy#HintertuerZiel=0 do
  Publish %sysname%/setze,0
pulse,13,1,100
endon
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 22 guests