correct
The title should be something like: “Primary Subnet Address”
It looks like this “Primary Address” description is coming from the Karaf config property: “primaryAddress”
correct
The Subnet Address should be displayed as “xx.xx.xx.0/24” in the pull-down menu.
A host address would be: “xx.xx.xx.xx/32”
I don’t get any errors when I set it in PaperUI. Do you have any errors logged?
It is saved in /var/lib/openhab2/config/org/eclipse/smarthome/network.config
Here is what I tried after I defined it in Paper UI → Configuration → System → Network Settings:
From the console:
Pid: org.eclipse.smarthome.network
BundleLocation: null
Properties:
primaryAddress = 172.16.13.100/24
service.pid = org.eclipse.smarthome.network
After a service restart, it stays the same (so it is persistent).
I stopped OH2 service, manually changed the network.config file, started OH2 and it worked fine but it doesn’t display anymore on PaperUI
primaryAddress="172.16.13.0/24"
service.pid="org.eclipse.smarthome.network"
from console:
Pid: org.eclipse.smarthome.network
BundleLocation: null
Properties:
primaryAddress = 172.16.13.0/24
service.pid = org.eclipse.smarthome.network
I also tried to set it on: /etc/openhab2/services/runtime.cfg
and it also worked fine.
org.eclipse.smarthome.network:primaryAddress = 172.16.13.100/24
It updated the /var/lib/openhab2/config/org/eclipse/smarthome/network.config
file contents after a service restart.
When set to the “wrong” value: It shows up also on PaperUI
Running on 2.2.0-Snapshot Build #1096
If I remember well, this is used for cases where you have multiple interfaces and/or IP Subnets on your host running OH2 and it helps some bindings get callbacks from remote hubs etc. Link
Ps: There is also org.eclipse.smarthome.core.net.NetUtil
which is using the correct subnet address
Ps2: Maybe we should raise an Issue on ESH for smarthome.network to use getIpv4NetAddress
instead of getPrimaryIpv4HostAddress
? or to change the description in PaperUI ? @Kai