Updating Z-Wave device parameters fails

Hey guys,

I am running OH2 on a Raspberry PI 3. Since I came to OH2 from OH1, I wanted to have all my configuration defined in text files (so that I could version control my configs). The problem is that when I try to update configuration parameter of Aeon Labs HEM device, I always end up getting this line in my logs:

2017-12-26 21:48:20.917 [INFO ] [ome.io.rest.core.thing.ThingResource] - Received HTTP PUT request for update configuration at 'things/zwave:aeon_dsb09_00_000:controller:node14/config' for an unmanaged thing 'zwave:aeon_dsb09_00_000:controller:node14'.

After doing some googling, I found a comment made by Chris saying that because things and items are textually defined, OH cannot make device configuration changes. (404 error when updating zwave device properties)

I was wondering if it’s still the case? If so, what are my options? if it’s not the case, could you steer me in the right direction?

Thanks for the help.

Yes.

Define through HABmin.

Edit: here are some more information about this:

Thanks for a fast reply, @sihui!

I am not quite following what you’re saying… Are you proposing that I:

  1. Remove the thing from *.things file
  2. Add thing using HABmin
  3. Update my device config
  4. Remove thing via HABmin
  5. Re-Add thing in my *.things file

Does that sound right?

You did not ask for a step by step tutorial.

But yes, remove everything defined through text files, let the things be autodiscovered and configure them: the usual way in openHAB2 and much easier than text files …
And if dealing with zwave it is recommended to use HABmin and not PaperUI, although most of it will work through PaperUI too.

I know :slight_smile: Just making sure that my understanding of your directions is correct :slight_smile:

Thanks for the help!

1 Like

I took a closer look and I don’t understand what you are writing :grinning:

Remove the thing from *.things file > correct
Add thing using HABmin > correct
Update my device config > whatever you mean by this
Remove thing via HABmin > no, why?
Re-Add thing in my *.things file > no, you won’t have any things files when using GUI

Use HABmin to update device configuration parameters

I want to maintain my git repo with OH configs and I don’t think that it is easily achievable today with OH2 autodiscovery approach.

Yepp, correct.

Correct.

You can’t have both, unfortunately …

If your goal is to configure your things through HABmin (changing config parameters), you need to configure your things through a GUI (HABmin or PaperUI) and delete or comment out your things and items files.

I don’t know If there is another way to do some versioning through git via JsonDB (which then contains all your things, channels, item linking to channels). Maybe a quick search in the forum gives some answers.

When I upgraded from openHAB1 to openHAB2 my goal was also keeping my text files … I gave up pretty quickly :sunglasses:

Now I got it: if you just want to change the config of your devices once, this could be the way to go.
I was also thinking about that a while ago, but because parameters need to be changed several times on the long run I got used to the GUI config and now it is a lot easier than textual config.

I’ll do some research. But, based on what I’ve seen in that file, it is a pain to decipher what goes where (as far as seeing what has changed from version to vs version).

I’ll suffer a tad longer with the procedure above, which worked btw (thank you!), and if it gets too overwhelming, I’ll have to give up on that :man_shrugging:

Thanks again for your help!

why would you want to change your configs multiple times?

If there is the need to update for example my FGMS motion sensor blind time I don’t want to go through that procedure several times …

ah. makes sense.

btw, is there a way to use OSGI console to configure params of things?

There’s a lot you can do via OSGI
https://docs.openhab.org/developers/prerequisites/osgi.html#lifecycle
but I have no idea if you can change config parameters … I did not read anything about that yet …

perfect! thanks

Things added via the PaperUI/HABmin are stored in JSON format text files in the userdata/jsondb folder. These can then be easily backed up with whatever scheme you are using.

Thanks!

And if I were to re-install OH2 on another system and restore the jsondb, I’ll be back at my previous state?
If that is the case, what is the purpose of textual thing/item definition? backward compatibility?

Yes!

And yes again. Also many users coming from version 1.x are quite comfortable with the textual configuration files and so prefer this approach when defining a large number of things/items.

Excellent!

Thanks!

//Reviving this ancient thread for a 3.0 discussion (also related to [SOLVED] ZWave .things config parameters)

@chris, @sihui, @Kai - Is there an updated (for OH3.x) answer to:

How can one dynamically configure certain runtime properties of an unmanaged thing (defined in .things file)?

Historically the answer has been:

(paraphrasing):

  1. can’t be done,
  2. stop using static configuration, use autodiscovery (and backup Things.json if you need to retain state across installs) = can’t be done :slight_smile:

Has this been revisited for 3.x?

I claim it is worthwhile to reignite this discussion…
While it might seem to only benefit bindings like ZWave, which do update thing’s configuration on the fly, it seems to be a common pattern for lots of smart devices to store their own settings. It also makes sense to me that the user is not interested in explicly defining all of them (they’d rather let it be discovered). Plus, zwave itself is quite a major binding for OH and the current answer is quite a limitation.


Case and point - I store 100% of my hand-entered config in a git repo (and wipe/replace entire OH setup routinely). While I am keeping backups of Thing.json file… I am not considering it equivalent to static .thing configuration.
From my POV:

  • The latter (.thing file) is an imperative (and auditable) way of expressing the devices I want controlled (and consistent across 100% devices)
  • The former(JSON DB) can also be a full DB of things, but is much more - as it also contains dynamic configuration = is big in volume (machine generated) and volatile

Given OpenHab still claims it can be configured from text files… I believe we need to have an answer to “how to manage the manually-entered devices?”. Be it some ‘override’ specifiers in .thing files, shadow copies of the devices (with one way sync from .thing files) or separation of configuration into ‘static’ and ‘runtime’, or sth else.

OH3 with some of its breaking changes seems to be the right timing for that(?)… What do you think?
On the other hand… claiming hand-entered devices are 100% unmanaged… is highly unsatisfactory as a long-term answer IMHO.

Cheers,
Mateusz

[EDIT] Relevant GH issue: https://github.com/eclipse-archived/smarthome/issues/3484