Help With Rules
Moderators: grovkillen, Stuntteam, TD-er
Re: Help With Rules
yep that was the problem with SW. i change it to active low.
so now sw1 change the status 1 to 0 and so on...
but no relay toggle.
also when i send setRelay01=0 or 1 the relay change status and sw1 stays at previous state without change.
here is the log:
1760467: EVENT: sw1#state=1.00
1760477: ACT : Event,toggleRelay01
1760532: Command: event
1760532: EVENT: toggleRelay01
1760555: ACT : Event,setRelay01=1
1760587: Command: event
1760588: EVENT: setRelay01=1
1760605: ACT : GPIO,0,1
1760607: SW : GPIO 0 Set to 1
1772041: WD : Uptime 30 ConnectFailures 0 FreeMem 19728
1774067: EVENT: sw1#state=0.00
1774076: ACT : Event,toggleRelay01
1774129: Command: event
1774130: EVENT: toggleRelay01
1774153: ACT : Event,setRelay01=1
1774187: Command: event
1774188: EVENT: setRelay01=1
1774205: ACT : GPIO,0,1
1774210: SW : GPIO 0 Set to 1
2124325: EVENT: setRelay01=0
2124342: ACT : GPIO,0,0
2124344: SW : GPIO 0 Set to 0
2132041: WD : Uptime 36 ConnectFailures 0 FreeMem 19728
2134826: EVENT: setRelay01=1
2134843: ACT : GPIO,0,1
2134845: SW : GPIO 0 Set to 1
2134920: SW : Switch state 1 Output value 0
2134923: EVENT: Relay01#state=0.00
so now sw1 change the status 1 to 0 and so on...
but no relay toggle.
also when i send setRelay01=0 or 1 the relay change status and sw1 stays at previous state without change.
here is the log:
1760467: EVENT: sw1#state=1.00
1760477: ACT : Event,toggleRelay01
1760532: Command: event
1760532: EVENT: toggleRelay01
1760555: ACT : Event,setRelay01=1
1760587: Command: event
1760588: EVENT: setRelay01=1
1760605: ACT : GPIO,0,1
1760607: SW : GPIO 0 Set to 1
1772041: WD : Uptime 30 ConnectFailures 0 FreeMem 19728
1774067: EVENT: sw1#state=0.00
1774076: ACT : Event,toggleRelay01
1774129: Command: event
1774130: EVENT: toggleRelay01
1774153: ACT : Event,setRelay01=1
1774187: Command: event
1774188: EVENT: setRelay01=1
1774205: ACT : GPIO,0,1
1774210: SW : GPIO 0 Set to 1
2124325: EVENT: setRelay01=0
2124342: ACT : GPIO,0,0
2124344: SW : GPIO 0 Set to 0
2132041: WD : Uptime 36 ConnectFailures 0 FreeMem 19728
2134826: EVENT: setRelay01=1
2134843: ACT : GPIO,0,1
2134845: SW : GPIO 0 Set to 1
2134920: SW : Switch state 1 Output value 0
2134923: EVENT: Relay01#state=0.00
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Help With Rules
You don't really need to care about the switch's state do you? It's only acting as a event trigger. No matter if it change from 1->0 or 0->1
But as for the relay not toggling. What's the GPIO for it, is it 0 or 12?
But as for the relay not toggling. What's the GPIO for it, is it 0 or 12?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Help With Rules
GPIO 0 is the relay.
gpio 12 is the sw.
for now i don't nee the state of the sw as it will always be as the state of the relay so..i
gpio 12 is the sw.
for now i don't nee the state of the sw as it will always be as the state of the relay so..i
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Help With Rules
And sending a GPIO,0,1 or GPIO,0,1 makes the relay turn on/off?
The log is showing me that the rule is working as intended. I'm really at the wits end here.
The log is showing me that the rule is working as intended. I'm really at the wits end here.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Help With Rules
yes im sending via http://10.0.80.108/control?cmd=GPIO,0,0 or 0,1 and the relay toggle.
also via mqtt command with payload":"event,setRelay01=1/0
also via mqtt command with payload":"event,setRelay01=1/0
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Help With Rules
So it's only the "toggleRelay" that is not working, or only semi-working?potzkiin wrote: ↑12 Sep 2018, 12:44 yes im sending via http://10.0.80.108/control?cmd=GPIO,0,0 or 0,1 and the relay toggle.
also via mqtt command with payload":"event,setRelay01=1/0
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Help With Rules
Would you mind getting a "webdump" (use my app) and send the zip file to me? I can send you the URL for where to upload the zip if you are willing to let me test it on a unit here.grovkillen wrote: ↑12 Sep 2018, 12:53So it's only the "toggleRelay" that is not working, or only semi-working?potzkiin wrote: ↑12 Sep 2018, 12:44 yes im sending via http://10.0.80.108/control?cmd=GPIO,0,0 or 0,1 and the relay toggle.
also via mqtt command with payload":"event,setRelay01=1/0
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Help With Rules
the relay respond to 1 and 0 with mqtt and http command.
the mqtt event,toggleRelay01,not working.
the SW1 wont toggle the relay.
the mqtt event,toggleRelay01,not working.
the SW1 wont toggle the relay.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Help With Rules
I cannot do much more for you sir. It's a guessing game right now.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Help With Rules
ill send you a PM with the DOWNLOAD link.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Help With Rules
Okay, I loaded your settings and you have internal pull-up and inverted logic activated on the relay. Remove those!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Help With Rules
Thanks for all the help!!!!!!!!!
now it is working great!!!!
here is all the configuration so everyone can use it ...
now it is working great!!!!
here is all the configuration so everyone can use it ...
Code: Select all
on System#Boot do
gpio,0,1 // Prevent relay turning on during boot
endon
On sw1#state Do
Event,toggleRelay01
EndOn
On toggleRelay01 Do
if [Relay01#state]=0
Event,setRelay01=1
else
Event,setRelay01=0
endif
EndOn
On setRelay01 Do
GPIO,0,%eventvalue%
EndOn
- Attachments
-
- sw1.jpg (85.15 KiB) Viewed 5612 times
-
- mqtt.jpg (33.5 KiB) Viewed 5614 times
-
- relay01.jpg (83.27 KiB) Viewed 5614 times
-
- sw1.jpg (85.15 KiB) Viewed 5614 times
-
- devices
- devices.jpg (62.34 KiB) Viewed 5615 times
Who is online
Users browsing this forum: No registered users and 88 guests