Thanks Thanks:  0
Likes Likes:  1
Results 1 to 8 of 8

Thread: Querying Occupancy Sensor (LRF2-OC) and Remote Temp Sensor (LRF2-TWRB)

  1. #1
    Junior Member
    Join Date
    Aug 2014

    Querying Occupancy Sensor (LRF2-OC) and Remote Temp Sensor (LRF2-TWRB)

    Is there any way to directly query a wireless temperature sensor for more information than just the battery state?

    The only listed query is ?device,integrationid,1,22

    My devices ID is 24, so I will use that in my examples

    This returns a result different from what is listed in the protocol guide. The protocol guide says that it will return either a 1 or a 2 for the battery state (example ~DEVICE,24,1,22,2)

    This is what that query returns on my temp sensor.
    ~DEVICE,24,1,22,0x00BEF1FA,1,1,11/01/2016 20:00:02

    The values returned include the date a hex number and other additional data. What are these fields?

    Is there a way to query the LRF2 occupancy sensor for occupied/unoccupied status, or do you just have to wait for the device to spit out when it goes from state to state?

  2. #2
    Junior Member
    Join Date
    Aug 2014
    I was able to figure out the LRF2-OC ?group query. How, where does this number get assigned? I had to watch the GNET/232 output to find out what it was.

  3. #3
    Senior Member
    Join Date
    Oct 2013
    If you query the repeater via HTTP you can get a dump of everything in it:

    http://[Repeater IP Address]/DbXmlInfo.xml

    I find it helpful to use wget to download data like that, otherwise it's a hassle in the browser.

    Once you have it downloaded it's helpful to use a text editor like Notepad++ and use the search-and-replace function to find occurrences of "><" and replace them with ">\r\n<". The text inside the "" quotes, of course. This will separate the XML elements line-by-line, making it much easier to read. The regular Windows Notepad program won't do that.

    Bear in mind that the format is not documented anywhere. I've asked and was told it isn't documented.

    There's a bunch of pieces that all 'knit together'. It can be a little challenging to figure it out. Not everything is grouped in a way that compares to physical layout.

    This is a snippet for a motion sensor:
    <Area Name="Laundry Room" UUID="35615" IntegrationID="194" OccupancyGroupAssignedToID="35617" SortOrder="46">
    <DeviceGroup Name="Laundry Room Wall" SortOrder="0">
    <Device Name="Device 001" UUID="27990" SerialNumber="12703247" IntegrationID="179" DeviceType="MOTION_SENSOR" GangPosition="0" SortOrder="0">
    <Component ComponentNumber="2" ComponentType="CCI">
    <CCI UUID="27992">
    <Notes />
    <DeviceGroup Name="Laundry Room Door" SortOrder="1">
    <Devices />
    <Scenes />
    <ShadeGroups />
    <Output Name="Laundry" UUID="3706" IntegrationID="96" OutputType="INC" Wattage="0" SortOrder="1" />
    <Areas />
    All of those numbers were assigned by the Lutron software as the project was created. There's no user control over their numbering. Nor do they show up anywhere a customer would likely ever see them.

  4. #4
    Senior Member
    Join Date
    Oct 2013
    What is documented is contained in the protocol document, found here:

  5. #5
    Senior Member
    Join Date
    Oct 2013
    I think what you'd need to do would be cross-reference the integration ID for the sensor against the area's integration ID. Then do a GROUP query.

    In my snippet about you'll note the sensor is ID 179. It's contained an Area with an ID of 194.

    When I telnet to the main repeater I can check against that area ID to determine occupancy state, as per page 8 in the rev S protocol documentation:


    This returns:


    Which is telling me ID 194, when sent a query, returned Occupied. If I wait until past the timeout of the sensor it'll return


    You'll also see that same response if you're monitoring the output and the timer does it's own thing.

    I'd wonder a little about how querying for state like that might have unintended consequences if a 3rd party system was also monitoring the repeater.

  6. #6
    Senior Member
    Join Date
    Oct 2013
    To follow up, you CAN find the area's integration ID in the RA2 software. Bring up the Integration Report. Pull down the Settings menu->Integration->IDs tab. Scroll down that list to see the name of the 'room' that has the sensor. There will be an integration ID for that room (aka zone). You can use that for the GROUP commands I mentioned previously.

    You don't have to use the DbXmlInfo.xml file, but it may be helpful for 'big picture' insights into how the project gets stitched together on the repeater itself. I've made use of it to search for the ID numbers when getting a better handle what's using them.

  7. #7
    wkearney99 - Apparently you don't know who Fiasco is... I don't know him personally, but I can tell you that there probably isn't anything you can teach him based off of some of his work I've seen. It's good to see him back!

  8. #8
    Senior Member
    Join Date
    Oct 2013
    Somebody asked, I figured an answer might help. If there's smarter folks in the room I'm glad to know. The more the merrier.

  9. Likes SDR-Mike liked this post

Similar Threads

  1. LRF2 Vacancy sensor & manual switch usage
    By MisterC in forum General Discussion - RA2
    Replies: 7
    Last Post: 04-07-2017, 07:38 PM
  2. occupancy sensor protocol
    By totesthouse in forum 3rd-party Integration - RA2
    Replies: 0
    Last Post: 06-01-2016, 04:02 PM
  3. Review Individual Temp Sensor Data?
    By schalliol in forum General Discussion - RA2
    Replies: 3
    Last Post: 02-25-2016, 05:02 PM
  4. Occupancy Sensor
    By texas doc in forum General Discussion - RA2
    Replies: 4
    Last Post: 05-18-2015, 09:16 PM
  5. Feature request - Pair remote temp sensor to Thermostat
    By Fiasco in forum General Discussion - RA2
    Replies: 2
    Last Post: 12-02-2014, 12:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts