minor issue

Posted on
Thu Dec 08, 2016 2:08 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

minor issue

homebridge-indigo does not like the slash (/) character in device names. The json parser throws a SyntaxError and the device or action is ignored. This is a minor problem and appears to be due to parser limitations that require a "/" to be escaped as "\\/" I'm not sure this is even worth fixing, but it is probably worth documenting.

Thanks for your work on this interface.

Posted on
Thu Dec 08, 2016 2:17 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: minor issue

It also has a problem if your first character is a space. I've just ignored it because it's not a big deal, but since the topic came up of "things not to call your HB devices..." :o .

Berkinet, you can use an alias or wrapper in HBB to work around that.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Dec 08, 2016 3:00 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: minor issue

Colorado4Wheeler wrote:
...you can use an alias or wrapper in HBB to work around that.

Or, you can just change the device/action names :wink:

Posted on
Thu Dec 08, 2016 3:23 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: minor issue

Yes, but sometimes I want that odd name in Indigo... :wink:

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Dec 08, 2016 4:28 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: minor issue

berkinet wrote:
homebridge-indigo does not like the slash (/) character in device names.


How does Siri recognize a device name with a slash in it?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Dec 08, 2016 4:43 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: minor issue

jay (support) wrote:
...How does Siri recognize a device name with a slash in it?

That's a question that, like "Do I look fat to you?" should never be answered.

However, "siri" (actually "voice to text") does understand several punctuation characters: newline, period, comma, question mark, etc., AND sometimes even "slash" In my testing "she" got the slash right about 1/2 the time. Things like a-slash-b seemed to work fairly frequently and anyway, the "/" might, in some cases, be useful in the GUI.

In this case, it is clear that the first problem was the json parser. However, it is a moot point since the "/" is not allowed in Accessory names anyway:
From https://developer.apple.com/library/con ... abase.html

    Rules for Naming Objects

    The names of HomeKit objects—such as home, room, and zone objects—are recognized by Siri where indicated in this document. The following rules apply to setting names of HomeKit objects:

      Names must be unique within their namespace.
      The names of homes belonging to a user are in one namespace.
      A home object and its containing objects are in another namespace.
      A name can contain only alphanumeric, space, and apostrophe characters.
      A name must start and end with an alphabetic or numeric character.
      Space and apostrophe characters are ignored in comparisons (for example, home1 and home 1 are the same).
      A name is not case-sensitive.

Posted on
Thu Dec 08, 2016 7:17 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: minor issue

berkinet wrote:
it is a moot point since the "/" is not allowed in Accessory names anyway


While not specifically because it's disallowed, that was my point in practice... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests