Feature Requests

Posted on
Sun Oct 11, 2020 2:51 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Glad you were able to find a solution that worked for you.

Cheers!

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jun 20, 2021 4:18 am
davinci offline

Re: Feature Requests

I tried your plugin to substitute FantasticWeather. But I can't get any data. This is probably because my API uses OAuth 2.0:

https://developer.srgssr.ch/faq

Is there any way you can implement this?

Thank you

Posted on
Sun Jun 20, 2021 6:00 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

davinci wrote:
I tried your plugin to substitute FantasticWeather. But I can't get any data. This is probably because my API uses OAuth 2.0:

https://developer.srgssr.ch/faq

Is there any way you can implement this?

Thank you

I took a quick look at the API docs and it looks like that service should work with the existing plugin. Are you using the "Bearer" authentication type?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jun 20, 2021 7:16 am
davinci offline

Re: Feature Requests

Yes I tried, but it seems that I have to get the token first and it expires. Not sure how to automate this.

Posted on
Sun Jun 20, 2021 7:35 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

davinci wrote:
Yes I tried, but it seems that I have to get the token first and it expires. Not sure how to automate this.

Sorry, I should've been more clear. I should have asked if you were using the "Bearer" auth type instead of the "Token" auth type.

Have you tried the API with the Token auth type?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Jun 21, 2021 12:27 am
davinci offline

Re: Feature Requests

I do not have a token url.

I only have:
CONSUMER KEY
CONSUMER SECRET

Since I only have 50 request per day my testing capacities are limited. :mrgreen:

Posted on
Mon Jun 21, 2021 5:10 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Understood. I didn't write that particular authentication method into the plugin (it was added by @berkinet), but in looking over the code, the plugin asks for the token to be provided by the server and then submits the API call with "?access_token=XXXXXXX" to the end of the source URL. So if the token auth method within the plugin is going to work (it may not work), then the settings would be something like:

URL/Path: "https://URL that requests the actual data you want" (no quotes)

Method: Token
Token URL: "https://URL to obtain the authentication token from the server" (no quotes)
Password: CONSUMER KEY or CONSUMER SECRET

It may be that the token auth method won't work for your source. If that's the case--and if the authentication method your source uses is a universal one--we can see about getting it added to the plugin. :)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Jun 21, 2021 6:20 am
davinci offline

Re: Feature Requests

This actually works in Terminal:

Code: Select all
curl -X POST \
  'https://api.srgssr.ch/oauth/v1/accesstoken?grant_type=client_credentials' \
  -H 'Authorization: Basic <"KEY:SECRET"MANUALLY CONVERTED TO base64 >' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Length: 0' \
  -H 'Postman-Token: 24264e32-2de0-f1e3-f3f8-eab014bb6d76'

curl -X GET \
  'https://api.srgssr.ch/srf-meteo/colors' \
  -H 'Authorization: Bearer MANUALLY ADDED RECEIVED_TOKEN' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: 56128353-805e-4974-6689-5ef6d86e2d80'


The received token expires.

I don't know how to make it work with the plugin.

Posted on
Mon Jun 21, 2021 6:24 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Thanks -- that's going to be helpful in figuring this out. I have some IRL commitments today but will look at this asap and see whether this can be done/added to the plugin.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jun 22, 2021 12:24 am
davinci offline

Re: Feature Requests

Thanks, please let me know if I can help with testing. I have 50 tries today. :D

Posted on
Tue May 17, 2022 5:29 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: Feature Requests

I noticed that the 2022.0.1 version of GhostXML plugin writes to Indigo log every time a Ghost device is getting updated. I have several weather-related Ghost devices that update every 10 minutes, so this adds a lot of log entries.
I can easily suppress this code in the plugin (code line #1412), but I was wondering whether you could add a pref check box in the device config to suppress log entries for simple 'device updates'.

Posted on
Tue May 17, 2022 6:48 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

The quick fix would be to up the plugin logging to "Warning Messages" which would suppress device update messages. You might miss a few other standard messages, but with this plugin, "device updated" messages are the lion's share for sure.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest

cron