[velux] New OpenHAB2 binding - feedback welcome!

Hi,

yes, of course - as of my initial post in events.log:

2020-01-24 15:51:33.625 [ome.event.ItemCommandEvent] - Item 'VELUX_Office' received command DOWN
2020-01-24 15:51:33.631 [nt.ItemStatePredictedEvent] - VELUX_Office predicted to become NULL

… that’s (unfortunately) it. Nothing “faulty” to be found in openhab.log at all.

Sorry must have missed you previous log.

Thats odd… Your items receives the command fine, but it doesnt send it to the Velux binding… Its like there is a communication issue with the KLF200. (I know you said other things works fine).

When you added the new binindg, did you clear cache/tmp and restarted OH ?

Yes, it seems that way. I also thought the same, but I can read data from it (to be seen in my screenshot).

In my latest approach I removed the “old” .jar, renamed the old textual configs to e.g. .items-OLD (so that they’re not loaded), service-restarted OH, put in the “new” .jar, nano-ed the new textual configs and rebooted again.

The connection is successul (shortened) but I cant get anything moving;

2020-01-24 15:48:43.276 [INFO ] [.internal.handler.VeluxBridgeHandler] - Found velux actuators:
[...]
Product "Office" / SLIDER_SHUTTER (bridgeIndex=3,serial=56:32:14:26:0F:0C:00:B1,position=0000)
[...]
2020-01-24 15:48:43.788 [INFO ] [.internal.handler.VeluxBridgeHandler] - velux Bridge is online with 0 scenes and 6 actuators, now.

Could you elaborate what you mean with clearing cache/tmp?

Last thing that comes to my mind: is there a chance to clear OHs’ internal db to actually force it to reload everything from scratch?

to become NULL” Is this correct? Sorry, I don’t know, because I’ve disabled the “predicted to become messages…”

Yes, according to log - but it can’t be correct, because that would imply that there’s actually no target-state (like for dimmers, etc.).

Search for clear cache here on the forum.
In short - Go into your OH setup using SSH (Putty etc).
Login
Use this command:
sudo openhab-cli clean-cache (enter)
Press Y on the promt.

Restart your OH afterwards.

That would be, “clear cache and tmp” :wink:

1 Like

Thanks for clarifying, wasn’t sure if you meant OHs’ or JVMs’ cache - will try that and keep you updated. Thanks for your time!

EDIT: nothing changed - same behavior.

1 Like

it should be:

VELUX_Office -> velux:klf200:home:VELUX_Office:position

@csi_oh

So, your item should be:

Rollershutter VELUX_Office "Büro Velux [%d]" { channel="velux:klf200:home:VELUX_Office:position" }

.
.
{ channel=“velux:klf200:home:VELUX_Office:position” }

Sorry that I didn’t recognize it earlier! :man_with_probing_cane:

2 Likes

Nice spottet. I didnt noticed that either :frowning: Hopefully it will fix it for him.

2 Likes

Hi @Celaeno1 & @Kim_Andersen!

That did the trick, but the trick was weirder than you think.

The final item definition is not:

velux:klf200:home:VELUX_Office:position

but:

velux:rollershutter:home:VELUX_Office:position

Many, many thanks :smiley: :smiley: :smiley:!

2 Likes

@Kim_Andersen and more.
I have installed Velux blinds mounted inside. If the “Silent” option in KLF 200 settings is ON, they move much slower and is therefore less noisy. So at least for some new products it is actually working.
I have not tried it with the binding. When not referrred it seems to use the KLF 200 setting.

Hmm… Silent mode OFF? That sounds odd :smiley:
I will look at it later. I have a feeling its on in my KLF.

Sorry, it is of course ON. I have now fixed my post.

1 Like

@funcat

Hello Fabien,

sorry, I hadn’t time for testing “MY/favorite”.

To shorten my research time. How should that be set up correctly (officially)? (KLF 200, Things, Items, Rules?)
And what workaround do you have?

Thanks a lot!

Hi Alex,
For somfy devices there is (almost) always an additionnal button 'MY’on physical remote which store a custom position. Simply long press on it, and the roller shutter will remember the position; later, press it and it will go to that position. Perfect to have a ‘sunny’ or ‘raining’ position for rollershutter for example.
This is for somfy device.
For KLF200, it handles it correctly (you can set manys scenes with all ‘my’ positions), but with a special workaround : when the device is at position ‘my’, the KLF200 indicate ‘108%’ (instead of 0%-100%)
This is for KLF200 device.
The problem is now with the KLF API part : when returning position, it returns (obviously) ‘108%’ but the API doesn’t like it (not in 0-100 range) and indicates a special code ‘not in range’ in the field ‘position’ in API message (instead of the real position).

Workaround :
#1 : do not use ‘my’ position on device, as the KLF/API does not update this position correctly -> not a good idea because this is very usefull (my wife use it all the time, and my wife is always right…)
#2 : put a filter on KLF binding logs to ignore all error/warnings -> bad idea because some logs are usefull, and anyway the FLK still does not update good position
#3 : hack in the code (but i have no access), just add a simply hack that tell the API to use filed ‘target’ (which seems to be correct) instead of field ‘position’ for somfy devices.

If you want to test it :

  1. set ‘my’ position on somfy device
  2. get the device on that position
  3. wait for binding refresh with full of warning logs (every minute)
  4. the position inside OH will never be updated while the device stays in this position

I can give more details if needed.

Thanks =)

Ok. Thanks for your detailed explanation. :slight_smile: I’ll try out and will give feedback.

@funcat

Hello Fabien,

I don’t have any scenes programed in KLF200. But I have programed a “MY” position by pressing 5 seconds on “MY” button. As long as you do not have scenes, there are no errors in log after pressing the “MY” button on remote control.

I get the correct position (24 %) in log.

20:44:23.457 [INFO ] [smarthome.event.ItemStateChangedEvent] - RolloEsszimmer changed from 100 to 24

If I will need such scenes like sunny or rainy I would programe this by rules in Openhab.

Most of the time I tell Alexa the needed percentage.

Very strange, i’d retry now with 2 rollershutters : 1 in any position, 1 other on ‘my’.
Still getting spam with error and no updates from ‘my’ and work nice with other.

2020-02-05 21:10:13.670 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:11:13.691 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:12:17.775 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:13:13.726 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:14:14.249 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:15:14.773 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:16:18.364 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.
2020-02-05 21:17:13.809 [INFO ] [.internal.handler.VeluxBridgeHandler] - handleCommandScheduled(velux:actuator:home:klf200_bureau:position,REFRESH): updating of item velux:actuator:home:klf200_bureau:position (type velux:actuator/position) failed.

What version of binding/OH/KLF200 do you use? Over TCP/SLIP ?

Thanks

Im on Windows 10, 64 bit, snapshot 2.5.2 build #36, Velux binding 2.5.1.202001051139 and SLIP protocol. No THINGS file. No scenes in KLF20O, Firmware: 0.2.0.0.71.0
No channels/items linked for Velux bridge.

Not easy to compare with your setup : i’m on linux, OH 2.4 stable, with thing file and bridge, and items file …
But i dont know why a file setup of binding would generate this bug.
I think perhaps my somfy oxymo devices are pretty old ? (7 years …)