varamfer / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

Openhab Designer needs to be aware of items defined in items file #100

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using the Openhab Designer to develop a rule the Designer is currently 
aware of variables defined locally in the rule but not of items defined in the 
items file.

So if you have e.g.

Number Temp_VVB_in "VVB in [%.1f C]" <temperature> (VVB)

in your items file and you then have the following code line in a rules file

var vvb_in = (Temp_VVB_in.state as DecimalType)

the Designer complains with a "Couldn't resolve reference to 
JvmIdentifiableElement 'Temp_VVB_in'.

The code executes perfectly of course, but all rules referencing item variables 
are full of the red X:es which looks nasty in the Designer.

Original issue reported on code.google.com by henrik.sjostrand on 10 Aug 2012 at 9:49

GoogleCodeExporter commented 8 years ago
FYI: This works absolutely fine, there is just one other bug, which you 
probably got caught by:
If you start the Designer and do NOT choose the configuration folder (again), 
the items are not correctly loaded (although you see the configuration files, 
the "Items" view is empty). Simply use the folder icon to select the 
configuration folder (again) and the item view will be populated and the names 
will be resolved in the rules.

I will try to fix this little bug for the 1.0.0 release.

Original comment by kai.openhab on 10 Aug 2012 at 10:58

GoogleCodeExporter commented 8 years ago
Right, reloading the configuration solved the problem.

Original comment by henrik.sjostrand on 11 Aug 2012 at 7:54

GoogleCodeExporter commented 8 years ago
I have committed a fix with which the reloading should now not be necessary 
anymore.

Original comment by kai.openhab on 12 Aug 2012 at 7:45