UserParam doesn't set or return values

Discussion in 'C-Bus Automation Controllers' started by pspeirs, Apr 18, 2019.

  1. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    129
    Likes Received:
    4
    Location:
    Sydney
    Hi All,

    I've created a user parameter under Objects called "testval" and assigned it as a floating point.

    My "Resident" script is as per below to run once a second however I get no logs written. If I comment out the GetUserParam statement, I get a log generated once a second.

    Code:
    local value = GetUserParam('Local', 'testval')
    log("Temp: ", value)
    
    Anyone tell me where I'm going wrong here, surely there isn't any external setting I need to configure.


    Cheers,
    Paul
     
    pspeirs, Apr 18, 2019
    #1
    1. Advertisements

  2. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    129
    Likes Received:
    4
    Location:
    Sydney
    Sorted, ust wish I can self delete my muppet questions.
     
    pspeirs, Apr 29, 2019
    #2
    1. Advertisements

  3. pspeirs

    Technomancer

    Joined:
    Jan 22, 2018
    Messages:
    1
    Likes Received:
    0
    How did you sort it?
     
    Technomancer, Apr 29, 2019
    #3
  4. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    129
    Likes Received:
    4
    Location:
    Sydney
    In my case, "Local" was actually "Local Network"

    So, for example

    SetCBusMeasurement('Local Network', 'energy', 0, tonumber(grid_currentpower * 1000), 38)
    SetUserParam('Local Network', 'energy_pv_load_direction', 2)
    SetCBusState(0, 56, 48, false)
    SetCBusState('Local Network', 'Lighting', 'D/S BATH EXHAUST', false)

    are all valid
     
    pspeirs, Apr 29, 2019
    #4
    Technomancer likes this.
    1. Advertisements

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.