node-red-contrib-ccu icon indicating copy to clipboard operation
node-red-contrib-ccu copied to clipboard

HmIP-BBL datapoint LEVEL_2 cannot be set

Open 36grad opened this issue 3 years ago • 2 comments

Hi, I have a few HmIP-BBL (for blinds with slats). There are two datapoints, LEVEL which sets the height of the blinds, and LEVEL_2 which sets the position of the slats. Unfortunately, the latter cannot be set.

While reading the slat position datapoint LEVEL_2 using the get value node works without problems, setting a new value does not result in any actions. Interestingly, the datapoint COMBINED_PARAMETER which lets you set LEVEL and LEVEL_2 simoultaneously, works without problems and can be used to set the slat position.

It appears to me that the set LEVEL_2 command is somehow not forwarded to the CCU.

Node-RED version: 1.3.5 node-red-contrib-ccu version: 3.4.2

36grad avatar Jun 14 '21 09:06 36grad

Hello, I'm having the same problem (with HmIP-FBL), did you find a solution in the meantime?

I think the reason behind it is that the actor only does something when you set LEVEL_2 and LEVEL (or LEVEL_2 and STOP) right after each other. When you run a Homematic script you also need to set both, setting only LEVEL_2 doesn't work. See https://www.flurweg.net/hmip-fbl/

Since I couldn't figure out how to set two values right after each other with the ccu-value node (tried it with delay node etc. but it didn't work), I ended up using a function and ccu-script node. The function node produces a Homematic script like this:

let device = env.get('CHANNEL').split(':4')[0];
let {level, slat} = msg;
let script;

if (level == undefined) {
    script = `
        dom.GetObject("HmIP-RF.${device}:4.LEVEL_2").State(${slat});
        dom.GetObject("HmIP-RF.${device}:4.STOP").State(true);
    `;
} else {
    script = `
        dom.GetObject("HmIP-RF.${device}:4.LEVEL_2").State(${slat});
        dom.GetObject("HmIP-RF.${device}:4.LEVEL").State(${level});
    `;
}

msg.payload = script;
return msg;

It works for one actor but if I want to set multiple actors at the same time (e.g. when controlling the blinds according to the sun position) it unfortunately doesn't work reliably. Seems like the scripts fire too fast and some delay is needed, but I haven't found a good solution yet.

How does COMBINED_PARAMETER work, can you provide an example of how the payload needs to look like? Thanks.

jschroeter avatar Mar 26 '22 19:03 jschroeter

...figured it out, thanks for the hint about COMBINED_PARAMETER, this is way nicer as my script. When creating a program in CCU3 it actually shows how the COMBINED_PARAMETER works (it's called "Kanalaktion"): ccu3-combined-parameter

In short: when you want to adjust the slat position (LEVEL_2), don't try to set it directly with the ccu-value node. Instead set the COMBINED_PARAMETER datapoint. Some examples for values: L2=0,L=0: opens the blinds L2=100,L=100: closes the blinds L2=50,L=50: sets height and slat to 50% L2=50: sets slat to 50% but leave height unchanged (according to the CCU WebUI it should be L2=50,L=101 but this didn't work for me)

I think this is actually not a bug in node-red-contrib-ccu since as far as I can see it doesn't contain any actor specific code. It's "just" a very unfortunate and intransparent behaviour of the actor which is badly communicated/documented by eQ-3.

jschroeter avatar Mar 26 '22 19:03 jschroeter