Astro binding duplicated links

I’m having a problem with astro binding version: binding-astro - 2.0.0 (it was the same in RC1). I’ve set up items for sun rise, set, elevation, etc. I’ve observed very strange behavior of this binding: after some time from OH2 restart, it automatically creates additional links from astro thing, named in the same way as my items (additional/wrong link marked on the image in red box). This becomes visible in the UI, as the item is not longer displayed using the string I provided, but it is exchanged into “Start time”, “End time”, “Azimuth” (english name, not the local one I use). Also in the logs I see Duplicate item error for my astro related items. I’d like to add, that I’ve done my configuration using files, I’ve only used PaperUI to install bindings, and other addons.

my config files as as follows:
$ cat things/domek.things
astro:sun:home [ geolocation=“XX.X,YY.Y”, interval=60 ]
$ cat items/domek.items | grep astro
DateTime Sun_Rise_Time “Wschod [%1$tH:%1$tM]” { channel=“astro:sun:home:rise#start” }
DateTime Sun_Set_Time “Zachod [%1$tH:%1$tM]” { channel=“astro:sun:home:set#end” }
Number Sun_Azimuth “Azymut słonca [%.1f °]” { channel=“astro:sun:home:position#azimuth” }
Number Sun_Elevation “Wysokosc slonca [%.1f °]” { channel=“astro:sun:home:position#elevation” }

For unknown reason, a new link is created to the item named in the same way as I name my items. It does not depend on how I name items, already checked it. Also, I have “Simple mode” turned off. I’ve tried multiple times a clean installation, but no success. The same thing happens to all Astro items I have defined.

When trying to delete “additional” link/item which is causing duplicated, I receive an error “ERROR: 405 - Method Not Allowed”. Interestingly, no error in the logs

I’ve to admit that I’m run out of idea, and this is slowly driving me crazy… Do you think this is a bug and I shall submit a bug or I’m doing something wrong? Any help will be highly appreciated.

I can think of 3 possible reasons:
a) OH2 does not “like” the characters that you use in the item name and/or item description and generates the link with the default name (this could be a bug… not sure)
b) There is an old *.items file in your /etc/openhab2/items (not likely)
c) There are some stale configs within OH2 from past configurations

Did you try to remove the item from the Console?

smarthome:items remove <item_name>
smarthome:links remove <link_name>

Thanks Dim for suggestions. No old items in the folders are left, this was a fresh clean install. OH2 seems to do not complain about diacritic chars, but I’ve update items config to contain only standard chars and will see today what will happen. If there will be a duplicate I’ll make an attempt to remove a a link as you suggested.

1 Like

In the end it appeared to be a problem with UTF-8 encoding of items file. Even though the file was by default created as utf-8, somewhere this was “lost”. The “duplicate item” entries still appear in the logs, but it does not affect the way how items are displayed as previously. Thanks @Dim for suggestions.

1 Like