Trigger Event on eDLT Measurement Button Push

Discussion in 'C-Bus Automation Controllers' started by Ks04, Nov 7, 2023.

  1. Ks04

    Ks04

    Joined:
    Dec 28, 2019
    Messages:
    110
    Likes Received:
    9
    Hi There,

    I have an eDLT which shows the temperature and setpoint using the measurement application. The button presses for the measurement app on the eDLT don't appear to be able to trigger any actions - is there a way that these presses can be picked up by a script and then an action taken?

    The outcome I'm trying to achieve is to be able to adjust the setpoint via the eDLT so that I don't need an additional thermostat in each room.

    Thx,
     
    Ks04, Nov 7, 2023
    #1
  2. Ks04

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    249
    Likes Received:
    31
    Location:
    New Zealand
    I'm pretty sure (89%) that the measurement widget on the Edlt takes up one button and i believe its only status, the buttons don't do anything as you have described.

    I'm sure there is many ways to do this but this is how I approach it, working well for 8 zones for me (cut down version for one zone below, its easy to make one script do all zones and key word it if you have many zones...)

    I set the Edlt button to be a shutter relay (2 key) this gives you a specific value for up and down
    then i use a dummy GA for the above edlt shutter button then i have this event script which runs on dummy GA event

    I also store the set point value in a user param called 'lounge setpoint' or whatever then just add/subtract as required, i'm sure you could modify to get/set the setpoint from the measurement application instead of user param...

    local level = event.getvalue()
    local dst_ = string.split(event.dst, '/')

    if event.sender == 'cb' then -- evet came from cbus bus

    event_up = GetUserParam(0, 'lounge setpoint') -- get setpoint value from user param

    if level == 252 then -- nudge up

    if event_up <= 26 then -- cap the upper limit/s so cant go above 26°
    new_sp_val = event_up + 1 -- add to setpoint value
    SetUserParam(0, 'lounge setpoint', new_sp_val) -- store it back to the user param
    SetCBusUnicodeLabel(0, 56, tonumber(dst_[3]), 'English', 1, tostring(new_sp_val) .. '°c' ) -- write setpoint value to edlt
    end

    end

    if level == 2 then -- nudge down

    if event_up >= 16 then -- cap the lower limit/s so cant go below 16°
    new_sp_val = event_up - 1 -- subtract to setpoint value
    SetUserParam(0, 'lounge setpoint', new_sp_val) -- store it back to the user param
    SetCBusUnicodeLabel(0, 56, tonumber(dst_[3]), 'English', 1, tostring(new_sp_val) .. '°c' ) -- write setpoint value to edlt
    end
    end


    end
     
    Last edited: Nov 7, 2023
    Pie Boy, Nov 7, 2023
    #2
  3. Ks04

    Ks04

    Joined:
    Dec 28, 2019
    Messages:
    110
    Likes Received:
    9
    Thanks,

    I did contemplate the SetCBusUnicodeLabel approach, however my understanding is that labels are persisted in the eDLT memory which has a limited number of 'writes' available and may impact the lifetime of the switch, vs. the measurement application isn't persisted in the eDLT memory as it is constantly refreshing.

    Do you know if there's any truth to the above, or have you run into any issues with your implementation?
     
    Ks04, Nov 7, 2023
    #3
  4. Ks04

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    249
    Likes Received:
    31
    Location:
    New Zealand
    Yes that is correct, i do think i have read that somewhere, I'm unsure on the specifics as far as what happens to the switch if 'writes' limit is reached maybe someone else can comment further on this.

    I just thought id roll the dice and see how it goes, been solid for 7yr now, i guess it also only writes if the setpoint is adjusted, so if its not used frequently its not using up a huge amount of 'writes'

    To avoid using write Edlt labels, although it would take up 2 buttons (which is why iv opted to write labels) you could do one to display the setpoint value through the measurement app and one to adjust the setpoint down/up via script as above
     
    Pie Boy, Nov 7, 2023
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.