PS:

While I figure out how to update the extensions on the xmpp.org site, the 
latest revisions can be found here:

http://htmlpreview.github.com/?https://github.com/joachimlindborg/XMPP-IoT/blob/master/sensor-data.html
http://htmlpreview.github.com/?https://github.com/joachimlindborg/XMPP-IoT/blob/master/sensor-network-Control.html

Links to all can also be found at the bottom of this page:
https://github.com/joachimlindborg/XMPP-IoT

Best regards,
Peter Waher


From: Peter Waher
Sent: den 14 januari 2014 11:38
To: standards@xmpp.org
Subject: RE: [Standards] XEP-323 vs XEP-325


Hello Joakim



Thank you for your mail. I'll try to respond to your question:



Hi,



I am working on testing out the new XEP's for Internet of Things and Sensor 
networks by mapping a Heat pump connected over serial into these XEP's in a 
embedded PC. I have already made some registers readable over

XEP-323 so that seems good, but why is there such a difference between reading 
out values and setting values?



Assuming that there is a desired room temperature would be read it would be 
something like:

...

  <numeric name='DesiredRoomTemperature' momentary='true' value='21.0'

unit='°C'/>

...



and to set would be (XEP-325):



...

<double name='DesiredRoomTemperature' value='22.0'/> ...





I can understand omitting unit and momentary but why not keeping the same 
tag-names (e.g. <numeric> or <double> in both)?



The reason here is because the control extension (XEP-0325) is more detailed 
when it comes to format and validation. For instance, it contains 3 numeric 
types: int, long and double. Handling integers is easier in control 
applications, but not suitable for all control parameters, as is the case in 
your example. The integer types are meant to be used for say simple analog 
outputs and the like. The sensor data extension (XEP-0323) is less interested 
in formats and validation, and uses only one element to convey all numeric 
field values. It also transmits meta data about the value not applicable in the 
control case.



I've been unable to update the site with the most recent versions of the 
extensions you mention. I've attached them instead. There are some minor 
changes documented in the revision histories of each one.



Best regards,

Peter Waher

Reply via email to