Giter VIP home page Giter VIP logo

Comments (2)

wborn avatar wborn commented on June 28, 2024

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.

splatch avatar splatch commented on June 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.