Astro rules not working in OH2 (astro2) - cronjob also not working

Hi,

i changed to OH2 and installed astro2 binding.

My astro rules for openening the shutters, aren´t working everytime. Shutters don´t get opened or closed automatically. But sometimes it is working.

Astro time is shown correctly on my sitemap. I see a message to new calculation at 0 o´clock in the openhab.log.

But no log messages were reportet. Not with the cron-rule and not with the astro-time event.

Here is my cron job from today, it didn´t start. I changed the time to now +5 min and waitet, but again, rule not started.

// Rollos morgens nicht vor xx Uhr hoch Mo-Fr
rule "SunriseLimit on --- Mo-Fr"
when
    Time cron "0 45 6 ? * MON-FRI"
then
        logInfo("Rollosteuerung", "6:45 Uhr morgens vorher SunriseLimit " + SunriseLimit.state)
	SunriseLimit.sendCommand(ON)
	logInfo("Rollosteuerung", "6:45 Uhr morgens nacher SunriseLimit " + SunriseLimit.state)
end

Can someone explain me, what´s the difference in the cronjob between ? and * and if MON-FRI is working? On ubuntu-documentation, i found, that i have to use 1-5 instead of MON-FRI, but here in the forum i always see MON-FRI.

openHAB usues Quartz cron expressions. These differ from the Ubuntu expressions in several key ways including:

  • the first field is seconds
  • uses three letter names for months and days of the week
  • uses ? for day of the month field and day of the week field.

So 06:45 Mon to Fri would be:

"0 45 6 * * MON-FRI *"

The quartz documentation indicates that a ? in the day of the month column like you have it should be valid too, though I’ve never seen it (to my recollection) used in OH in that column. It also says the Year column is optional as you have it but I included it for completeness.

Based on the quarts tutorial liked above what you have should work. But maybe OH uses an older version or something like that and what I’ve posted above is needed. I believe I’ve seen cron expressions using MON-FRI notation in the past on this forum so would expect it to work.

You do not supply your Astro triggered rule so I can’t provide any recommendations there.

My rule is working, most of the time. I found out, must have to do something with this:

Is there an error report / issue already made?

If I edit a rule file, this error comes up sometimes and cron job and astro event isn’t working anymore.

I found out something more.

It´s not the cronjob, which doesn´t work, it´s only the astro binding, which doen´t work anymore, when the duplicate field error comes up.

I’ve seen these duplicate field error messages several times, they (usually) come after editing some item files …what causes it I’m not sure of. The only fix is to restart OH2 AFAIK.

But this is a bug in OH2 i think. And i don´t know how to open an issue for that.

Yeah would be nice to confirm if this should be reported as a bug and where, maybe @rlkoshak knows…

There have been several reports of problems loading .rules files multiple times upon edits. I’ve not seen any related to .items files but it could also be a source of problems. I don’t know if there is a bug report yet. I think the issue would be on either the openhab2-distro or the ESH.

Can i supply something to find the error? Maybe someone can open an issue?

You need a detailed description of the problem, example .items files, step by step instructions of what you do to see the error, and the logs.

We can’t really open an issue until we have that information.

Ok, i will collect all the information.

Short before this logfile i changed some items, you can see the refreshing on top of the log. The items are all inside the home.items. But it is strange, that none of the astro items is in this items file. But today rollershutters stayed open on evening.

2017-02-20 13:26:04.728 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.items'
2017-02-20 13:26:06.721 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.722 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.739 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.739 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.740 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.740 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.740 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.740 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.740 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.740 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.758 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.773 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.773 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.773 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.773 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.773 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.774 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.774 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.774 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.788 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.789 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.840 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.845 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.845 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.845 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.845 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.846 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.846 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.846 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.846 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.864 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Date'. Ignoring 'org.eclipse.smarthome.core.library.items.DateTimeItem'.
2017-02-20 13:26:06.864 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.864 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_1'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.864 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Temp_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.865 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Humidity_2'. Ignoring 'org.eclipse.smarthome.core.library.items.NumberItem'.
2017-02-20 13:26:06.865 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_brightness'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-02-20 13:26:06.865 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_color'. Ignoring 'org.eclipse.smarthome.core.library.items.ColorItem'.
2017-02-20 13:26:06.865 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Xiaomi_Gateway_colortemperature'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.

I can confirm that it’s 100% related to the .items. Since i’ve finalized all my items and began coding all my rules, i’ve never had one problem related to mass editing my .rules

I’ts only affected me when working with my .items

I don’t have a definite way to duplicate this aside from constantly editing the .item’s

I have got massive problems with that behaviour. And right now I have no clue what to do. I had to manage a lot these days by .items-files and did here and there do a duplicate entry, removed one afterwards. But the errors remain.
It doenst matter whether it is Light, Temperature or dumy-switches.
I looked in PaperUI since I could not find duplicates in the items-files. And in PaperUI there are duplicates indeed. I tried removing, but this di not work. Guess why…item not found yeah. Real circle there.
Is there a way to clean that mess up?
My logs look like those of halloween, but restarting does not make a achange. The error is permanent.

2017-06-13 17:33:02.387 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'HMSteckdose1'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.401 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'satTVSchauenAma'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.404 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'tVTogglePowerAmazon'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.422 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serienschauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.426 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'SerienAmazonSchauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.429 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serie'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.432 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Wohnzimmer'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.456 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'lightLivingRoomDeathStarColor'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-06-13 17:33:02.690 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'HMSteckdose1'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.704 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'satTVSchauenAma'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.708 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'tVTogglePowerAmazon'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.711 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serienschauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.714 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'SerienAmazonSchauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.717 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serie'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.721 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Wohnzimmer'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.745 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'lightLivingRoomDeathStarColor'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-06-13 17:33:02.969 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'HMSteckdose1'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.983 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'satTVSchauenAma'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.987 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'tVTogglePowerAmazon'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.990 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serienschauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.993 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'SerienAmazonSchauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:02.997 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serie'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.000 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Wohnzimmer'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.027 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'lightLivingRoomDeathStarColor'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.
2017-06-13 17:33:03.281 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'HMSteckdose1'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.295 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'satTVSchauenAma'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.298 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'tVTogglePowerAmazon'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.301 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serienschauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.304 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'SerienAmazonSchauen'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.307 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Serie'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.310 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'Wohnzimmer'. Ignoring 'org.eclipse.smarthome.core.library.items.SwitchItem'.
2017-06-13 17:33:03.334 [WARN ] [.rule.jvmmodel.RulesJvmModelInferrer] - Duplicate field: 'lightLivingRoomDeathStarColor'. Ignoring 'org.eclipse.smarthome.core.library.items.DimmerItem'.

I did try the folwing: I identified which .items-files are concerned and deleted them from openhab2. I did a restart.
Then I could see hundred lines of the following warning in the logs:

2017-06-13 18:06:36.604 [WARN ] [ore.internal.events.OSGiEventManager] - Could not find an Event Factory for the event type 'ItemChannelLinkRemovedEvent'.
2017-06-13 18:06:37.062 [WARN ] [ore.internal.events.OSGiEventManager] - Could not find an Event Factory for the event type 'ThingRemovedEvent'.

Then I uploaded the .items-files again, same error pops up.

It seems the items are registered anywhere, which prevents the duplicates. Removing does not work because those items cant be found. Last pattern is fine, first not. How can I fix this?