I don't know if it's a copy & paste issue but I see a discrepancy between:
<ns:properties>
<ns:propertyName>deviceID</ns:propertyName>
<ns:propertyValue></ns:propertyValue>
</ns:properties>
and your XPath expression:
bs:Properties[bs:PropertyName='deviceID']/bs:PropertyValue
The case of the element names don't match.
alex
