VELUX Binding stop working

I have all rules in the DSL, so I prefer use same code for all.
I’m not so familiar with Blockly, but I will check

edit:
can’t find this
image

What openHAB Version are you running ?

4.1.1

Create a variable and name it veluxUID

thanks, I’m lost with blockly
also can’t find next instructions :
image
I see this:

Ok, my mistake. The additional thing blocks have been added recently, so are not available in your version.
Sorry …

so back to my instruction :
sendHttpPutRequest("http://localhost:8080/rest/things/velux:klf200:192_168_1_55/enable", "text/plain", "false", headers, 1000)

what’s wrong ?
I think it was working with OH3 but doesn’t work with OH4

The rule post that I linked did not show my complete rule In DSL.

My rule file starts as follows:


var Timer VeluxEnableTimer = null
val headers = newHashMap("Authorization" -> "Bearer myOHAPIRESTToken", "WWW-Authenticate"-> "Basic")

rule "Velux KLF200 changed to OFFLINE"
        when
                Thing "velux:klf200:meterkast" changed
        then
                Etc.etc.etc.
end

The key in the above rule is the “val headers” that you define and the “token” inside (in above example “myOHAPIRESTToken”). Please refer to create an API token. I don’t remember from the top of my head if you need to separately enable REST API access.

In my case a reset every three months or even less frequent does not pose very “problematic” to me. I’ve read someone placed his KLF200 elsewhere, closer to the devices and that seemed to help.

On the other hand, as the Velux KLF200 is specifically for devices with io protocol and can also be used for Somfy devices with io protocol, you could think the other way around and use a Somfy Connexoon, Tahoma or connectivity gateway. I’ve read that the new Tahoma also has a local developer mode so you don’t need the Somfy cloud, but overall I’ve read more problematic reviews about the Somfy gateways due to using the cloud than problems using the KLF200.