ioBroker / ioBroker.rflink

Support of RFLink
MIT License
11 stars 11 forks source link

Somfy blind telis remote status not processed #35

Open evanes68 opened 4 years ago

evanes68 commented 4 years ago

When I "enable inclusion mode" on my rflink and then press a button on my telis remote I get the following structure of objects in iobroker:

channels channels.RTS_1 channels.RTS_1.BLIND_01 boolean blind channels.RTS_1.BLIND_STOP_01 boolean button

There are three buttons on my remote, up, down and stop. Pressing either three does update the state of the objects but the value of either is always "false".

The reason it is always false is because the logic in parse.js, line 13 says:

CMD: function (value) {
    if (value.indexOf('SET_LEVEL') !== -1) {
        return parseInt(value.split('=')[1], 10);
    } else {
        if (value[0] >= '0' && value[0] <= '9') return parseInt(value, 10);
        return value.indexOf('ON') !== -1;
    }
},

The remote sends CMD: UP, DOWN and STOP. There is never an ON thus false.

I would like to add extra logic there to distinguish between up, down and stop. But the question I have is why do we have two objects in iobroker for a remote. And why would the stop be of type button and the other be of type blind? And why is object blind of type boolean? what values can a blind have? Is that not up, down and stop?

I am happy to add some logic here but need some guidance.

Would it not be a simple solution to return a string value of UP, DOWN and STOP for the object channels.RTS_1.BLIND_01 and just ignore the other channels.RTS_1.BLIND_STOP_01 object?