Strange error when updating an item file

Try putting a space after the [ and before the ] in the tag parameter:

//garage
Switch garage_ydoer "Tryk" <WallSwitch> [ "lighting" ] {ihc=">[ON:799249:100]", autoupdate="false"}

Switch garage_lys "Garage Loftlys" <light> [ "lighting" ] {ihc="52571"}
Switch garage_pir "PIR [MAP(motion_modsat.map):%s]" <cum_motion> [ "alarm" ] {ihc="13667345"}

Switch garage_zwave_pir "Z-Wave PIR" <presence> [ "lighting" ] {ihc=">[ON:16270865:100]"} 

Nope, still get the warning…

2018-06-12 00:42:53.772 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'garage.items'
2018-06-12 00:42:53.801 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:garage_ydoer in ManagedMetadataProviderImpl, because it does not exists.
==> /var/log/openhab2/events.log <==
2018-06-12 00:42:53.807 [ome.event.ItemUpdatedEvent] - Item 'garage_ydoer' has been updated.
==> /var/log/openhab2/openhab.log <==
2018-06-12 00:42:53.811 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:garage_lys in ManagedMetadataProviderImpl, because it does not exists.
==> /var/log/openhab2/events.log <==
2018-06-12 00:42:53.820 [ome.event.ItemUpdatedEvent] - Item 'garage_lys' has been updated.
==> /var/log/openhab2/openhab.log <==
2018-06-12 00:42:53.825 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:garage_pir in ManagedMetadataProviderImpl, because it does not exists.
==> /var/log/openhab2/events.log <==
2018-06-12 00:42:53.832 [ome.event.ItemUpdatedEvent] - Item 'garage_pir' has been updated.
==> /var/log/openhab2/openhab.log <==
2018-06-12 00:42:53.837 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:garage_zwave_pir in ManagedMetadataProviderImpl, because it does not exists.
==> /var/log/openhab2/events.log <==
2018-06-12 00:42:53.846 [ome.event.ItemUpdatedEvent] - Item 'garage_zwave_pir' has been updated.

garage.items

//garage
Switch garage_ydoer "Tryk" <WallSwitch> [ "lighting" ] {ihc=">[ON:799249:100]", autoupdate="false"}

Switch garage_lys "Garage Loftlys" <light> [ "lighting" ] {ihc="52571"}
Switch garage_pir "PIR [MAP(motion_modsat.map):%s]" <cum_motion> [ "alarm" ] {ihc="13667345"}

Switch garage_zwave_pir "Z-Wave PIR" <presence> [ "lighting" ] {ihc=">[ON:16270865:100]"} 

Lighting (Capital L)?

Nope, still the same Warning.

Also cleared the cache and tmp.
Did a reboot.
Ran the “check permission” in openhabian-config

I´m starting to run out of ideas here :frowning:

The item file parser is sometimes very particular about what it want to see.
One last idea and the I run out too
Add spaces after { and before } in the binding definition:

//garage
Switch garage_ydoer "Tryk" <WallSwitch> [ "Lighting" ] { ihc=">[ON:799249:100]", autoupdate="false" }

Switch garage_lys "Garage Loftlys" <light> [ "Lighting" ] { ihc="52571" }
Switch garage_pir "PIR [MAP(motion_modsat.map):%s]" <cum_motion> [ "Alarm" ] { ihc="13667345" }

Switch garage_zwave_pir "Z-Wave PIR" <presence> [ "Lighting" ] { ihc=">[ON:16270865:100]" } 

Hmmm… I think I found the reason…

Made a new item file and removed the _ in the item

Like this:

Switch garagelys "Garage Loftlys" <light> [ "Lighting" ] {ihc="52571"}

This one does not bring up the warning

But this one does:

Switch garage_lys "Garage Loftlys" <light> [ "Lighting" ] {ihc="52571"}

Is this a bug in OH 2.3??

Possible, as I said the item Parser has strange behaviour sometimes

@kai, see above, please

I really hope this is just a simple bug. All my items are using underscore :frowning:

I think this is related:

Ref: Warnings when updating an item file with tags · Issue #5670 · eclipse-archived/smarthome · GitHub

Also: Help with a few item warnings OH 2.3 - #9 by Kai

It is related. Notice Sharpy is using underscore in items as well… Guess this needs crooslink, as the other thread doesn´t seem to mention the use of underscore beeing the problem.

2 Likes

Most of my items use underscore and I get the error as well. Using find/replace to edit them out at the moment.

Mine don’t have underscores, yet I get the warning. For me it’s not just an annoying warning, but it also means that I am not able to give commands via amazon alexa, as everything that gets the warning is “not responding” to Alexa.

Any ideas?

I am seeing the same as @Elad_Mor with or without the underscore and trying to configure my Alexa network shows zero items during Device Discovery in the app.

What ping are you getting to the myopenhab.org server?

Also does this link give you your items? If not using openhabian replace with your IP of your server…
http://openHABianPi:8080/rest/items/
The items will need both a TAG and also a LABEL, at least with the google home it will not work unless you add labels to your items, not sure if the same applies to Alexa.

What is the above url suppose to show?
I get ALOT of text, which mainly seems like my items. But it doesn´t look like something right or usefull?

It is supposed to show all your items in JSON FORMAT. That is the raw data the cloud connector fetches your items in before sending it onto the cloud server.

Example of my stripped down output is below. I seem to have a unique issue where I can only get 5 tagged items to sync, any more tags and it fails:

[{"link":"http://openhabianpi:8080/rest/items/BabyMonitor","state":"NULL","editable":false,"type":"Switch","name":"BabyMonitor","label":"Baby monitor","tags":["Switchable"],"groupNames":[]},{"link":"http://openhabianpi:8080/rest/items/FeedingLights","state":"NULL","editable":false,"type":"Switch","name":"FeedingLights","label":"Feeding lights","tags":["Switchable"],"groupNames":[]},{"link":"http://openhabianpi:8080/rest/items/ChangingLights","state":"NULL","editable":false,"type":"Switch","name":"ChangingLights","label":"Changed lights","tags":["Switchable"],"groupNames":[]},{"link":"http://openhabianpi:8080/rest/items/SleepingLights","state":"NULL","editable":false,"type":"Switch","name":"SleepingLights","label":"Sleeping lights","tags":["Switchable"],"groupNames":[]},{"link":"http://openhabianpi:8080/rest/items/TVDimming","state":"NULL","editable":false,"type":"Switch","name":"TVDimming","label":"TV dimming","tags":["Switchable"],"groupNames":[]}]

Edit: Since it has no carriage/line returns it shows as a single line here but in a browser if you zoom in and out you can get it to display 1 item per line. Hold CTRL button down and use your mouses scroll wheel.

@itbeyond @Elad_Mor do you have a label the thing in quotes after the item name ?

This is required or Alexa will not function. The Alexa docs as well as the google docs don’t explicitly state this, but a label is required.

For example

Switch item_name “item label” [ “Lighting”…

Failure to have the item label will cause Alexa to discover no devices.

@matt1 & @Thedannymullen Ping results as follows:

ping myopenhab.org
PING myopenhab.org (139.162.171.235) 56(84) bytes of data.
64 bytes from li1488-235.members.linode.com (139.162.171.235): icmp_seq=1 ttl=49 time=365 ms
64 bytes from li1488-235.members.linode.com (139.162.171.235): icmp_seq=2 ttl=49 time=365 ms
64 bytes from li1488-235.members.linode.com (139.162.171.235): icmp_seq=3 ttl=49 time=365 ms
64 bytes from li1488-235.members.linode.com (139.162.171.235): icmp_seq=4 ttl=49 time=365 ms
64 bytes from li1488-235.members.linode.com (139.162.171.235): icmp_seq=5 ttl=49 time=364 ms

My /rest/items shows results however I have only 1 light configured with tags and in the items it looks like this:

Switch Kitchen_PantryLights “Pantry Lights OH” (gDevices,gRoom_Kitchen) [ “Lighting” ] {mios=“unit:vera,device:100/service/SwitchPower1/Status”}

In the /rest/items output it appears like this:

{“link”:“http://openhabianpi:8080/rest/items/Kitchen_PantryLights",“state”:“OFF”,“editable”:false,“type”:“Switch”,“name”:“Kitchen_PantryLights”,“label”:"Pantry Lights OH”,“category”:“light”,“tags”:[“Lighting”],“groupNames”:[“gDevices”,“gRoom_Kitchen”]}

I have just tried another discovery and again nothing in Alexa App. I also note that on myopenhab.org there is nothing showing in my items list if it is meant to be in there. I can see my OH server is connected correctly to myopenhab.org and I can use the Android app remotely to view items and sitemaps.

Any Ideas?

Your items file looks correct.

I am possibly concerned about the output of the rest api. Unless it is a cut/paste issue it shows some in blue some in black? The issue though is the blue ends right in the middle of the label.
If you install the rest api docs t allows you to see the rest api items in a more formatted way. I won’t have my laptop to help you through install for a few days. If you don’t have it solve by the end of week ping me on im I can type something and post here.

On the items showing up in the cloud connector. I found the following things.

  1. The items won’t get pushed until they experience a state change.
  2. In my setup unless they are explicitly declared in the openhab.cfg file or paper ui under openhab cloud setting. They don’t show up. They do however function. It is strange. I have 8 items that are tied to Alexa but only 2 show up in my Openhab.

One last silly question, you did add the openhab skill in Alexa? If so it should show as connected in a tab in my openhab. As I don’t have my laptop I can’t tell you which one. I don’t remember right now, but it’s there.

Please use code fences, I can see smart quotes and they will cause issues but unless u post in code fences it may just betheforum.

Btw do not exposeitems as that is not needed unless you use IFTTT as it will constantly use your internet even when not using a app or ui. Also best to keep The load on myopenhab as low as u can as it is a community runserver. The items at myopenhab will only update if u expose an item and then move the control. As mentioned do not expose any items just be sure to have remote andnotifications selected and then the tags do the rest.