homebridge / verified

Plugins Verified by Homebridge
https://homebridge.io/w/Verified-Plugins
362 stars 16 forks source link

homebridge-nordpool-baltics #693

Closed msegzda closed 3 months ago

msegzda commented 4 months ago

Link To GitHub Repo

https://github.com/msegzda/homebridge-nordpool-baltics

Link To NPM Package

https://www.npmjs.com/package/homebridge-nordpool-baltics

Plugin Icon (Optional)

logo

github-actions[bot] commented 4 months ago

:white_check_mark: Pre-checks completed successfully.

github-actions[bot] commented 3 months ago


Comment /check to run checks again.

bwp91 commented 3 months ago

Hi @msegzda

question: in which directory does "file-system-cache": "^2.4.4", store its files?

msegzda commented 3 months ago

Thank you @bwp91 for reaching out. Plugin is using file-system-cache default setting which in the context of homebridge plugins stores its cache files within ~/.homebridge/.cache/ directory. Let me know if this does not comply with plugin requirements and needs changed.

bwp91 commented 3 months ago

I was looking at the docs (https://www.npmjs.com/package/file-system-cache) and it looks like you can specifically set a base path

const cache = Cache({
  basePath: "./.cache", // (optional) Path where cache files are stored (default).
  ns: "my-namespace",   // (optional) A grouping namespace for items.
  hash: "sha1"          // (optional) A hashing algorithm used within the cache key.
  ttl: 60               // (optional) A time-to-live (in secs) on how long an item remains cached.
});

I was thinking you could set this to the homebridge storage path just to be sure. You can get the user's storage path using this:

https://developers.homebridge.io/#/api/reference#apiuserstoragepath

msegzda commented 3 months ago

Done. This is now implemented on v1.2.2: https://github.com/msegzda/homebridge-nordpool-baltics/commit/6237f6010267b1f36ef7588ebdc6c623d90831fc

Will release shortly

On Mon, 25 Mar 2024 at 23:40, Ben @.***> wrote:

I was looking at the docs (https://www.npmjs.com/package/file-system-cache) and it looks like you can specifically set a base path

const cache = Cache({ basePath: "./.cache", // (optional) Path where cache files are stored (default). ns: "my-namespace", // (optional) A grouping namespace for items. hash: "sha1" // (optional) A hashing algorithm used within the cache key. ttl: 60 // (optional) A time-to-live (in secs) on how long an item remains cached.});

I was thinking you could set this to the homebridge storage path just to be sure. You can get the user's storage path using this:

https://developers.homebridge.io/#/api/reference#apiuserstoragepath

— Reply to this email directly, view it on GitHub https://github.com/homebridge/verified/issues/693#issuecomment-2018966858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA76OJMLUFBLPSW3BYIIGLY2CKWJAVCNFSM6AAAAABDGR2WDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYHE3DMOBVHA . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 3 months ago

Congratulations! Your plugin has been verified.

You can now add one of the Verified by Homebridge badges to your plugin's README:

verified-by-homebridge

[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

verified-by-homebridge

[![verified-by-homebridge](https://img.shields.io/badge/homebridge-verified-blueviolet?color=%23491F59&style=for-the-badge&logoColor=%23FFFFFF&logo=homebridge)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

Your plugin is now also eligible to display a :heart: Donate button on its tile in the Homebridge UI. See https://github.com/homebridge/homebridge/wiki/Donation-Links for instructions.

If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.

Don't forget to join the official Homebridge Discord server, where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!

Thank you for your contribution to the Homebridge Community. https://homebridge.io