From: Lieven H. <li...@li...> - 2012-11-07 20:15:15
|
Hi Eloy, Op 7-nov.-2012, om 13:18 heeft Eloy Paris <pe...@ch...> het volgende geschreven: > Hi Lieven, > > On 11/07/2012 04:54 AM, Lieven Hollevoet wrote: > >> Hi, >> >> https://github.com/hollie/misterhouse/issues/10 >> >> According to me the change made the reception of xPL messages more restrictive (it prevents devices that have white spaces in their messages to work correctly), I don't see the point of that and I would like to revert that back to the original behavior. > I don't understand why this change was made, but I remember the short > discussion that resulted in the change. Take a look here to see if you > can figure out a way to fix this gentleman's issue without breaking xPL > for everybody else: > > http://tech.groups.yahoo.com/group/misterhouse/message/43779 > Thank for digging this up. As I expected indeed, the change was made for device/value pairs to support values that contain spaces. While digging further I found in the documentation of the xPL project (http://xplproject.org.uk/wiki/index.php?title=XPL_Specification_Document) the following rule: All structural elements of an xPL message, i.e. all header fields, schema class and type names, and the names of name/value pairs, must contain only the following characters: a-z, 0-9 and "-" (lower case letters, numbers and the hyphen/dash character -- ASCII 45 So there are two things I can conclude from this: * values should not have spaces in them, which is exactly what misterhouse is supporting by this change * there seems to be something wrong with my jeenode client because apparently it creates key/value pairs with a space at the end, causing the match in the subsequent perl code to fail. I'll fix that. Question is: do we want to support invalid xPL frames in Misterhouse? I have nothing against that if this helps people, but maybe it should not be the default way of working. We could add a setting through mh.private.ini to enable it? > Perhaps the "fix" is to not have devices with spaces in their names? Dunno. > Indeed, I don't have it (intentionally) in my installation, but I'll need to dig a bit further into that code to fix it. Kind regards, Lieven. |