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 - #7 by chris)

@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: Introduce a differentiation between handler and device configuration Ā· Issue #3484 Ā· eclipse-archived/smarthome Ā· GitHub