You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've investigated this issue a little. The combo box is actually working fine. For example, I've created a simple model consisting of a KNX and an Averager plugin. The Averager plugin has a combo box too:
However, the combo box is not displayed with the KNX plugin:
The combo box is missing for the KNX plugin, because the defaultComponentCollection.abd does not provide values for the combo box of the KNX plugin:
whereas the Averager plugin does:
When I add values for the combo box:
the combo box is displayed as requested:
So the "only" thing left to do is to add possible values to the defaultComponentCollection.abd. The picture of the ACS (see #26) indicates that possible values should be available (at least for the "normal" ACS).
What would be the best way to proceed?
I'm a little bit struggling with the term "dynamic" properties. Is there a difference between the combo box of the Averager and the KNX plugin? Why is the value of the combo box of the KNX plugin (and others) not stored in the defaultComponentCollection.abd?
"dynamic properties" are properties with combobox values that are updated from the ARE.
this happens when you connect ACS and ARE and upload the model. in this moment, the combo box is created / filled in the ACS property editor. for example: a property "soundfiles" displays available sound file names which exist in a particular folder on the ARE etc. (this feature is missing in the WebACS -> try e.g. the KNX plugin in the ACS). The "mode" property of the averager plugin is not a dynamic property.
Does that mean that we need additional functionality at areCommunicator.js? Or is there a way to retrieve those "dynamic" properties somehow? Are they available over the REST interface of the ARE?
There are two functions in the areCommunicator.js: getRuntimeComponentPropertyKeys() and getRuntimeComponentProperty(). They could provide the needed information. 😆
I think @deinhofer created the REST interface. Right? @deinhofer does one of these functions provide some list of runtime properties of the components inside a model?
@ChrisVeigl How do I know what plugins or which of their properties have "dynamic properties"? Is the property getStringList a sufficient indicator for "dynamic properties"?
I've added a new function to areCommunicator.js: getRuntimeComponentPropertyList() (see ffdb45d) and the associated REST path to the server of the ARE (see cf5aab8).
Those "dynamic" properties can now be obtained using a GET request at /runtime/model/components/{componentId}/properties/{componentKey} or using getRuntimeComponentPropertyList(componentId, componentKey).
I've added the functionality for dynamic properties for the WebACS. It's almost done. There seems to be an issue with the first two dynamic properties:
I have to investigate what might be causing this problem. @klues do you have a clue (as your name implies 🙈) what might be causing troubles? I've added the position, id and key to the log (red frame) and id and key to the selection list (dropdown). As you can see from the picture, the handler is called for DPTEvent1 and DPTEvent2, even with the correct position (row in the property editor), but the dropdown list is not added for those first two DPTEvents.
EDIT:
I took a look at the "table" that is being built when the property editor is opened. Apparently there are additional td elements (see row[6].children, row[9].children) which are missing for row[12].children (i.e., DPTEvent3). But I have no clue where (nor when or what) those td element are added.
instead of /runtime/model/components/{componentId}/properties/{componentKey} maybe /runtime/model/components/{componentId}/properties/{propertyKey} would make more sense?!
@sabicalija I think it's best to investigate this issue in person in the office, I'll be there at about 10:30 am.
WebACS now loads dynamic properties (see f16261f, PR#35).
@klues Thank's for the support. 🙂 You're right with the naming. It is not ideal, but I wanted to keep the existing naming convention and not introduce a new one (at least - not right now 😏).
Activity
deinhofer commentedon Feb 27, 2018
for a feature description see #26
sabicalija commentedon Mar 8, 2019
I've investigated this issue a little. The combo box is actually working fine. For example, I've created a simple model consisting of a
KNXand anAveragerplugin. TheAveragerplugin has a combo box too:However, the combo box is not displayed with the
KNXplugin:The combo box is missing for the
KNXplugin, because thedefaultComponentCollection.abddoes not provide values for the combo box of the KNX plugin:whereas the
Averagerplugin does:When I add values for the combo box:
the combo box is displayed as requested:
So the "only" thing left to do is to add possible values to the
defaultComponentCollection.abd. The picture of theACS(see #26) indicates that possible values should be available (at least for the "normal"ACS).What would be the best way to proceed?
I'm a little bit struggling with the term "dynamic" properties. Is there a difference between the combo box of the
Averagerand theKNXplugin? Why is the value of the combo box of theKNXplugin (and others) not stored in thedefaultComponentCollection.abd?ChrisVeigl commentedon Mar 10, 2019
"dynamic properties" are properties with combobox values that are updated from the ARE.
this happens when you connect ACS and ARE and upload the model. in this moment, the combo box is created / filled in the ACS property editor. for example: a property "soundfiles" displays available sound file names which exist in a particular folder on the ARE etc. (this feature is missing in the WebACS -> try e.g. the KNX plugin in the ACS). The "mode" property of the averager plugin is not a dynamic property.
BTW: properties with combo boxes should be integer types AFAIK (see e.g. averager plugin)
https://github.com/asterics/AsTeRICS/blob/295a1e5bb3cfdb257ebb7f283e89eab314c944aa/ARE/components/processor.averager/src/main/java/eu/asterics/component/processor/averager/AveragerInstance.java#L160
sabicalija commentedon Mar 10, 2019
Does that mean that we need additional functionality at
areCommunicator.js? Or is there a way to retrieve those "dynamic" properties somehow? Are they available over the REST interface of the ARE?ChrisVeigl commentedon Mar 10, 2019
the ACS calls the getRuntimePropertyList() commmand via ASAPI to retrieve the list of desired values for the combobox. For an example see the getRuntimePropertyList() method of the wavefileplayer plugin which returns available sound files:
https://github.com/asterics/AsTeRICS/blob/c72a80d4c5130ba48364094a3f2499e306de94cf/ARE/components/actuator.wavefileplayer/src/main/java/eu/asterics/component/actuator/wavefileplayer/WavefilePlayerInstance.java#L271
WebACS should do the same. Kingcole probably has already a concept for that ;-)
sabicalija commentedon Mar 10, 2019
There are two functions in the
areCommunicator.js:getRuntimeComponentPropertyKeys()andgetRuntimeComponentProperty(). They could provide the needed information. 😆I think @deinhofer created the REST interface. Right? @deinhofer does one of these functions provide some list of runtime properties of the components inside a model?
sabicalija commentedon Mar 10, 2019
@deinhofer I wanted to take a look on the REST API of the ARE. When I retrieve all component ids of the loaded model using 127.0.0.1:8081/rest/runtime/model/components/ids I get:
But when I try to get all properties using 127.0.0.1:8081/rest/runtime/model/components/Knx.1/properties I get:
What am I doing wrong?
sabicalija commentedon Mar 11, 2019
@ChrisVeigl How do I know what plugins or which of their properties have "dynamic properties"? Is the property
getStringLista sufficient indicator for "dynamic properties"?ChrisVeigl commentedon Mar 11, 2019
in the bundle descriptor, the property entry has
getStringList="true"
(and as the name suggests, the type for dynamic properties is "string" ... )
sabicalija commentedon Mar 11, 2019
I've added a new function to areCommunicator.js:
getRuntimeComponentPropertyList()(see ffdb45d) and the associated REST path to the server of the ARE (see cf5aab8).Those "dynamic" properties can now be obtained using a GET request at
/runtime/model/components/{componentId}/properties/{componentKey}or usinggetRuntimeComponentPropertyList(componentId, componentKey).Next step is the integration in WebACS.
ChrisVeigl commentedon Mar 11, 2019
ok great!
sabicalija commentedon Mar 11, 2019
I've added the functionality for dynamic properties for the WebACS. It's almost done. There seems to be an issue with the first two dynamic properties:
I have to investigate what might be causing this problem. @klues do you have a clue (as your name implies 🙈) what might be causing troubles? I've added the
position,idandkeyto the log (red frame) andidandkeyto the selection list (dropdown). As you can see from the picture, the handler is called for DPTEvent1 and DPTEvent2, even with the correct position (row in the property editor), but the dropdown list is not added for those first twoDPTEvents.EDIT:
I took a look at the "table" that is being built when the property editor is opened. Apparently there are additional
tdelements (seerow[6].children,row[9].children) which are missing forrow[12].children(i.e.,DPTEvent3). But I have no clue where (nor when or what) thosetdelement are added.klues commentedon Mar 12, 2019
instead of
/runtime/model/components/{componentId}/properties/{componentKey}maybe/runtime/model/components/{componentId}/properties/{propertyKey}would make more sense?!@sabicalija I think it's best to investigate this issue in person in the office, I'll be there at about 10:30 am.
sabicalija commentedon Mar 12, 2019
WebACS now loads dynamic properties (see f16261f, PR#35).
@klues Thank's for the support. 🙂 You're right with the naming. It is not ideal, but I wanted to keep the existing naming convention and not introduce a new one (at least - not right now 😏).