problem establishing P2P networking - resolved

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

problem establishing P2P networking - resolved

#1 Post by jgrad » 15 Mar 2021, 16:33

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.
Last edited by jgrad on 15 Mar 2021, 21:12, edited 1 time in total.

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

Re: problem establishing P2P networking

#2 Post by TD-er » 15 Mar 2021, 16:48

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

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: problem establishing P2P networking - resolved

#3 Post by jgrad » 15 Mar 2021, 21:12

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.

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

Re: problem establishing P2P networking - resolved

#4 Post by TD-er » 15 Mar 2021, 22:02

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.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: problem establishing P2P networking - resolved

#5 Post by jgrad » 16 Mar 2021, 12:45

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?

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

Re: problem establishing P2P networking - resolved

#6 Post by TD-er » 16 Mar 2021, 13:17

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.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: problem establishing P2P networking - resolved

#7 Post by jgrad » 17 Mar 2021, 12:26

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)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 27 guests