ruebox / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 1.0
16 stars 6 forks source link

Add Items manually with .items-config-file #45

Closed hendrik-d closed 5 years ago

hendrik-d commented 5 years ago

Hello! Is it possible to add freeathome items manually by adding them in the .items config file? I want to use the freeathome binding with the homekit binding and therefore need to add the items manually. Until now i found no example for the free@home-binding specific data between the { ... }.

ruebox commented 5 years ago

If you add the things via discovery things are added to the registry. If simple mode for item linking is enabled in Configuration -> system then corresponding items are generated that are visible in habpanel and all other uis. Hope this helps.

hendrik-d commented 5 years ago

Thanks for your answer! I know, but for the homekit binding I have to add some additional declaration for each item in the .items config file, therefore i need to add them manually. Is that possible?

ruebox commented 5 years ago

I think it should be feasible. However this would be a generic feature of openhab and not the binding itself.

  1. Configure your items in a .items file
  2. Switch of simple link mode: System configuration -> Simple linking
  3. Discover your B+J stuff. If simple mode is off, only things, but not linked items are generated.
  4. Configure a thing: Now you should be able to select the channels of a thing and connect it to the items.

When simple mode is deactivated, you can reconfigure all thing -> channel -> item linkages. Yes give it a try. Hope this helps. Otherwise just let me know