-
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?
-
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.
-
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:
Code:
<Area Name="Laundry Room" UUID="35615" IntegrationID="194" OccupancyGroupAssignedToID="35617" SortOrder="46">
<DeviceGroups>
<DeviceGroup Name="Laundry Room Wall" SortOrder="0">
<Devices>
<Device Name="Device 001" UUID="27990" SerialNumber="12703247" IntegrationID="179" DeviceType="MOTION_SENSOR" GangPosition="0" SortOrder="0">
<Components>
<Component ComponentNumber="2" ComponentType="CCI">
<CCI UUID="27992">
<Notes />
</CCI>
</Component>
</Components>
</Device>
</Devices>
</DeviceGroup>
<DeviceGroup Name="Laundry Room Door" SortOrder="1">
<Devices />
</DeviceGroup>
</DeviceGroups>
<Scenes />
<ShadeGroups />
<Outputs>
<Output Name="Laundry" UUID="3706" IntegrationID="96" OutputType="INC" Wattage="0" SortOrder="1" />
</Outputs>
<Areas />
</Area>
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.
-
What is documented is contained in the protocol document, found here:
http://www.lutron.com/TechnicalDocum...ary/040249.pdf
-
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:
?GROUP,194,3
This returns:
~GROUP,194,3,3
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
~GROUP,194,3,4
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.
-
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.
-
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!
-
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.
-
Post Thanks / Like - 0 Thanks, 1 Likes