OpenHAB 2.5.12 items stopped working after New year

  • Platform information:
    • Hardware: PC
    • OS: Windows 10, 1909
    • Java Runtime Environment: openjdk version “1.8.0_302”
    • openHAB version: 2.5.12

I’m using openHAB just as a bridge between my X10 appliances and Google Assistant, so, I don’t use and don’t have configured sitemaps, things, scripts, scenarios etc. & so on. By the way, I’m using openHAB for a years (many years!).
First issue I had after upgrading from old version to recent 2.5.12 - Google Assistant stopped working because of changes in openHAB. After wasting a few hours, I found a solution - added metadata with “ga” using console (but it wasn’t a good experience :frowning: - I still believe even free and open source should care more about compatibility). Fortunately for me, I got my stuff working.

But yesterday I’ve found - openHAB stopped working again! With absolutely NO REASON, at least from my side (I haven’t touched anything!).

Here is my “default.items”:

Switch Office_Light "Office lamp" ["Switchable"] {http=">[ON:GET:http://192.168.1.150:8089/?address=B1&command=ON] >[OFF:GET:http://192.168.1.150:8089/?address=B1&command=OFF]"}
Switch Light "Lamp" ["Switchable"] {http=">[ON:GET:http://192.168.1.150:8089/?address=A3&command=ON] >[OFF:GET:http://192.168.1.150:8089/?address=A3&command=OFF]"} 
Switch Kids_Light "Kids room light" ["Switchable"] {http=">[ON:GET:http://192.168.1.150:8089/?address=A4&command=ON] >[OFF:GET:http://192.168.1.150:8089/?address=A4&command=OFF]"}
Switch Basement "Basement" ["Switchable"] {http=">[ON:GET:http://192.168.1.150:8089/?address=A8&command=ON] >[OFF:GET:http://192.168.1.150:8089/?address=A8&command=OFF]"}
Switch Internet "Internet" ["Switchable"] {http=">[ON:GET:http://192.168.1.150:8089/?address=C1&command=ON] >[OFF:GET:http://192.168.1.150:8089/?address=C1&command=OFF]"}

Surprisingly, only “Office_Light” item is still working, other items shows an error (from log), like

2022-01-08 16:58:51.394 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.

Could you please tell me what’s happened after new year, and how to fix it? I’m trying to save my time: openHAB become now overcomplicated software, hard to properly configure and use :frowning:

Something (sitemap? HABPanel? GA? something else?) it’s trying to issue a command to an Item named “Lamp”. You don’t have an Item named “Lamp”. You have an Item labeled “Lamp” but that Item’s name is “Light”.

What is this something? :man_shrugging: you don’t say.

What happened after the new year? Clearly something must have changed to cause Item labels and Item names to be mixed up. I suspect you messed up the metadata when adding it through the console and used the labels instead of the names of the Items.

Why didn’t you just add it in your .items files?

Google changed the API on their end and tags were no longer going be to be sufficient. And to be fair, it was announced that this change was coming and tags were continued to be supported for about two years before support was dropped. Even free and open source projects have to stop supporting and remove features that are no longer workable.

1 Like

Hmm, kinda strange comment - no resolution provided but only attacks :frowning:

One more time: until January 2022 everything, including “wrong label names” are worked fine. It’s a pretty clear statement, right? So, there was NOTHING wrong except bad coding practices by openHAB devs.

Because it’s IMPOSSIBLE, and it’s listed in the openHAB documentation.

It’s incorrect, Google changed nothing since December, 2021. And, as I mentioned before (and you’re missed), item named “Office_Light” is still working but the rest is not.

Please mind your wording, there are no attacks in the comment of @rlkoshak and there is no bad coding from the devs.

The question why you did not add metadata through items file is valid, as the docs clearly show that it is possible. Don‘t know where you got that you cannot.

There might be something wrong with the metadata added through console, which we cannot see.
So please show us the metadata for the not working switches.

BTW, have you tried to read info before posting?
Link you provided is clearly stated

NOTE: metadata is not (yet?) available via paperUI. Either you create your items via “.items” files, or you can:

  • add metadata via console:
smarthome:metadata add BedroomLights ga Light

By the way, my question is not about how to add metadata - I already knew it and already added. And - another “one more time”! - everything worked fine on December, 2021!

I don’t know guys what are you doing for life (I’m a senior software engineer, software consultant) but looks like I’ve chosen a wrong place to post my question (will duplicate it on github tomorrow).
I changed nothing, everything worked fine - so, what are you assuming?! It’s a buggy openHAB backend change happened recently (I think so) - no other possibilities.

You aren’t devs and have no relation to openHAB production and deployment, right? Just an “experienced users” and “project fans” - it’s definitely OK but it’s not what I’m looking for :frowning:

Maybe the thing about that is that you do create your Items via xxx.items files - you’ve shown us an extract.
An interpretation of the above is that you should also add your metadata in the same place.
I’m inclined to think that the use of items files could discard any transient metadata added from console at each reload, but what do I know, I’m not a dev either.

Yes I did, but you did not.
You wrote ir is impossible to add metadata via items file but are quoting that it is but not via PaperUI.
Pleasr read more carefully before you blame others !

Before posting to github be aware the same question to show your metadata you added will be asked.

Listen, the issue is NOT on metadata at all. My question IS NOT about how to add metadata!

My issue is: after recent (probably) openHAB backend update, it stopped 'cause of some unknown reason (99% bug) recognize my items, listed in the “default.items” file - only one record (I tried to change items order in text file and restart openHAB - no luck at all) worked. There are no differences with other items at all. That’s all.

When I have “metadata issue” (after upgrading openHAB) I tried to add new metadata tags to the text file - no luck at all. I solved that issue by adding “ga” metadata one by one via console.
But current issue is differ. Why do you guys are trolling me?!

As per the first comment there is a difference between item name (what’s office_light, light, kids_light, etc in you case) and the item label ( what’s office lamp, lamp, kids room lamp,… for you).

For some reason you are receiving the rest request based on the items label, but the interface will only accept item names. Maybe that’s worth to look why google (or something else submitting the command) is using the wrong string.

Have you tried to manually query the rest interface to see if the metadata you have added is configured correctly?
Is there any other integration, script, etc that you have, what’s using the rest interface?
If it’s with Google, have you removed ga metadata on one item, also removed the item from your Google account and tried to re-add it?

Hmm, it looks like no one want to read and understand my question :frowning:

Another “one more time”: a couple of weeks ago, on December, 27, 2021, every item from my setup (with “ga” metadata added via console) worked pretty fine with Google. Yesterday I tried to turn off lights in the living room (usually I do it via my nice and pretty simple web page running on RPi) using Google Assistant but it said “It looks like Lamp is offline”. I went back to my PC and checked openHAB web console - only “Office_Light” item was working. I haven’t changed anything on my side!

P.S. I just checked https://home.myopenhab.org/habpanel/index.html#/ - everything is disappear! Should be also “my fault”, isn’t it? :wink:

If it’s not only Google assistant that’s failing, but your items are not working in general, than it’s most likely that your item definition is wrong due to the latest change you have applied. That’s what also the others before wanted to help with

I listed my default.items file in the very first post - could you tell me, what’s “wrong” with my items? And how they become “wrong” in the couple of weeks?

E.g. if you apply additional metadata via console to the items

ADMIN ON :+
This is the last warning, stop this aggressive tone. We try to help you, but YOU seem not to listen.
ADMIN OFF

As you describe, you did not setup sitemaps or anything, just Google Assistant is used to control the items, that’s fine. So one item is working, the others are not.
As the support for item tagging for Google Assistant has stopped, the bridge is the metadata you entered via console. So it is legit to think that for some reason, there is an issue with the metadata, wich we cannot see, as you did not show.
Easiest way would bee to delete the metadata via console and redefine those in your default.items file while removing the old tags.
After that, please try again, if errors occur, please post the log and your new default.items wot the metadata added.

Why this happened after New Year will then be the second step, but let us first try to get you back to a working system.

Other items (except Office_Light) are also not working from openHAB dashboard because they become “unknown”. So, it’s not a GA related question but openHAB related.
I.e. openHAB recognize only Office_Light item. And here is output from console:

openhab> items list
Light (Type=SwitchItem, State=NULL, Label=Lamp, Category=null, Tags=[Switchable])
Kids_Light (Type=SwitchItem, State=NULL, Label=Kids room light, Category=null, Tags=[Switchable])
Basement (Type=SwitchItem, State=NULL, Label=Basement, Category=null, Tags=[Switchable])
Internet (Type=SwitchItem, State=NULL, Label=Internet, Category=null, Tags=[Switchable])
Office_Light (Type=SwitchItem, State=OFF, Label=Office lamp, Category=null, Tags=[Switchable])

For all items (except Office_Light) State=NULL. On the openhab.log I just have:

2022-01-08 16:59:37.309 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items'
2022-01-08 16:59:38.323 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'default.items'
2022-01-09 12:40:45.709 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.
2022-01-09 12:40:46.828 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.
2022-01-09 12:40:47.402 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.
2022-01-09 12:40:47.937 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.
2022-01-09 12:40:48.311 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.
2022-01-09 12:40:51.202 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Children_Light' for the unknown item 'Children_Light'.
2022-01-09 12:40:51.727 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Children_Light' for the unknown item 'Children_Light'.
2022-01-09 12:40:52.050 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Children_Light' for the unknown item 'Children_Light'.
2022-01-09 12:41:22.940 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Children_Light' for the unknown item 'Children_Light'.
2022-01-09 12:41:24.385 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Children_Light' for the unknown item 'Children_Light'.
2022-01-09 12:41:42.052 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Lamp' for the unknown item 'Lamp'.
2022-01-09 12:49:54.993 [WARN ] [shd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/127.0.0.1:11869])[state=Opened] IOException: The specified network name is no longer available.

No other helpful information found. Any suggestion?

This is some new information. Could you please share your dashboard config.

I added 3 items only 'cause I’m not using any openHAB UIs or apps (only as a GA bridge). BTW, as I mentioned above, everything (every item) worked fine until now. Currently, only Office_Light has states (and icons) “on” and “off”, two other items shown as “turned on lightbulb” but has no states.

{
    "dashboards": [
        {
            "id": "OfficeLight",
            "name": "Office lamp",
            "row": 0,
            "col": 0,
            "tile": {
                "backdrop_iconset": "eclipse-smarthome-classic",
                "backdrop_icon": "light",
                "icon_size": 32
            },
            "widgets": [
                {
                    "item": "Office_Light",
                    "name": "Office Lamp",
                    "sizeX": 2,
                    "sizeY": 2,
                    "type": "switch",
                    "row": 0,
                    "col": 0,
                    "font_size": "24",
                    "useserverformat": true,
                    "iconset": "eclipse-smarthome-classic",
                    "icon": "light",
                    "icon_size": 64
                }
            ],
            "$$hashKey": "object:19"
        },
        {
            "id": "LivingRoomLight",
            "name": "Lamp",
            "row": 1,
            "col": 0,
            "tile": {
                "backdrop_iconset": "eclipse-smarthome-classic",
                "backdrop_icon": "light",
                "icon_size": 32
            },
            "widgets": [
                {
                    "item": "Lamp",
                    "name": "Lamp",
                    "sizeX": 2,
                    "sizeY": 2,
                    "type": "switch",
                    "row": 0,
                    "col": 0,
                    "font_size": "24",
                    "useserverformat": true,
                    "iconset": "eclipse-smarthome-classic",
                    "icon": "light",
                    "icon_size": 64
                }
            ],
            "drawer": {},
            "header": {},
            "$$hashKey": "object:20"
        },
        {
            "id": "ChildrenRoomLight",
            "name": "Play room light",
            "row": 2,
            "col": 0,
            "tile": {
                "backdrop_iconset": "eclipse-smarthome-classic",
                "backdrop_icon": "light",
                "icon_size": 32
            },
            "widgets": [
                {
                    "item": "Children_Light",
                    "name": "Play room light",
                    "sizeX": 2,
                    "sizeY": 2,
                    "type": "switch",
                    "row": 0,
                    "col": 0,
                    "font_size": "24",
                    "useserverformat": true,
                    "iconset": "eclipse-smarthome-classic",
                    "icon": "light",
                    "icon_size": 64
                }
            ],
            "drawer": {},
            "header": {},
            "$$hashKey": "object:21"
        }
    ],
    "menucolumns": 1,
    "settings": {
        "theme": "default"
    },
    "customwidgets": {}
}

This is very confusing; if I messed up with upgrades or configs etc. I’ll have no question. The worst thing it stopped working without any reason (from my side).

BTW, right now I opened https://home.myopenhab.org/habpanel/index.html#/ but dashboard not exist anymore (but yesterday it was the same as I have on localhost). And openHAB logs aren’t helpful :frowning:

So, do I have any other option than reinstall everything from the scratch?

By the way, is openHAB 3.2.0 compatible by items description format (default.items) with 2.5.12? I need to setup just a bridge to GA only: no UIs, custom scenarios, scripts etc.

Probably, I’ll install latest Raspberry Pi OS and openHAB on my RPi 2B (I already attempted - a long time ago! - to use openHAB on my RPi but had some unresolved issues. What’s why I installed on my Windows PC (my primary workstation, always on).

You don’t have an Item named “Lamp”. You have an Item named “Light”.

You don’t have an Item named “Children_Light”. You have an Item named “Kids_Light”.

Assuming you’ve not changed the Item names these could never have worked as configured. I suspect a similar problem exists in the “ga” metadata since GA isn’t working also.

Like I said at the beginning, “something” is sending commands to OH for Items that don’t exist. These widgets a are that something. There might be something else (e.g. GA).

Why did GA stop working all of suddenly in December? Probably because tags were still supported until then and GAv was still using the tags. Note that tagged support was dropped, it’s only now fully relying on the metadata and if the metadata is configured on non-existent Items OH is going to complain about commands sent to items that don’t exist.

yes.

1 Like