Runtime List/array

dear All

I want to know if it’s possible and have an example on how to create a runtime array with the following information for each item:

  1. name: string
  2. start_date: date and time
  3. end_date: date and time
  4. pin/password: numeric integer
  5. status: integer or string for enabled, suspended and other possible status that I can’t figure in this moment…

I need to add, remove, save the items at runtime.

the scope is to build a wiegand 26 control access and manage users/password allowed

Thanks for your hel

There is no clear way for that. There is no support for complex types in openHAB core. All you can do is modeling proper thing/bridge relations or rely on dynamic channels which are assembled back to something end system expects.
Yet if you need an array as an input to openHAB - I am afraid only one recommendation left is playing with JSON serialization and custom widgets.

I’d think this is an XY problem type of question.
It’s unclear what you want to accomplish, but it’s clear that an array isn’t a good way to get there.
It’s even unclear what you’re talking about, binding coding ? Interactive user input ?
Some machine-2-machine interface on top of an existing binding ? transformation coding ?
You would need to explain your use case a lot better if you want others to understand and provide help.

Dear I try to better explain

I want a user interface and something to store the data:
I want insert at runtime , in the UI, some data such as Name, Start date and time, end date and time, pin or password, status (enabled or disabled) and so on…
This data should be be stored somwhere …

When a specific item received command I want to check if the value of item (this is PIN or PASSOWRD) is in the previous inserted data and the status is enabled or disabled and If I found a valid record I want to send a commnad to another item…

It’s an access control system that have to check if different pin code are stored and valid and if yes open a door

You can create static arrays or hash maps in any language you can use in openHAB rules and you can access external databases from there.
You can code an input widget that allows to dynamically enter new records but I wouldn’t say that OH is the best tool for that. You can also use any other system for user UI and interface there from OH.
As @splatch already said there is no clear (default) way.
It’s really up to your needs (how dynamic the data is etc) and (coding) capabilities.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.