iobroker-community-adapters / ioBroker.openknx

free KNX Adapter for ioBroker
GNU General Public License v3.0
31 stars 4 forks source link

How to set comment to 'GroupValue_Read' #87

Closed FMode closed 2 years ago

FMode commented 2 years ago

How to set comment to 'GroupValue_Read' in a iobroker script?

What I can see from the logs and source of main.js "c" seems to be removed so it sends a 4711 as GroupvalueWrite.

var schedule1;

schedule1 = schedule('*/15 * * * * *', async function () {
  setState('openknx.0.Heizungsystem_Rotex_Zennio_Interface.Energie_Verbrauch_Total', {val: 4711, ack: false, c: 'GroupValue_Read'});
});

Thank you

boellner commented 2 years ago

I can confirm this behaviour, the script is overwriting the comment. I have to change the interface...

boellner commented 2 years ago

problem is this line of code in sandbox.js

        // set as comment: from which script this state was set.
        if (!isBinary) {
            state.c = sandbox.name;
        }

I am adding null value write as interface to trigger group value read

boellner commented 2 years ago

it is part of master branch @FMode please test it will be part of 0.1.15 release then

FMode commented 2 years ago

sending string with "null" works with fbf5f691847726aa346f8cdffa9d20c3c6dd4ceb -> triggers Read

boellner commented 2 years ago

problem is, it is against the specs. I'm using now the q (quality) element with value 0x10. Please check if this is fine

FMode commented 2 years ago

0x10 also works

boellner commented 2 years ago

thanks for confirmation, I release the next version and announce it