Page 1 of 1

problem establishing P2P networking - resolved

Posted: 15 Mar 2021, 16:33
by jgrad
Hi,

eventhough I am long time ESPeasy user (started with R120 in mid of 2016) I am now trying to use P2P networking for the first time. I would like to share value from LUX sensor BH1750 on one node to another node. Both nodes are running same version (latest build 20210223).

I configured P2P networking controller on both nodes, on source node with lux sensor I configured device task for BH1750 to share results with P2p controller but on other nodes nothing happens. There are a lot of free positions in Device task list on other nodes.

For intercommunication I use port 55555 and all devices see each other so I see all devices in main tab->Node list.

What I am doing wrong? Do I use wrong UDP port number (8266 port is given in documentation just as suggestion).

BRJ.

Re: problem establishing P2P networking

Posted: 15 Mar 2021, 16:48
by TD-er
Have you followed these steps of the documentation?
https://espeasy.readthedocs.io/en/lates ... mong-nodes

Things that are easily forgotten are:
- Unique unit nr (not 0, not 255)
- Enable p2p controller on the controllers tab

Re: problem establishing P2P networking - resolved

Posted: 15 Mar 2021, 21:12
by jgrad
I succeded by first removing existing device task for LUX sensor on sending side and then adding device task once again.
After that device task appeared also on remote end.
UDP port number was not changed - so port number have no impact.

Re: problem establishing P2P networking - resolved

Posted: 15 Mar 2021, 22:02
by TD-er
That's correct.
The port number just has to be the same on both ends.
The reason it is suggested to use port 8266 is just because that's the official IANA registered port for ESPEasy p2p ;) (just as is port 21 for FTP and 80 for HTTP for example)
But it is not enforced anywhere to use that port.

Re: problem establishing P2P networking - resolved

Posted: 16 Mar 2021, 12:45
by jgrad
I changed UDP port to 8266 on all nodes to be aligned.

What I see is that DeviceTaskID on source node and DeviceTaskID on destination node have to be same otherwise sharing value over P2P network doesnt work. Since this is limitation (on destination nodes I dont have always same DeviceTaskID free) is it possible to somehow manually configure DeviceTask on any other free position (DeviceTaskID) and "link" it with deviceTask on remote/source node?

Re: problem establishing P2P networking - resolved

Posted: 16 Mar 2021, 13:17
by TD-er
Not yet, and that 's something I will later change as it is a real limitation and rather counter-intuitive.
But I have not planned on taking on that part of the code soon.

Re: problem establishing P2P networking - resolved

Posted: 17 Mar 2021, 12:26
by jgrad
OK, thanks for explanation and clarification.
I already see some options how to avoid this limitation (source node will in rules explicitly address destination node and set DummyDevice value on destination node based on value on source node)