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

rename wgplugin_info #983

Open
ctr49 opened this issue Jan 14, 2020 · 1 comment
Open

rename wgplugin_info #983

ctr49 opened this issue Jan 14, 2020 · 1 comment

Comments

@ctr49
Copy link
Contributor

ctr49 commented Jan 14, 2020

wgplugin_info is a generic name for accessing internal values from Wiregate that are not on the bus.
However, technically it just fetches a json object and there is absolutely no reason why the plugin cannot be used for other data sources.
I.e. (by rewriting the invoked url) I wrote a node-red flow that serves global context data in the expected format for CV.

I would suggest to:

  1. rename wgplugin_info to something more generic, i.e. "external_info" or "json_info" (wgplugin_info could stay a deprecated aliases for some time)
  2. make the URL that CV uses to fetch the data configurable (defaulting to the current value if not configured)
  3. describe the expected format of the calls. i.e.
  • single "object is fetched from configured URL with "name" as request parameter
  • expected response is a single json object in the format {"requested_object_name":"value"}
  • return empty body in case of non-existent object or other errors
@ChristianMayer
Copy link
Member

@ctr49 can you be a bit more precise about how this Nore-RED connection does work in this case?
And also give a bit more information for the documentation so that it'll be more easy for others to use?

We are very close to the 0.12 release, so it's a good timeframe to do a widget renaming

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