Yes, but this is most definitely not the case. I think this is a kind of special use case. We can discuss if it was an option to expose any configuration parameter as a channel by ticking a box in the UI or something. But this would cause a load of work to implement and may collide with the current code base of the z-wave binding.
Due to the complex nature of wanting to change thing configuration, a use will most likely use rules anyway, so still implementing a rule action for changing the configuration would be the easiest.
I will post at least a Procedure type function in the next week to come up with some examples.
Sorry for the confusion. In my opinion, my special use-case of changing the dimming speed of a Fibaro Dimmer 2 is not interesting enough for the rest of the world to configure it as a channel for everyone.
This is the followup about how I solved it using rules.
As mentioned above, changing a thing’s config using the openHAB /things endpoint works like a charm. So that’s what I’ll do and thoroughly test now. See my real life example:
rules
rule "Work: Slow down Dimmer when adapting level"
when Item work_lights changed to 0
or Item work_lights changed from 0
then
var Number new_value
if(work_lights.state > 0){
logWarn("work.dimmer.adapter", "Dimmer level adaption. Setting to slow steps.")
new_value = 100
}
else
{
logWarn("work.dimmer.adapter", "Dimmer off. Setting to fast steps.")
new_value = 2
}
val String json = '{"config_6_2": ' + new_value + '}'
logWarn("work.dimmer.adapter", json)
sendHttpPutRequest("http://openhab:8080/rest/things/zwave:device:bridge:node18/config", "application/json", json)
end
This works well with the Fibaro Dimmer 2 FGD212. I just hope they save the settings in a flash memory and not an EEPROM which can only handle a few hundret writes. I’ll report back here if this breaks prematurely.
I’ll also let you hear from any new findings and problems - if any. Until then, I am open to any questions regarding this and wish you guys a nice day!
This is correct. Just like when editing a Thing using the PaperUI or any other UI, as you and @luckymallari pointed out correctly, openHAB will deny changing the unmanaged thing and answer with an HTTP 409 “Conflict” error:
{
"error": {
"message": "Cannot update Thing zwave:device:bridge:node18 as it is not editable.",
"http-code": 409
}
}
If we use a PUT to send configuration parameters, which works fine, how do we delete those parameters? Sending fields blank does not remove them, and it errors.
If I send 1111 to a code, how would I remove 1111 from the REST API