Hi Gad Ofir ,
You are correct. So far I remember OpenHab assigns IDs. (but if you got a spare Arduino or STM it will not hurt to have one Node with a fixed, known ID -- just for testing purposes).

Your list 1.-3. is correct.

I don't know exactly but from my point of view the logic behind this behavior could be pretty simple: somewhere a list of Nodes has to be kept and the usual Arduino gateways are busy with managing traffic as well as chronically short of RAM and EEPROM. For small networks capacity may be sufficient, but believe me -- MySensors networks tend to grow rapidly. So at last you need an administration Software (aka controller (like OpenHab)) and this may administer the IDs according to its needs instead of keeping and synchronizing double lists.

The Node ID is supplied in the Node Sketch, so you have to modify your PIR sketch (slightly) as shown above.
The drawback of "hard" coded IDs is - you have to compile every sketch for every node individually and you have to keep track of the used IDs to avoid conflicts. For me (about 20 Sensors) it is manageable.

About a year ago i tried OpenHab (2.2 I think). There was a kind of plugin for MySensors and it worked very well. So there is a nice way to bypass MQTT.

I didn't continue OpenHab because it was a slight overkill for my purpose in comparison to MyController which does the trick completely. By the way - MyController seems to work with MQTT too, but I haven't tried it (yet).

Though I'm not familiar with MySensors and MQTT, this protocol reminds me of my first steps with MySensors when I forgot to assign static IDs for my Nodes and the Controller (e.g. MyController https://www.mycontroller.org/#/home) wasn't up and running. You didn't mention which controller you are using - it should be capable of assigning IDs to nodes.

@hausinger
Yes, there is somebody - me.
Just like magic - I switched back from my W5100 GW to ENC28J60 GW for testing purposes --- and it is working .
Maybe because the node entries in the database were populated by the W5100 GW? I don't know.
I have not changed anything within the GW software or hardware.
So I still think it's a MysController setup issue. Maybe you will succeed using a serial GW for a short time to "initiate" MysController database and then switch to ENC28J60 GW ?? (I haven't tested adding new nodes...)

@hausinger
This does not resemble a MySensors message.
I usually get this message when I'm stuck with my SSH connections on Raspberry Pi (lost SSH keys or such things) or due to bad setup - so denial of communication is correct but was not intended.
I don't know if MySensors provides any security functions at this level, but if it does - switch 'em off.
Perhaps you should try to ping your gateway. If there is an answer - i think the GW should be accessible. So it might be a configuration issue at MysController. But this is just a guess.

I am using MyController (without "s"). Actually a ENC28J60 is connected, standard GW software from examples expanded by DHT11 and DS18B20.
This configuration works well since about three months.