Page 1 of 1

ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 18:34
by MarioNed
Hello. I want the CO2 meter via P2P to turn on and off the Wi-Fi relay at CO2> or <from 1000. I read a lot and struggled, but I could not set it. Can you tell me where I'm wrong in the settings.
ESP 5.jpg
ESP 5.jpg (243.92 KiB) Viewed 5989 times

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 19:48
by chromo23
the right syntax would be:

Code: Select all

sendto 3,gpio,2,1
or on older builds this seems to do the trick:

Code: Select all

sendto 3,"gpio,2,1"
you can try this out by entering the command under /tools in the command field and hit submit. there you also get an feedback if it succeeded....
Bildschirmfoto 2022-03-27 um 19.56.44.png
Bildschirmfoto 2022-03-27 um 19.56.44.png (41.37 KiB) Viewed 5979 times

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 19:58
by MarioNed
I write it and it comes out to me: Too many arguments, try using quotes! Command unknown: sendto 4, gpio, 2,1

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:00
by MarioNed
Too many arguments, try using quotes!Command unknown: sendto 1, gpio,12,1

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:00
by chromo23
i just updated my last post...

try:

Code: Select all

sendto 3,"gpio,2,1"

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:02
by MarioNed
Do I have to write something in the rules?

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:03
by Ath
Adding quotes will help here,

but, for turning off the remote relay, the 'else' part should also use the 'SendTo' command:

Code: Select all

on CO2#PPM do
  if %eventvalue1%>1000
    sendto 3,"gpio,2,1"
  else
    sendto 3,"gpio,2,0"
  endif
endon
I've used %eventvalue1% instead of [CO2#PPM] so the event responds to the value passed to the event, and not the current sensor value, though this will probably not make a difference in this situation.

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:07
by chromo23
chromo23 wrote: 27 Mar 2022, 19:48 the right syntax would be:

Code: Select all

sendto 3,gpio,2,1
this works but the readme states

Code: Select all

sendto,3,gpio,2,1
which works too.

Edit: on newer builds of course

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:38
by MarioNed
I tried both options, but it does not include and there is nothing in the Log.
I'm missing something somewhere.

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 20:59
by Ath
It may help if you upgrade both your ESP's to a later edition of ESPEasy, as your builds are rather old (3.5 years on unit 3?), and many bugs have been fixed (and new features added) since then.
I know it is a bit tedious to upgrade an ESP01s, but I think it is worth the trouble.

Re: ESP Easy and Wi-Fi relays

Posted: 27 Mar 2022, 21:20
by MarioNed
Will try. Thanks.