Howdy,
So this was incredibly helpful to diagnose and know what sort of data I could have available in my rules. Actually helped shed some light on some of the more subtle aspects of some complex vera/zwave devices.
I modified what you suggested a little bit. Instead of appending
// <xsl:value-of select="@value"/> //
I appended
/** SAMPLE=[<xsl:value-of select="@value"/>] **/
That solved 3 things for me :
- I could leave the sample values in the item file, allowing me to work my way through things and still have both the value and a working item.
- By putting the VALUE=[] stuff in, I could more easily see when a value had a space or other white space characters.
- The expression is unique enough that it will be pretty easy to write a sed script to strip those sample values off the items (if I decide to later)
Question though: When I install the items, pretty raw from the transformation (for testing), I get a lot of ‘NOT BOUND’ messages (I’m in trace mode). These are for devices that do have items defined. For example, this one is coming from a power meter:
2015-01-29 22:22:47.422 [DEBUG] [b.m.internal.MiosUnitConnector] - processResponse: success! loadTime=1422584506, dataVersion=584508144 devices(1) scenes(0) rooms(0) sections(0)
2015-01-29 22:22:47.422 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,device:71/id"}, value=71
2015-01-29 22:22:47.422 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,device:71/status"}, value=-1
2015-01-29 22:22:47.422 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,device:71/service/urn:micasaverde-com:serviceId:EnergyMetering1/KWHReading"}, value=1422588167
2015-01-29 22:22:47.423 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/LoadTime"}, value=2015-01-29T21:21:46
2015-01-29 22:22:47.423 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/DataVersion"}, value=584508144
2015-01-29 22:22:47.423 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/UserData_DataVersion"}, value=584506016
2015-01-29 22:22:47.423 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/TimeStamp"}, value=2015-01-29T22:22:47
2015-01-29 22:22:47.424 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/ZWaveStatus"}, value=1
2015-01-29 22:22:47.424 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/Mode"}, value=1
2015-01-29 22:22:47.424 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: NOT BOUND {mios="unit:nightmare,system:/LocalTime"}, value=2015-01-29 22:22:47 N
2015-01-29 22:22:47.424 [DEBUG] [b.m.internal.MiosUnitConnector] - run: URI Built was 'http://vera:3480/data_request?id=status2&LoadTime=1422584506&DataVersion=584508144&Timeout=40&MinimumDelay=0' loop '18'
and here is the related section of items:
/* Device - Panel 2 Master */
Number Panel2MasterId "ID [%d]" (GDevice) {mios="unit:nightmare,device:71/id"}
String Panel2MasterDeviceStatus "Panel 2 Master Device Status [%s]" (GDevice) {mios="unit:nightmare,device:71/status"}
String Panel2MasterDocumentation "Panel 2 Master FIXME Documentation [%s]" {mios="unit:nightmare,device:71/service/HaDevice1/Documentation"} /** SAMPLE=[http://wiki.mios.com/index.php/AeonHEM] **/
String Panel2MasterConfigured "Panel 2 Master FIXME Configured [%s]" {mios="unit:nightmare,device:71/service/HaDevice1/Configured"} /** SAMPLE=[1] **/
DateTime Panel2MasterLastUpdate "Panel 2 Master FIXME LastUpdate [%1$ta, %1$tm/%1$te %1$tR]" <calendar> {mios="unit:nightmare,device:71/service/HaDevice1/LastUpdate"} /** SAMPLE=[1420318140] **/
DateTime Panel2MasterFirstConfigured "Panel 2 Master FIXME FirstConfigured [%1$ta, %1$tm/%1$te %1$tR]" <calendar> {mios="unit:nightmare,device:71/service/HaDevice1/FirstConfigured"} /** SAMPLE=[1409487481] **/
String Panel2MasterKWH "Panel 2 Master FIXME KWH [%s]" {mios="unit:nightmare,device:71/service/EnergyMetering1/KWH"} /** SAMPLE=[3035.0210] **/
String Panel2MasterKWHReading "Panel 2 Master FIXME KWHReading [%s]" {mios="unit:nightmare,device:71/service/EnergyMetering1/KWHReading"} /** SAMPLE=[1422586817] **/
String Panel2MasterChildrenSameRoom "Panel 2 Master FIXME ChildrenSameRoom [%s]" {mios="unit:nightmare,device:71/service/HaDevice1/ChildrenSameRoom"} /** SAMPLE=[1] **/
Number Panel2MasterWatts "Panel 2 Master FIXME Watts [%d]" {mios="unit:nightmare,device:71/service/EnergyMetering1/Watts"} /** SAMPLE=[383] **/
String Panel2MasterLog "Panel 2 Master FIXME Log [%s]" {mios="unit:nightmare,device:71/service/EnergyMetering1/Log"} /** SAMPLE=[383,747,1220,1422586816,1817] **/
String Panel2MasterActualUsage "Panel 2 Master FIXME ActualUsage [%s]" {mios="unit:nightmare,device:71/service/EnergyMetering1/ActualUsage"} /** SAMPLE=[1] **/
Number Panel2MasterCommFailure "Panel 2 Master FIXME CommFailure [%d]" {mios="unit:nightmare,device:71/service/HaDevice1/CommFailure"} /** SAMPLE=[0] **/
String Panel2MasterCommFailureTime "Panel 2 Master FIXME CommFailureTime [%s]" {mios="unit:nightmare,device:71/service/HaDevice1/CommFailureTime"} /** SAMPLE=[0] **/
String Panel2MasterCurrentLevel "Panel 2 Master FIXME CurrentLevel [%s]" {mios="unit:nightmare,device:71/service/urn:micasaverde-com:serviceId:GenericSensor1/CurrentLevel"} /** SAMPLE=[721] **/
Switch Panel2MasterStatus "Panel 2 Master FIXME Status" {mios="unit:nightmare,device:71/service/SwitchPower1/Status"} /** SAMPLE=[1] **/
What does the NOT BOUND trace messages mean? Is there a problem where OH/MiOS is not connecting the Item definition with data coming from Vera?
Thanks!
Gerry
P.S. And yes, my ‘house’ is ‘nightmare’ for reasons involving a bad joke and property location