IF statement on %eventvalue%

Moderators: grovkillen, Stuntteam, TD-er

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

Re: IF statement on %eventvalue%

#11 Post by toffel969 » 23 Oct 2017, 19:59

vader wrote: 23 Oct 2017, 19:44 I've tested it and does not work for me. I mean, you can not transmit values to an event. The parser seems to ignore more than 1 value after "event". It is only interested in the event name.... :D

The messed rules seem to be an issue of core 2.4.0.... :?
You can send values, check the wiki
https://www.letscontrolit.com/wiki/inde ... _Variables
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: IF statement on %eventvalue%

#12 Post by vader » 23 Oct 2017, 20:10

Ok, now I got it. The "=" after event name was wrong (I had ",")... :oops:

danmero
Normal user
Posts: 64
Joined: 11 May 2017, 01:19

Re: IF statement on %eventvalue%

#13 Post by danmero » 23 Oct 2017, 23:16

Code: Select all

on testevent do
  TaskValueSet 5,4,%eventvalue%
endon

Code: Select all

http://x.x.x.x/control?cmd=event,testevent=3
This works on 2.0.0.x

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: IF statement on %eventvalue%

#14 Post by rayE » 24 Oct 2017, 02:53

Thanks guy's, this works a treat :-)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: IF statement on %eventvalue%

#15 Post by grovkillen » 24 Oct 2017, 07:54

toffel969 wrote: 23 Oct 2017, 19:59
vader wrote: 23 Oct 2017, 19:44 I've tested it and does not work for me. I mean, you can not transmit values to an event. The parser seems to ignore more than 1 value after "event". It is only interested in the event name.... :D

The messed rules seem to be an issue of core 2.4.0.... :?
You can send values, check the wiki
https://www.letscontrolit.com/wiki/inde ... _Variables
I have now moved this section to its correct section 8-)

https://www.letscontrolit.com/wiki/inde ... alue.25.29

I hope more people will use this awesome technique (I sure hadn't seen it before you pointed it out).
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 :idea: :idea: :idea:

danmero
Normal user
Posts: 64
Joined: 11 May 2017, 01:19

Re: IF statement on %eventvalue%

#16 Post by danmero » 20 Nov 2017, 15:20

I use this rule set to pass GPIO # as event argument.

Code: Select all

on sniff#a do
  event event1=%eventvalue%
endon

on event1 do
  pcfpulse %eventvalue%,0,200
endon
Regards,

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: IF statement on %eventvalue%

#17 Post by grovkillen » 20 Nov 2017, 16:32

danmero wrote: 20 Nov 2017, 15:20 I use this rule set to pass GPIO # as event argument.

Code: Select all

on sniff#a do
  event event1=%eventvalue%
endon

on event1 do
  pcfpulse %eventvalue%,0,200
endon
Regards,
Clever, will try to add this to the wiki as well.
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 :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 133 guests