openHAB 3.3 Release discussion

The reason probably is that the browser requests a content-type that is not available. Safari adds a Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 header and none of these can be provided by the REST API. That’s why a “400 Bad Request” is returned. This was not properly checked before (in fact the header was ignored), but is now handled correctly to ensure that binary data can be provided in the correct format ([rest] Allow binary MediaType for RawType item states by J-N-K · Pull Request #2825 · openhab/openhab-core · GitHub). The correct content-type for the request is text/plain. You have to add that to your request or omit the Accept header.

1 Like

Can you please Provide a example URL?
Best would be for Chrome :wink:

I’m not aware of a possibility to set headers for normal requests in browsers. It should be possible with tools like Postman or Paw (on Mac) and of course with JavaScript.

Edit: It seems for Chrome and Firefox there are tools that can achieve it: api - View and Set HTTP headers for Safari/Chrome - Stack Overflow

Issue: my binding JAR files (for test versions of bindings) that I had manually dropped in the Addons folder under v3.2 were not automatically picked up (i.e. not installed) during the upgrade from v3.2 to v3.3.

Work-around: I had to delete these JAR files and then drop them again in the Addons folder, which caused OH to pick them up in the normal way.

EDIT: issue created…

1 Like

Google TTS
3.2.0 → 3.3.0 Missing service configuration
Works after version revert (docker).

1 Like

Had big hope that the KEBA Binding problem will solved with 3.3, but it is still the same. All other values are set, but power stays at UNDEF. I activated the DEBUG Level and got for all reports the complete values. So the binding still have a problem, when the item is defined over a file. Setting the same over the UI, works. Debug:

[DEBUG] [internal.handler.KeContactTransceiver] - Sending 'report 1' on the channel '/192.168.***.***:39819'->'/192.168.***.***:7090'
[DEBUG] [internal.handler.KeContactTransceiver] - Received {
"ID": "1",
"Product": "KC-P30-xxxxxxxx-M0R",
"Serial": „xxxxxxxx“,
"Firmware":"P30 v 3.10.36 (211117-093932)",
"COM-module": 1,
"Backend": 0,
"timeQ": 3,
"DIP-Sw1": "0x22",
"DIP-Sw2": "0x00",
"Sec": 6905050
}
 from /192.168.***.***:7090 on the transceiver listener port
[DEBUG] [internal.handler.KeContactTransceiver] - Sending 'report 2' on the channel '/192.168.***.***:39819'->'/192.168.***.***:7090'
[DEBUG] [internal.handler.KeContactTransceiver] - Received {
"ID": "2",
"State": 2,
"Error1": 0,
"Error2": 0,
"Plug": 7,
"AuthON": 1,
"Authreq": 0,
"Enable sys": 1,
"Enable user": 1,
"Max curr": 16000,
"Max curr %": 266,
"Curr HW": 16000,
"Curr user": 16000,
"Curr FS": 0,
"Tmo FS": 0,
"Curr timer": 0,
"Tmo CT": 0,
"Setenergy": 0,
"Output": 0,
"Input": 0,
"Serial": „xxxxxxxx“,
"Sec": 6905053
}
 from /192.168.***.***:7090 on the transceiver listener port
[DEBUG] [internal.handler.KeContactTransceiver] - Sending 'report 3' on the channel '/192.168.***.***:39819'->'/192.168.***.***:7090'
[DEBUG] [internal.handler.KeContactTransceiver] - Received {
"ID": "3",
"U1": 235,
"U2": 235,
"U3": 231,
"I1": 0,
"I2": 0,
"I3": 0,
"P": 0,
"PF": 0,
"E pres": 68653,
"E total": 29752553,
"Serial": „xxxxxxxx“,
"Sec": 6905056
}
 from /192.168.***.***:7090 on the transceiver listener port


Number:ElectricCurrent      keba_p30_x_maxpresetcurrent         "Maximaler Versorgungsstrom [%.3f A]"                      <energy>     (gKEBA)    ["Status", "Current"]         {channel="keba:kecontact:1:maxpresetcurrent"}
Number:Power                keba_p30_x_power                    "Von der Ladestation gelieferte Wirkleistung [%.1f Wh]"    <energy>     (gKEBA)    ["Measurement", "Power"]      {channel="keba:kecontact:1:power"}
1 Like

Updated from 3.2 to 3.3 in openhabian today and got following error, at startup:


[WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "SwitchItem" with key "0_test": The specified name of the item '0_test' is not valid!

In json.db items File I can find the entry 0_test. I tried to delete the entry in srv/openhab-userdata/jsondb/org.openhab.core.items.Item.json
But the file is read only so I can’t fix.
Items are not loaded and startup is not sucessful anymore. Any idea how I could get writing rights on that file to fix the issue?
I think I created that item long time ago using the GUI but never had any problems with that…

1 Like

Use the API Explorer to delete the item.

1 Like

Hi,

after upgrading from 3.2 to 3.3 the UI doesn’t show most of the items values anymore.

Problem seems to be that the URL http://192.168.xxx.yyy:8080/rest/events/states/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee returns all items, but one with name “undefined”

In the log file the request looks like this:

2022-06-28 00:29:10.423 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
2022-06-28 00:29:10.440 [ERROR] [internal.JSONResponseExceptionMapper] - Unexpected exception occurred while processing REST request.
java.lang.IllegalArgumentException: Last segment must not be blank.
        at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:79) ~[?:?]
        at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:59) ~[?:?]
        at org.openhab.core.thing.UID.<init>(UID.java:57) ~[?:?]
        at org.openhab.core.thing.ThingUID.<init>(ThingUID.java:139) ~[?:?]
        at org.openhab.core.thing.ChannelUID.getThingUID(ChannelUID.java:150) ~[?:?]
        at org.openhab.core.thing.internal.ThingRegistryImpl.getChannel(ThingRegistryImpl.java:80) ~[?:?]

But how can I identify the item which causes this issue. Problem is, that I can’t the items settings page ether (http://192.168.xxx.yyy:8080/settings/items/). I looked into all items files, but can’t spot an issue.

1 Like

Upgraded from 3.2.0 to 3.3.0 on Docker for Unraid. Worked well except Rest API doesn’t work for all items. Using node-red openhab2 or openhab3 controller, they query the status on initial connection but never receive any event, let it be update, statechange, command, etc. Because of that, all my rules aren’t working.

Same with Rest API command, they don’t work. I downgraded to 3.2.0 until this is fixed.

Also, any items I had ignore has come back.

edit: Also, the android app non stop say that notification are not available because of http error 500

The error message is related to a thing UID which has less than three segments. Can you check if you have such a thing?

Can you show the query that is used by nodered?

Not sure what you mean by query @J-N-K , but in node red we have several nodes, and one of them listens for state changes as a way to initiate a flow, or rule, if you will.
When deploying / starting the nodes, they will “query” or “read” the states of the devices to which we set them up to.
So for example, if I have a rule that starts whenever the state of the kitchen light changes, and I deploy that, the current state of the light would be read, and updated whenever it changes.
Currently the problem is that it is being read only once. No further updates after that first one is received.
Yesterday the dev of the nodered-contribute-openhab3 node sent an update, but it didn’t fix the issue, at least in my case.

Further discussion here: Openhab 3.3.0 RC1 · Issue #38 · jeroenhendricksen/node-red-contrib-openhab3 · GitHub

I have no insight on nodered. I can only guess that it uses the REST API and SSE events. So I need to see the call to the REST API and also the m

Problems with Hue Things after change to 3.3 from 3.2 (openHABian)

Detailed …

Maybe you have the same issue, as I had with my ZWave Controller. I had to change 0 to false in the thing configuration (Code):

I would assume, that you have (at least) to change ledindication channel to false, as stated in the error message. Maybe you have to change other channels too…

This helped for me

1 Like

Thx … unfortunately still un-initialized.
The Led-Indication is off (and was) … so I guess it is a wrong value in the device-database.

Can you send the Code of the Thing?

Maybe there are more channels to change?

MAybe you can have a look in openhab.log and paste output
(The timeslot when the thing goes tries to go online)

I double checked all my things manually, which took a lot of time. I found an issue within my Openweathermap things definition. I used “local” two time. Changing one to “local2” solved the issue.

image

So the error message “Last segment must not be blank” is misleading. Furthermore it would save so much time, if the error message would tell me the filename and line in which the error occurs or at least some other hints like binding name.

helped to fix this