Open flatsiedatsie opened 3 years ago
WebExtensions support similar functionality: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/externally_connectable
Interesting, thanks.
How do you feel about a shared variable store? Addons could purposefully share some things with each other in an indirect manner. Might be relatively easy to implement?
There’s nothing stopping you from doing that yourself. You could just put something in the data directory.
This would just be a more explicit, general-purpose solution. It adds to the whole add-on permission system I’d like to have eventually.
Also, some add-ons use location (latitude, longitude), and for each one I have to re-copy it into the add-on config. If it were saved as part of the localization config, then I presume add-ons could fetch that as shared info, with perhaps a check-box in the add-on config to override with a different lat/lon.
@kgiori We deliberately chose not to add that as a global setting for privacy reasons. We didn't automatically want to share location info with every add-on.
Here's a related comment/discussion: https://github.com/WebThingsIO/gateway/issues/2249#issuecomment-584768047
This is a bit speculative, but I'm running into some scenario's where I'd like some addons to work together, so that one addon can check if another addon exists (easy enough), and has done some things (harder), or could even provide some information on demand. For example:
network presence detection
andwifi hotspot
to then do a search on this separate network as well, and spot cameras there.Photo frame
could show the currently playinginternet radio
station, and perhaps even offer some play/pause buttons.I know the
macros
addon has thismacrozilla-variables
feature. Is there an official / prefered way for addons to maybe have a shared variable pool? I could hack something together, but I'm curious what the ideal/official way of handling this would be.