simont77 / fakegato-history

Module to emulate Elgato Eve history
MIT License
167 stars 15 forks source link

Fakegato fails with multiple plugins using different versions of fakegato #39

Open ebaauw opened 6 years ago

ebaauw commented 6 years ago

Would need to use the version in the names of homebridge.globalFakegatoTimer and homebridge.globalFakeGatoStorage to solve this.

simont77 commented 6 years ago

could you be more specific on the issue? In adding persistent storage we were careful not to break compatibility with older releases, but we may have missed something, for this reason at the end we decided to mark the latest update with a minor and not simply a patch release. Since fakegato is still pre-release it is supposed that always the latest version is used.

ebaauw commented 6 years ago

I had homebridge-hue with fakegato 4.0 and a clone of your weather station with fakegato 3.x in one homebridge instance. It wouldn’t load or create history for homebridge-hue, I think because the global timer was created by fakegato 3.x, which loaded first.

simont77 commented 6 years ago

I see. This may be due to the fact that for improving google drove stability we moved some part of the code. I think that a way to fix it would be to create a different timer for v4, but this would mean that you will have two timers. Also, if we follow this idea we may end up having a timer for each fakegato version in the future, which is against the idea of a global timer, and indeed may create other problems with google drive persistance. I think that the best solution is to ask plugin developer to update dependencies to v4. If one do not want persistance it should be as simple as updating packege.json, with no fix needed in the plugin code. My weather plugin is already updated on github. @NorthernMan54 @NebzHB what do you think?

NebzHB commented 6 years ago

Same, plugins need to update fakegato's version as it's backward compatible (if no storage parameter, there is no storage created), the timer became disablable with 0.4 too...

NorthernMan54 commented 6 years ago

Which plugin's haven't been updated? I know that I have yet to update mine.