indigodomo / HomeKit-Bridge

Enabled HomeKit integration via Homebridge for Indigo Home Automation
The Unlicense
46 stars 13 forks source link

Very, very minor issue: iOS Home App uses smart quotes vs. normal quotes in Indigo #42

Open ZachBenz opened 6 years ago

ZachBenz commented 6 years ago

To reproduce:

  1. In the Home App on iOS, create a new room named something like "John's Room"
  2. In Indigo, include a device in a HomeKit Bridge Accessory Server, giving it a HomeKit Name of "John's Room Lights"
  3. Back in the Home App on iOS, note that when selecting the device and setting it to "John's Room", instead of being called "Lights", it will be called "John's Room Lights". That is, Apple's Home App is trying to do an exact string match on the room name to check for it as a prefix in the device name. The Home App uses smart quotes, but the HomeKit Name given in Indigo doesn't by default.
Colorado4Wheeler commented 6 years ago

I don't think I understand what you are trying to do. It's not "called" John's Room Lights, but it looks that way because Home will put the room name above the device name. Just like when I imported my furnace it was "admin furnace" until I moved it to the utility closet and it became "utility furnace" but it's still just "furnace". You can verify that by trying something like Elgato Eve.

The other part of Home using smart quotes, what is that a quote that went to grad school? ;)

ZachBenz commented 6 years ago

Try my steps to reproduce, and you'll see what I mean - the Home App tries to be helpful by automatically removing the prefix of the device name if it matches (exactly) the room name you've selected for the device in the Home app. Like I said, extremely minor issue.

Smart quote: The opening and closing quote characters are different

Normal quote: The same character is used for both the beginning and ending quote characters

(it's different Unicode code points - i.e. different characters). Can't speak for it's educational background :-) I can say it is amazingly annoying when coding... especially if macOS->System Preferences->Keyboard->Text->"Use smart quotes and dashes" is checked and you use something like TextEdit in the process of copy-pasting something.

Anyway, screenshot from the Home App:

image-1

Note the subtle difference in the appearance of the quote symbol in John's Room (room name vs. device name). As a result, Home app doesn't magically remove the John's Room prefix like this:

image-1 2

Colorado4Wheeler commented 6 years ago

I’m not really sure what I can do to fix that, I can’t change how HomeKit renames things and the only role the plugin plays in this is that it needs to normalize the text when it’s shot over to HomeKit so that JSON doesn’t error out. Is there something you have in mind that you think could be changed to rectify this?

On Mar 4, 2018, at 1:29 PM, ZachBenz notifications@github.com wrote:

Try my steps to reproduce, and you'll see what I mean - the Home App tries to be helpful by automatically removing the prefix of the device name if it matches (exactly) the room name you've selected for the device in the Home app. Like I said, extremely minor issue.

Smart quote: The opening and closing quote characters are different

Normal quote: The same character is used for both the beginning and ending quote characters

(it's different Unicode code points - i.e. different characters). Can't speak for it's educational background :-) I can say it is amazingly annoying when coding... especially if macOS->System Preferences->Keyboard->Text->"Use smart quotes and dashes" is checked and you use something like TextEdit in the process of copy-pasting something.

Anyway, screenshot from the Home App:

https://user-images.githubusercontent.com/6591642/36950177-6b21821a-1faf-11e8-9bec-5043ad23e5db.png Note the subtle difference in the appearance of the quote symbol in John's Room (room name vs. device name). As a result, Home app doesn't magically remove the John's Room prefix like this:

https://user-images.githubusercontent.com/6591642/36950217-20ee6ffe-1fb0-11e8-8f7e-dd6697369fbf.png — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Colorado4Wheeler/HomeKit-Bridge/issues/42#issuecomment-370261253, or mute the thread https://github.com/notifications/unsubscribe-auth/ATYzqQBeSnSD110oP7EhpCdF85IcakLbks5tbE7GgaJpZM4Sbdtb.

ZachBenz commented 6 years ago

Me either, but figured I would note it in case it comes up for anyone else. This would probably be best fixed by the Home App not doing such an exact match when it came to quote characters. Wouldn't bother me one bit if you marked it wontfix and closed it.

Colorado4Wheeler commented 6 years ago

I think we’ll let it stew for a bit and if a load of users start wanting to do something about it then I can try to look at trying to pass characters through so they match precisely with HK but only if there’s a high demand - far too many other things to do first and I suspect you might be in a small minority of users who would ever notice it or use that feature.

On Mar 4, 2018, at 1:44 PM, ZachBenz notifications@github.com wrote:

Me either, but figured I would note it in case it comes up for anyone else. This would probably be best fixed by the Home App not doing such an exact match when it came to quote characters. Wouldn't bother me one bit if you marked it wontfix and closed it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Colorado4Wheeler/HomeKit-Bridge/issues/42#issuecomment-370262324, or mute the thread https://github.com/notifications/unsubscribe-auth/ATYzqXR8JoJJTXcgoBu43_CB0ORr5a9xks5tbFIZgaJpZM4Sbdtb.