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

Name of _persist.json file #46

Closed
ebaauw opened this issue Feb 28, 2018 · 3 comments
Closed

Name of _persist.json file #46

ebaauw opened this issue Feb 28, 2018 · 3 comments

Comments

@ebaauw
Copy link
Contributor

ebaauw commented Feb 28, 2018

I'm having some concerns on the fakegato-storage functionality, particularly the filenames used:

  • When using {storage: 'fs'} as option to FakeGatoHistory, it doesn't seem to make sense to use the hostname in the filename. Multiple instances of homebridge need to be run from a different user directory anyway, ensuring each instance logs to a different directory;
  • The accessory displayName is not guaranteed to be unique and might actually change over time. Also it might contain spaces. I'd rather see the accessory serial number in the filename. Still I would like to base the name of the history service on the accessory display name.

Arguably, not every-one might share my concerns. Both issues could be addressed by adding an additional filename option to the FakeGatoHistory, so each plugin can control their own behaviour.

@NorthernMan54
Copy link
Collaborator

NorthernMan54 commented Feb 28, 2018 via email

@ebaauw
Copy link
Contributor Author

ebaauw commented Mar 1, 2018

Thanks, Sean.

Do you know if we have access to the serial number as part of the object?

That would indeed be up to the plugin. We could use a convention that it should be in accessory.serialNumber, just like using accessory.displayName, but I think it's safer to just pass it as parameter.

I'm actually now storing the persist files in ~/.homebridge/accessories (or accessories in the user path). Seems to make sense to me, as homebridge stores the persisted accessories there as well, for V2 platform plugins.

@NorthernMan54
Copy link
Collaborator

NorthernMan54 commented Mar 1, 2018 via email

simont77 pushed a commit that referenced this issue Mar 1, 2018
* Issue #44 

* Issue #46
@simont77 simont77 closed this as completed Mar 1, 2018
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

3 participants