Org.knx write a single KNX address by means of HomeyScript

Hi,
I want to write one bit (0/1) to a single KNX address (…/…/…) to use in an interface with a heating/cooling installation. I read in the readme documentation of the KNX app in Homey that this must be implemented a couple of months ago. I keep circling around the solution to use the knx.send ( address, value) function but I get back from Homey that this function does not exist. Can somebody help me by pointing me in the good direction how to use the right HomeyScript to write to a KNX singe address.

This is what I try to get working (but does not work) now:

const knxApp = await Homey.apps.getApp({ id: 'org.knx' });
if (knxApp && knxApp.enabled) {
    // Use the KNX app's function to send a message
    await knxApp.send({
        address: '1/1/1', // KNX group address
        value: 1           // Example value to send (e.g., turning a light ON)
    });
    console.log('KNX message sent');
} else {
    console.log('KNX app is not available or enabled.');
}

Thanks.

The README says that sending telegrams from flows got implemented:

image

Thanks! I was totally focussed on putting this in script but I can actually use this block in my flows.

Hi!
I just found out that this sending telegram was implemented and I am trying to get it to work. But I cant seem to figure out the correct format for my value. My goal is to send a timestamp to the knx-bus every night at 3 o’clock to keep my watches in sync. So the Data Type is DPT10.001 but what should the value be? Should it be written as byte-values? bit-values? some specific string-format? Have tried to send “030000” but then watch is just set to 00:00 so it is receving something but I expect the value/format to be incorrect… Any suggestions?

Hi, for me worked 13:45:50 format HH:MM:SS in Value field. To get actual time I used variable from time and date and after that wrote :01 - to complete the format with :SS
image

Furthermore if you set flow to run at specific time once a month, week or day you know exactly time of running the script. So you can manually type in value. For example if your flow will run daily at 3:00 AM, set the value to 03:00:00.

Great, that worked! I thought I had tested all the obvious formats but apparently not :slight_smile: Thanks for the reply!