Why would one of my devices not show in 5500SHAC Objects

Discussion in 'C-Bus Automation Controllers' started by impact, Mar 17, 2019.

  1. impact

    impact

    Joined:
    Feb 10, 2008
    Messages:
    102
    Likes Received:
    9
    Slowly converting my logic all over to the SHAC... and I just noticed one of my devices is not listed in the objects when viewing in the SHAC Objects List...

    If I use the toolkit - and scan - I can see that I have a Temperature Sensor (5031TS) at address 150. I can see through the toolkit an obvious difference to other items - this temperature sensor has no Serial number... Firmware is ver 1.00.

    SO its scannable, and I can see it through tool kit - I can even read and display the temperature through my logic on a black . white mk II screen - been working well for years...

    However its not discoverable in SHAC - I tried to add the unit manually for address 150 - but it did not like that...

    So why is it not displaying in the object list - and more importantly how can I resolve it - so I can continue to read and display the temperature from this sensor ?
     

    Attached Files:

    impact, Mar 17, 2019
    #1
    1. Advertisements

  2. impact

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    114
    Likes Received:
    0
    Hi Impact, not sure I can help with the problem, but would be interested in the logic you use to display the temp on a B&W screen if you were able to share.

    Glen
     
    GlenF, Mar 17, 2019
    #2
    1. Advertisements

  3. impact

    impact

    Joined:
    Feb 10, 2008
    Messages:
    102
    Likes Received:
    9
    I love sharing and helping others... So here goes...

    It was about 5 or 6 years ago I did it - so I am just referring to my Piced code now - and look it was self experimentation, so maybe it was not done the right way - but it works.... I think... well it had for the last few years. I might use the wrong terminology here - but the pics will help you understand what I did....

    ON my main screen - I have a component (2 actually - but lets just look at one of them) - It has the text Lounge associated with it - and it displays the monitoring of the variable TempLiving - The picture is not live - so the variable is shown as a blank...

    Clicking on the Add/Edit of that monitor - you will see that TempLiving is on Unit 150 with a refresh rate of 60 seconds.

    Try that... I also have code that plays around with System.IO Variables - but that may be left over from my experimentation, as the code appears to be commented out - so I am guessing it is not needed. I may have just found a simpler way of doing it... If it does not work for you - I will look harder at the script and determine where / when its needed and let you know...


    But back to my questions - hoping for some helpful hints returned - LOL !
     

    Attached Files:

    impact, Mar 17, 2019
    #3
  4. impact

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,392
    Likes Received:
    35
    Location:
    Adelaide
    It's not clear how you're trying to do this or what you're expecting, so at the risk of telling you something you already know...

    The SHAC objects list can only auto-populate based on broadcast messages it receives.

    Some parameters like network voltage, light level, and temperature in older units, are not broadcast and need to be polled.

    In the C-Touch and PAC, you had to set up a monitor component to do this. In the SHAC, these are done using "Unit Parameters".

    When you add a Unit Parameter you have to configure the unit address, parameter type, and poll interval.

    Is this what you did that it didn't like?

    Nick
     
    NickD, Mar 17, 2019
    #4
  5. impact

    impact

    Joined:
    Feb 10, 2008
    Messages:
    102
    Likes Received:
    9
    That makes sense...

    I thought I did that - and it still didn't like it - but maybe I did not do polling ???? Will give it another try!!! Was just concerned that it was so old, no serial number, that maybe it was not compatible...

    Hopefully have time to try again today - and certainly will report back if I am still having problems!
     
    impact, Mar 17, 2019
    #5
  6. impact

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,392
    Likes Received:
    35
    Location:
    Adelaide
    I just checked it myself, and it does work, but I now recall that you need to restart the device for it to start polling it after you've added the new object. Also, don't forget to click the "Sync Project Data" button in the bottom right corner before you restart otherwise the newly added object will be lost (I've added bugs in our system for both of these issues).

    Nick
     
    NickD, Mar 18, 2019
    #6
  7. impact

    impact

    Joined:
    Feb 10, 2008
    Messages:
    102
    Likes Received:
    9
    Thanks Nick - Im self taught - and still learning... so don't worry about the risk of telling me something I don't know...

    Maybe I m getting Network / Groups mixed up and using the wrong function...

    On my toolkit - I see the sensor on 0/56/150 which of course means Lighting to me... I was trying to use the LUA function of... temp, units = GetCBusMeasurement(0, 150, 1) as that function looked like something that would get a temperature... Doh kind of made sense - I am after the temperature from this sensor...

    So I manually added the temperature sensor to the SHAC objects at 0/56/150 - as that's what I have used through toolkit.

    However, despite the online example and documentation for GetCBusMeasurement showing;
    -- Get temperature and units of channel 1 of sensor 1 on the local network
    -- temp is a float and units is a string (eg '°C')
    temp, units = GetCBusMeasurement('Local', 'sensor1', 1)

    The error log is showing that it is automatically putting in the 228 for Measurement and hence I get the error;
    Library cbuslogic:0: unable to find 0/228/56/150

    Make sense as the sensor is not on 228 - its on 56

    So I tried to define the sensor on 228 Measurement - then I get the error;
    Library cbuslogic:0: unable to decode for 0/228/150/1


    SO my theory is a temp sensor still beliongs on lighting... not to move it to measurement.... and dont use GetCBusMeasurement to read it....

    If you see this before I get to play again - please confirm I am right !!! and what fucntion I should be using to read the values from the sensor!!!

    LOL - Trying to do 7 things at once today.... Some more fun than others! Must stop playing!
     
    impact, Mar 18, 2019
    #7
  8. impact

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,392
    Likes Received:
    35
    Location:
    Adelaide
    Ok.

    The 5031TS was actually never originally designed to report the measured temperature... it was configured to switch a lighting group address on or off based on the temperature reading. Later on when there were devices that could actually do more (like touchscreens), people wanted to display the temperature, and the only way to get it from the 5031TS was to read it from RAM (yuck!). In PICED, this is what the Monitor component does.

    The newer temperature sensors broadcast their temperature on the measurement application, which is much simpler. With these, you would use the GetMeasurement function, but not with the 5031TS.

    So, the lighting group address you see in the 5031TS is the group address the temperature sensor is controlling... and not particularly useful in this case.

    In order to get the temperature you need to create a "Unit Parameter" object, which needs to know the *Unit* address of the device. In this, you configure the polling interval. You can then use the value from this in logic using the "get unit parameter.." functions.

    Nick
     
    NickD, Mar 18, 2019
    #8
  9. impact

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    114
    Likes Received:
    0
    Thanks Impact will try it out over the weekend
     
    GlenF, Mar 19, 2019
    #9
  10. impact

    impact

    Joined:
    Feb 10, 2008
    Messages:
    102
    Likes Received:
    9
    Thankyou Nick - been putting it off... frustration / procrastination... but thought Id give it a try...

    It was so easy - I just created the object as 0/255/150/1 gave it a polling time of 60 seconds... and waited....

    On the object list it appeared just below the standard other user parameters of Voltage and Utilisation... and after a little while - it populated the value column with 28.07 C - Voilla… half way there...

    Went to the script and used value = GetUnitParameter(0, 150, 1) which returned the value of 28.07421875 - All good again....

    And in case anyone wants help - this is how I populated the user variable, and truncated it to just 1 decimal place.....

    value = GetUnitParameter(0, 150, 1)
    SetUserParam(0, 5, 'Living Area Temperature: '..tonumber(string.format("%." ..(1).. "f", value))..'°C')


    I recall I used to do it this way on the BW screen until I found the other method... and had similar code commented out...

    Happy camper again - I can move on to porting the next function across from the BW Screen... But I wish I could get some guidance / best practice on my other big query on best way to scrape data and represent it... https://www.cbusforums.com/threads/lua-help-maybe-or-something-else.9474/

    Got any advice on that one!
     
    Last edited: Mar 23, 2019
    impact, Mar 23, 2019
    #10
  11. impact

    GlenF

    Joined:
    Jan 22, 2006
    Messages:
    114
    Likes Received:
    0
    Thanks for the advice Impact, all worked fine.
     
    GlenF, Mar 31, 2019
    #11
    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.