Dear friends,
at my ESP12f (Unit1) i messure the temperature with a DHT22.
The value is found at device task-1 DHTo#T1.
Now I need this value at my second ESP12f (Unit2) in the DummyDevice-task-4 (TaskValueSet 4,1,x)
First i activated the ESPEasy P2P in the Controller-menu at both ESPs. Then i inserted a rule at the sender:
on DHTo#T1 do
sendTo 1,"TaskValueSet 4,1,([DHTo#T1])"
endon
In the log, the rule is executed, but i don't know how to get the sended values at the unit2.
What should i do?
Kind regards
Thomas
ESPEasy P2P Networking - sendTo - Help needed
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 21
- Joined: 21 Nov 2022, 07:40
-
- Core team member
- Posts: 9921
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
Re: ESPEasy P2P Networking - sendTo - Help needed
You can simply share a plugin/task directly to another node.
See for instructions here: https://espeasy.readthedocs.io/en/lates ... #c013-page
The sendto command is using the same p2p protocol as mentioned in that link.
Make sure the unit numbers are unique in your setup an all nodes participating use the same UDP port number (preferrably use port 8266)
N.B. you should not use () in the command.
The "sendto" command requires the unit number of the receiving node, so in your setup it should be something like this:
Assuming you have given the units their own (unique) unit ID. Do not use unit ID 0 or 255.
On the receiving node you must have a dummy task at task-index 4.
See for instructions here: https://espeasy.readthedocs.io/en/lates ... #c013-page
The sendto command is using the same p2p protocol as mentioned in that link.
Make sure the unit numbers are unique in your setup an all nodes participating use the same UDP port number (preferrably use port 8266)
N.B. you should not use () in the command.
The "sendto" command requires the unit number of the receiving node, so in your setup it should be something like this:
Code: Select all
on DHTo#T1 do
sendTo,2,"TaskValueSet 4,1,[DHTo#T1]"
endon
On the receiving node you must have a dummy task at task-index 4.
-
- Normal user
- Posts: 21
- Joined: 21 Nov 2022, 07:40
Re: ESPEasy P2P Networking - sendTo - Help needed
Hi TD-er,
i'd activated the P2P Network at both sides and used a wrong TaskValueSet (4 instead of 5).
Now it works
Thanks
i'd activated the P2P Network at both sides and used a wrong TaskValueSet (4 instead of 5).
Now it works

Thanks
-
- Core team member
- Posts: 9921
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
Re: ESPEasy P2P Networking - sendTo - Help needed
Good to hear it is now working 
Have fun!

Have fun!
-
- Normal user
- Posts: 4341
- Joined: 10 Jun 2018, 12:06
- Location: NL
Re: ESPEasy P2P Networking - sendTo - Help needed
That was one of the reasons that support for taskname and taskvaluename was introduced for the TaskValue* group of commandsRiewekooche wrote: ↑29 Jun 2023, 12:45 Hi TD-er,
i'd activated the P2P Network at both sides and used a wrong TaskValueSet (4 instead of 5).
Now it works
Thanks

So you could have used:
Code: Select all
sendTo,2,"TaskValueSet DHTremote,Temp,[DHTo#T1]"
/Ton (PayPal.me)
Who is online
Users browsing this forum: Anthropic Claude Bot [bot] and 3 guests