Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessory with String value #184

Open
sderuiter opened this issue Feb 11, 2019 · 1 comment
Open

Accessory with String value #184

sderuiter opened this issue Feb 11, 2019 · 1 comment

Comments

@sderuiter
Copy link

sderuiter commented Feb 11, 2019

I'm trying to run a Python script (not the issue here), where the output should be fed as input for a Homekit accessory. However, there doesn't seem to be much 'room' to actually display things. Most of the characteristics seem to be float or int, with the value either displayed in an icon (temperature) or on the bottom of the button as a percentage.

Any hints on which accessory type has the best possibility to display arbitrary content (a short string, preferrably)?

@cdce8p
Copy link
Contributor

cdce8p commented Feb 12, 2019

The official HAP specification allow strings only for a few different characteristics, all related to the device information (e.g. Name, Model, Firmware). Although you could in theory use the Name, I would strongly advice against it.

In theory after you call set_value on the name char, you would need to call:

driver.update_advertisement()

or restart HAP-python. Otherwise the change would probably not be updated.

IMO HomeKit is not designed for want you're trying to do here and you might be better off looking elsewhere (e.g. Home-Assistant with the corresponding iOS App).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants