Comments (2)
Yes the current network configuration is a bit of a mess and not consistently used probably also because of its limitations.
It is probably best to be able to select the default network interfaces and have the possibility to override the default values when necessary at add-on or Thing level.
I am not clear on the onlyUseOneAddress yet, although the purpose is similar, limiting the range used.
The reason for this option is explained in eclipse-archived/smarthome#6005
from openhab-core.
You can not run away from making "network" an API citizen, especially if you ever consider making better support for containers which multiply network interfaces even in most basic setups.
I've published some network api concepts 9 months ago; which actually stayed in my drawer for couple months. You can see org.connectorio.addons.network, org.connectorio.addons.network.ip and org.connectorio.addons.network.jvm.internal, primarily to see if it can be used to centralized management of network access from bindings. Usage of network api can be observed in AmsAdsInterfaceDiscoveryService.
Diving more (actually speculating), thanks to osgi ServiceFactory
concept you can provide a multiplexed NetworkRegistry
instance which will filter its entries based on bundles which make use of it. With this engineering trick your binding might still rely on enumerated networks, while control over access to them them is shifted somewhere else. This is essential to provide a unified way to make network access management possible, otherwise it will spread across many edges of bridges/things, probably beyond user oversight. Maybe OH is not a network router, but it does act as a hub, and depending on setup, framework role might be to interconnect incompatible networks.
I've purposely not made IpNetwork
a concrete type because it can be supplied through JVM (read only). Under Linux there are ways to manage network level settings from userspace over dbus (using systemd-network
or NetworkManager
namespaces).
I also made one step further by not assuming IP to be only one kind of network, because i.e. RS485 or CAN interface can be used to launch network as well (hence there is NetworkInterfaceType
). If you think of it even more, ZWave and many other radio standards, rely on network node concepts which are flattened to thing instances. In case of matter you might even have an overlay network which span from zigbee radio to ip layer.
I know all above is over-engineered, especially for my own needs, but its not about me, but platform view. ;-)
from openhab-core.
Related Issues (20)
- REST endpoint to get Jetty‘s TLS certificate HOT 1
- ECMAScript: Quantity can't be multiplied with negative value HOT 2
- Binding ID in JarFileAddonService vs. KarafAddonService HOT 4
- New version 3.0.0 of JUPnP library is breaking at least Sonos binding when several interfaces are up HOT 61
- sendNotification not working inside DSL script in a rule HOT 1
- Units of Measurement (UoM) missing: g/m² and Wh/m² (for solar panels monitoring) HOT 1
- Cannot retrieve config description with REST API HOT 3
- Inconsistent karaf output for `addons services`
- REST endpoint GET `/rest/items/<itemname>` broken HOT 4
- [rfc] UoM shall I create a new unit(s) for humidity?? HOT 7
- Dimension in `thing-description-1.0.0.xsd` HOT 2
- Resolver error introduced with Karaf upgrade to 4.4.5 HOT 12
- Wrong usage of `SameSite` cookie param in `TokenResource` HOT 5
- QuantityType<Time> incorrectly formats durations HOT 14
- QuantityType<Dimensionless> with unit one wrong update to item with different unit set HOT 2
- CI build throws "java.util.zip.ZipException: zip END header not found" HOT 7
- [sitemap] Add labelcolor and visibility to a single button of a Buttongrid HOT 27
- Java 21 deserialization of DateTime HOT 10
- Report ruleUID when Script Condition doesn't return a boolean
- [marketplace] Supported Bundle Versions No Longer Processed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openhab-core.