Kwikset SmartCode 888 - error when attempting to update User Codes

Running Openhabian on pi 4 with openHAB 3.2.0.M3

I have two Kwikset locks, a 910 and an 888 … When attempting to set a user code from the UI on the 888 I get the following log:

2021-10-06 17:33:54.095 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - No message body writer has been found for class java.util.Collections$UnmodifiableMap, ContentType: */*

Basically I am writing a values into a “Code 1 Label” and the “Code 1” then hitting Save

The same steps work for the SmartCode 914TRL with no error.

Any ideas what might be wrong?

A little more progress … I’ve found that I can set the Code and Label using a Curl (using the API Explorer), however a question:

What does “Pending” mean in the “Thing configuration” context? It doesn’t seem to indicate that the change is “Pending” because I can see the change working even though it says “Pending”

Usually “pending” means you made a change, but the battery device has not awoken. I’m not sure about locks since they are frequently listening. I would think the “pending” state would not last long, but maybe there is a more formal awake required for some parameters? Does pending still show after a UI page refresh? Anyway I do not think there is a problem.

Bob

1 Like

Thanks Bob. The Pending still shows after a page refresh (after many hours and operating the lock regularly i.e. it is clearly awake) . I’ll see if it goes away after the 2am resync.

Agreed, it doesn’t seem to cause any issue with the actual data being saved, although it is misleading.

There is clearly sth wrong with this particular device/binding as I can’t “Save” without getting the error:

==> /var/log/openhab/openhab.log <==

2021-10-07 12:53:36.744 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - No message body writer has been found for class java.util.Collections$UnmodifiableMap, ContentType: */*

The error is well out of my range of knowledge. I googled this which is also clear as mud to me;

The unmodifiableMap() method of java.util.Collections class is used to return an unmodifiable view of the specified map.

Is there anything in the REST API that looks like that ContentType for that device? Generally a line starting with a * in java is a comment and maybe it is somehow being included in the JSON? Anyway just a WAG.

Bob

FYI - The Pending is still there after the 2am resync … maybe @chris can comment on why it might be stuck in Pending state?

The error is coming from the Binding, not from any interaction with the REST API. I can use that without problems. Its only if I try to save the config from within the “Thing” configuration page.

I’m not sure what “resync” you mean - there isn’t any resync that the binding does. I guess you mean the “heal”, but this has nothing at all to do with configuration parameters. The heal is just to do with neighbour tables and mesh routing.

Not really - I mean it means that the data hasn’t been transferred, but I can’t say why that is without seeing a log. Presumably the device has not been communicating, but maybe there is a bug - I don’t know. Sorry.

The error that you have posted doesn’t come from the binding. This comes from the REST API - maybe it’s root cause is in the binding - I really can’t say from this, but the error is reported in the REST interface.

Yes the “Heal” but the local XML file is updated at ~2:00am so I thought there was a relation.

Ok I can try to capture a log.

Well, all I see is that as soon as I hit “Save” in the config for the binding, the Error occurs.

Unfortunately enabling the zwave debug only shows the following:

==> /var/log/openhab/openhab.log <==
2021-10-08 12:29:14.495 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 15: Configuration update received
2021-10-08 12:29:14.508 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - No message body writer has been found for class java.util.Collections$UnmodifiableMap, ContentType: */*

It happens every time I hit send, regardless of whether I update any usercode fields or not.

Would other debug logs be useful?

Stumbled across this. The solution (to the error message, not the pending thing) was a parameter in the REST API.

Bob

Thanks Bob. I think the error msg and the Pending are due to the same thing: the binding gets the message (but then it throws error), so it doesn’t update the changes, so they remain pending.

I’ve tried deleting all the values in the config are hitting “save” … same result. If I reload the binding, all the original values come back (naturally because they weren’t saved. ).

Deleting all the device code wouldn’t help. The error seems very similar to what I had. I had to turn of full debug to see what line of config produced the issue for my device.

2 Likes

Hi @QuagmireMan … I see from another thread you have the same 888 lock … I wonder if you have tried writing user codes using the binding config? I am getting an error when I try (although I can use the REST API to make changes)

Thanks Jonathan - When you say “Full debug” what are you referring to? I turned on zwave debug which other debug would be useful?

In the openhab-cli I ran:

Log:set DEBUG org.openhab

From memory and tailed the log as I was clicking save.

1 Like

Ok, that helped!

2021-10-08 14:20:28.381 [DEBUG] [onfig.core.ConfigDescriptionRegistry] - No config description found for 'thing:zwave:device:0d28f614c7:node15', using alias 'thing-type:zwave:kwikset_smartcode888_00_000' instead
2021-10-08 14:20:28.388 [DEBUG] [st.core.internal.thing.ThingResource] - Config description validation exception occurred for thingUID zwave:device:0d28f614c7:node15 - Messages: {config_33_4=The value must not be greater than 4., config_34_4=The value must not be greater than 4.}
2021-10-08 14:20:28.398 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - No message body writer has been found for class java.util.Collections$UnmodifiableMap, ContentType: */*

Very similar to the -1 error in the other thread. I’m on it :slight_smile:

Thanks @apella12 and @jonathanb

Yep same type of error. Glad to see my original thread helped.

1 Like

Ok, I have figured out how to clear the Pending states but I really believe something is messed up in the code validation for the values. First of all, I have no idea what the purpose of the 8 digit SKU code is all about. But it states in the binding that it needs to be set in two halves, the upper 4 digits in config_33_4 and the lower 4 digits in config_34_4:

What these are for, I have no idea. However, the interface only allows you to enter a value from 0-4 … no 4 digits, but a number from 0 to 4. Clearly this isn’t what the device wants.

After factory reset, those config params have some large number in it (but doesn’t seem to match to any SKU I can see) … So anyway, after seeing that I could clear the pending from those two parameters, I tried that on the user codes. Sure enough, if I use a small number (not 4-10 digits as it is supposed to be), the Pending goes away and the value programmed at the physical device shows up.

Something is definitely not right. I would be happy to examine the code but not sure where to look. Is this a UI thing or a binding thing?

The problem is in the device database. That’s where a max value of 4 is specified for 33 & 34.

As a commentary, the device DB is community maintained and the person who set it up may not understand or need all the parameters outlined in the manual. Yes, it is reviewed, but as a practical matter, parameter configuration largely depends on others with the same device to fix things from time to time.

Without the device and without some possible advice from the manufacturer it is unclear to me what should be in the setup. I’m assuming you are registered and have asked @chris for write access?

Bob

edit: The manual shows this: Default Values for 33 and 34: 0x20, 0x20, 0x20, 0x20 (all spaces)

1 Like

I don’t think that’s right. If the binding marks the data as PENDING, then it means that it has received the config, but in the log above, it doesn’t look like the binding is processing the configuration. We see the “Configuration update” log entry - this occurs right at the beginning of the update, and the binding should then process each value, and it logs each individual parameter. Once it’s done this, if there’s an update, THEN it will mark the data as PENDING. Since it doesn’t seem to be processing the parameter, I think it’s not related.