using values in rules from a sending node which is connected with P2P network

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
parabacus
Normal user
Posts: 7
Joined: 17 May 2020, 21:16

using values in rules from a sending node which is connected with P2P network

#1 Post by parabacus » 17 May 2020, 22:08

Hello together!

I have some problem to use the values sent by Wemos node #1 named RWZ via P2P-Connection at a second Wemos node #2 mamed "Zisterne".
Both nodes are flashed with build version "ESPEasy_mega-20200410".

The node #1 ist configured like below:
- uniqe Unit Nr. 71
- UDP Port 8266
- Controller "ESPEasy P2P Networking" enabled
- 3 Tasks configured (Task 1 to 3) - every Task sends its values to P2P-Connection

https://www.letscontrolit.com/forum/dow ... 8369e3c68b
https://www.letscontrolit.com/forum/dow ... 8369e3c68b
https://www.letscontrolit.com/forum/dow ... 8369e3c68b
https://www.letscontrolit.com/forum/dow ... 8369e3c68b

The node #2 ist configured like below:
- uniqe Unit Nr. 34
- UDP Port 8266
- Controller "ESPEasy P2P Networking" enabled
- 3 Tasks were configured automatically (Task 1 to 3) - Port is the node #1 "RWZ"

https://www.letscontrolit.com/forum/dow ... 8369e3c68b
https://www.letscontrolit.com/forum/dow ... 8369e3c68b
https://www.letscontrolit.com/forum/dow ... 8369e3c68b

In the Main sheet of both nodes I can see both untis. This shows me that the communication is running right.
In the Task list of node #2 every sent value from node #1 ist displayed correctly.

The problem is that it is not possible to use the received values by rules on node #2!

On system boot a debug variable is initialized with value 255.
Depending on the received state value (values 0 .. 10) sent by node #1 the corresponding LEDs should switched on at node #2.
It doesen't matter which value is received, the debug variable remains 255.

This is the rule 1:

Code: Select all

on System#Boot do
 gpio,0,0
 gpio,2,0
 gpio,12,0
 gpio,13,0
 gpio,14,0
 TaskValueSet 4,1,255
endon


On Zisterne#ZisternenStatus do // Status 0 = Leer / 10 = Voll

if [Zisterne#ZisternenStatus]=0.00
 gpio,0,0          // rote   LED    aus
 gpio,2,0          // gelbe  LED    aus
 gpio,12,0         // gelbe  LED    aus
 gpio,13,0         // gruene LED    aus
 gpio,14,0         // gruene LED    aus
 TaskValueSet 4,1,0
endif

if [Zisterne#ZisternenStatus]=1.00 or [Zisterne#ZisternenStatus]=2.00 
 gpio,0,1          // rote   LED    an
 gpio,2,0          // gelbe  LED    aus
 gpio,12,0         // gelbe  LED    aus
 gpio,13,0         // gruene LED    aus
 gpio,14,0         // gruene LED    aus
 TaskValueSet 4,1,1
endif

if [Zisterne#ZisternenStatus]=3.00 or [Zisterne#ZisternenStatus]=4.00
 gpio,0,1          // rote   LED    an
 gpio,2,1          // gelbe  LED    an
 gpio,12,0         // gelbe  LED    aus
 gpio,13,0         // gruene LED    aus
 gpio,14,0         // gruene LED    aus
 TaskValueSet 4,1,2
endif

if [Zisterne#ZisternenStatus]=5.00 or [Zisterne#ZisternenStatus]=6.00
 gpio,0,1          // rote   LED    an
 gpio,2,1          // gelbe  LED    an
 gpio,12,1         // gelbe  LED    an
 gpio,13,0         // gruene LED    aus
 gpio,14,0         // gruene LED    aus
 TaskValueSet 4,1,3
endif

if [Zisterne#ZisternenStatus]=7 or [Zisterne#ZisternenStatus]=8
 gpio,0,1          // rote   LED    an
 gpio,2,1          // gelbe  LED    an
 gpio,12,1         // gelbe  LED    an
 gpio,13,1         // gruene LED    an
 gpio,14,0         // gruene LED    aus
 TaskValueSet 4,1,4
endif

if [Zisterne#ZisternenStatus]=9 or [Zisterne#ZisternenStatus]=10
 gpio,0,1          // rote   LED    an
 gpio,2,1          // gelbe  LED    an
 gpio,12,1         // gelbe  LED    an
 gpio,13,1         // gruene LED    an
 gpio,14,1         // gruene LED    an
TaskValueSet 4,1,5
endif

endon
Here the log from node2 - the value is received right!

Code: Select all

43921181: Dummy: value 1: 255.00
43921246: EVENT: Debug#Info=255.00
43923139: WD   : Uptime 732 ConnectFailures 0 FreeMem 17992 WiFiStatus 3
43927646: EVENT: Zisterne#ZisternenStatus=4.00
43953139: WD   : Uptime 733 ConnectFailures 0 FreeMem 18016 WiFiStatus 3
43957646: EVENT: Zisterne#ZisternenStatus=4.00
43981181: Dummy: value 1: 255.00
43981246: EVENT: Debug#Info=255.00
43983139: WD   : Uptime 733 ConnectFailures 0 FreeMem 16424 WiFiStatus 3
43987646: EVENT: Zisterne#ZisternenStatus=4.00
44008981: Rules : Save rulesSet: 1 currentSet: 2
44009140:  Webserver args: 0: 'set' length: 1 1: 'rules' length: 1399
44013139: WD   : Uptime 734 ConnectFailures 0 FreeMem 18016 WiFiStatus 3
44017605: EVENT: Zisterne#ZisternenStatus=4.00
44041181: Dummy: value 1: 255.00
44041205: EVENT: Debug#Info=255.00
44043139: WD   : Uptime 734 ConnectFailures 0 FreeMem 18016 WiFiStatus 3
What is the secret?
Attachments
node #2 Zisterne Devices
node #2 Zisterne Devices
03_Zisterne_Devices.jpg (74.9 KiB) Viewed 166 times
node #2 Zisterne Controller
node #2 Zisterne Controller
02_Zisterne_Controller.jpg (24.49 KiB) Viewed 166 times
node #2 Zisterne Config
node #2 Zisterne Config
01_Zisterne_Config.jpg (22.25 KiB) Viewed 166 times
node #2 Zisterne Config
node #2 Zisterne Config
04_RWZ_Main.jpg (86.31 KiB) Viewed 166 times
node #1 RWZ Devices
node #1 RWZ Devices
03_RWZ_Devices.jpg (84.89 KiB) Viewed 166 times
node #1 RWZ Controller
node #1 RWZ Controller
02_RWZ_Controller.jpg (27.46 KiB) Viewed 166 times
node #1 RWZ Config
node #1 RWZ Config
01_RWZ_Config.jpg (17.84 KiB) Viewed 166 times

TD-er
Core team member
Posts: 2621
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: using values in rules from a sending node which is connected with P2P network

#2 Post by TD-er » 18 May 2020, 00:10

Please keep it all in a single topic, or else replies will be all over the forum.

Consider this the actual topic: https://www.letscontrolit.com/forum/vie ... f=6&t=7752

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests