GetUnitParameter - Application is not supported

Discussion in 'C-Bus Automation Controllers' started by pspeirs, Apr 23, 2021.

  1. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Hi All,

    I have an Unit Parameter object assigned to a temperature sensor, and this always used to work up until about Dec last year. I don't recall if I made any changes, etc, but possibly I had readdressed the temp sensor or something. The value of the object is being regularly updated, so I know it's talking to the unit.

    The script attached to the object is below

    local value = GetUnitParameter(0, 3, 1)
    SetUserParam(0, 'bath_temperature_string', tonumber(string.format("%." ..(1).. "f", value))..' °C')


    I'm seeing an error message now saying the "Application is not supported".
    Can anyone advise as to where the issue is likely to be?

    Does GetUnitParameter go directly to the unit and request the value, or does it get the value from the Unit Parameter?



    Cheers,
    Paul
     
    pspeirs, Apr 23, 2021
    #1
  2. pspeirs

    philthedill

    Joined:
    Mar 21, 2010
    Messages:
    143
    Likes Received:
    4
    Location:
    Melbourne
    I think this function will give you cBus voltage and (S)NAC processor load only.
     
    philthedill, Apr 24, 2021
    #2
  3. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Hi,
    That command should be supported as it was working last year. Some of the previous posts also deal with grabbing the temp this way.

    regs
    Paul
     
    pspeirs, Apr 24, 2021
    #3
  4. pspeirs

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    251
    Likes Received:
    31
    Location:
    New Zealand
    i believe the lua function call GetUnitParameter(0, 3, 1) asks the unit parameter what the value is not the actual cbus device,
    you probably have unit parameter object already configured i assume?

    i think it works something like this... there may be a service or similar in the shac that polls the device if it has the unit parameter object configured every x seconds, as you can configure the polling interval in the unit parameter set up.

    There is a quirky thing i have run into before when using the unit parameter and light level sensors, they just stopped working/updating the current values. but after a reboot it worked fine. or after i deleted and re-made the unit parameters all worked again...

    seems weird that the error you get is "Application is not supported"
    what if you try

    local value = GetUnitParameter(0, 3, 1)
    log(value)

    Dose it still generate the same error?

    also relating to that error message, if i go to a unit parameter object in my project and click the set value icon, it displays exactly that error in the web ui etc
     
    Last edited: Apr 24, 2021
    Pie Boy, Apr 24, 2021
    #4
  5. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Yes, I suspected the call should just grab the value from Unit Params, otherwise I would not need to even set it up. It's the GetUnitParameter call that is generating the error, it's not an error in the logs, but a pop up dialog.

    Out of interest, I made the same call against the SHAC unit parameters and got the same error.
     
    pspeirs, Apr 25, 2021
    #5
  6. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Update: It seems that event scripts don't work with Unit Parameters which is weird as this had been set up for some time. Removing all script components from the script also causes it to error. No huge issue, just means I'll need to run a resident script to update the screen rather than doing it on parameter update.
     
    pspeirs, Apr 25, 2021
    #6
  7. pspeirs

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    251
    Likes Received:
    31
    Location:
    New Zealand
    What sort of device are you getting the temp from, could you use the measurement application? Then you could do event script on the measurement application object.
     
    Pie Boy, Apr 25, 2021
    #7
  8. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Nah, its the old style temperature sensor, it only allows switching a group on and off.
    All good
     
    pspeirs, May 6, 2021
    #8
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.