Context: I have a custom widget in which certain data is entered to later make a query (the script would come into play here)
Need: I need guidance or a simple example that I need to implement or install (add-ons) to be able to pass the data entered in my custom widget when I press a button to a script that is the one that performs the logic.
I don’t know if I need rules, install addons, what languages are supported … etc. My intention is for that script to generate a file and place it on the machine that runs oh.
Any type of recommendation orientation is welcome since I have not been able to locate anything that has made it clear to me how to do it. I have read some lambdas etc but am a bit disoriented right now.
Pretty much you’r restricted to using an item. That’s the basic unit of information transfer in OH and the easiest to achieve. Take a look at the widget and code I posted for scene control and modification and you’ll see an example. The widget sets an item to a string containing an array of data and the rule parses that data from the array and then performs all the necessary work.
Sorry for the ambiguity in the answer. As Rich said, items are the basic unit of information control with OH. From a widget you can call a rule directly, but not also pass information to it.
There’s not even any reason to want to find a different way to solve this problem. An item to hold the data and trigger the rule is in line with the way OH is built to work so it’s the most efficient method anyway.