Jump to content

Unable to get API generated


Go to solution Solved by bpwwer,

Recommended Posts

I know I need a Professional Collections API key. I'm trying to get one but not having much luck.

I can get to https://openweathermap.org/price#weather which in turn leads me to https://home.openweathermap.org/ where I click on the Get API Key in the Free column. That click gets me to https://home.openweathermap.org/ (again), this time with a notice that I am already signed in and with nothing about Professional Collections that I can find.

I would very much like to use a Professional Collections API key if I could figure out how to get one.

Link to comment

If you're signed in, you should see something like this:

image.png.1f7a4f26f794cce0ec8bc511c2d28f89.png

Then going to "Billing plans" will show which plan(s) you're subscribed to and "API Keys" will let you generate keys for the plan(s) you're subscribed to.

Link to comment
  1. Create an account on openweathermap.org
  2. log in to the account you created.
  3. Go to "My Services" from your account menu
  4. Go to "Billing Plans"
  5.  Subscribe to a plan from the Professional Collections
  6. Go to "API Keys"
  7. Press the "Generate" button to generate a new API key

Once you generate the API key, it can take anywhere from 1 to 48 hours before that key is active and usable.  Once it has been activated by OpenWeatherMap, it can be used in the plug-in.

Link to comment

It appears that OpenWeatherMap made changes that broke the requests the plug-in was making to that API.  I've updated the plug-in to version 4.0 and changed it to use the OneCall 3.0 API instead of the Professional Collection API.

Link to comment

The "No Valid License" is from PG3. All plug-ins require a license to run, even free plug-ins.  So at some point you did get a license for plug-in.   Probably just a temporary outage when your PG3 tried to verify you had a valid license.

API keys from OpenWeatherMap can take as long as 48 hours to become active and work.

Link to comment

@Mike Carron You might need to refresh your login with the ISY Portal account/profile. The easiest way to do that is:

  • login to PG3 dashboard (https://eisy.local:3000 - replace eisy.local with polisy.local if using a Polisy)
  • go to System | Switch Portal Profile
  • then login (to the portal)
  • Screen will refresh back to Polyglot 
  • click the Logout button (polyglot web access - top right) 
  • Log back into PG3

 

You shouldn't need a new API. Everything was working fine for me prior to the 4.0 update and continued after the update. 

Link to comment

Refreshed login as suggested, logged back into PG3, all values are 0.

I did an API call from the browser using the same coordinates as PG3x and that worked fine. I got good weather data.

I double checked my configuration data (API Key, lat=38.87&lon=-121.10, forecast days (5), elevation (420) and plant type (0.23)).

I'm stumped.

PG3x is 3.2.21, OWM is 4.0.0 [Production].

Link to comment

If you set the log level of the plug-in to debug and look at the log entry for a query, what is OpenWeatherMap returning?  It will either return an error (which will point us at what is wrong) or it will return data.

Link to comment

This appears to be the error message: udi_interface      ERROR    query:query_onecall: Onecall data query failed

Here is context surrounding that error message:

2024-04-25 08:06:38,907 MainThread udi_interface.interface WARNING  interface:db_getNodeDrivers: controller not found in database.
2024-04-25 08:06:38,907 Interface  udi_interface.interface INFO     interface:_startMqtt: Using SSL cert: 0021b9026692_3.cert key: 0021b9026692_3.key ca: /usr/local/etc/ssl/certs/ud.ca.cert
2024-04-25 08:06:38,907 MainThread udi_interface.interface INFO     interface:addNode: Adding node OpenWeatherMap(controller) [None]
2024-04-25 08:06:38,908 MainThread udi_interface.interface INFO     interface:setController: Using node "controller", driver "ST" for connection status.
2024-04-25 08:06:38,958 MQTT       udi_interface.interface INFO     interface:_connect: MQTT Connected with result code 0 (Success)
2024-04-25 08:06:38,959 MQTT       udi_interface.interface INFO     interface:_connect: MQTT Subscribing to topic: udi/pg3/ns/clients/00:21:b9:02:66:92_3 -  MID: 2 Result: 0
2024-04-25 08:06:39,000 MQTT       udi_interface.interface INFO     interface:_subscribe: MQTT Subscribed Succesfully for Message ID: 2 - QoS: (0,)
2024-04-25 08:06:39,176 Thread-4   udi_interface      ERROR    owm:discover: Failed to create forecast node Forecast 0
'NoneType' object has no attribute 'lower'
2024-04-25 08:06:39,177 Thread-4   udi_interface      ERROR    owm:discover: Failed to create forecast node Forecast 1
'NoneType' object has no attribute 'lower'
2024-04-25 08:06:39,177 Thread-4   udi_interface      ERROR    owm:discover: Failed to create forecast node Forecast 2
'NoneType' object has no attribute 'lower'
2024-04-25 08:06:39,177 Thread-4   udi_interface      ERROR    owm:discover: Failed to create forecast node Forecast 3
'NoneType' object has no attribute 'lower'
2024-04-25 08:06:39,177 Thread-4   udi_interface      ERROR    owm:discover: Failed to create forecast node Forecast 4
'NoneType' object has no attribute 'lower'
2024-04-25 08:06:39,177 Thread-4   udi_interface      ERROR    query:query_onecall: Onecall data query failed
2024-04-25 08:16:38,016 Thread-6   udi_interface      ERROR    query:query_onecall: Onecall data query failed
2024-04-25 08:26:38,019 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message shortPoll
2024-04-25 08:26:38,019 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING shortPoll
2024-04-25 08:26:38,019 Command    udi_interface.interface DEBUG    interface:_handleInput: PROCESS shortPoll message {} from Polyglot

 

Link to comment

By way of context, I used an ISY-994i from 2013 until it died in 2022. For that entire time there was no problem with weather data. When the 994i died I replaced it with an EISY. As soon as I installed the EISY all weather values became 0 and I have not been able to get it to report valid weather data.

Link to comment

It looks like you switched the log level to debug, but didn't wait for a query to happen as there's no query results when in debug in the log snippet above.  

In most cases, the query failure is related to an invalid API key followed by the location format being incorrect.  Your location looks to be correct.

Without a complete debug log I can't help.

Link to comment

Not working for me either now once I updated.  Are we saying we need a professional plan that costs money?  I can't see any that don't eventually say you have to pay $0.15 per 100 calls.  Says free at first and then requires a payment method.

Link to comment

I sent a query from the EISY and this is what I got:

2024-04-29 18:33:03,062 MQTT udi_interface.interface DEBUG interface:_message: QUEUING incoming message query

2024-04-29 18:33:03,062 MQTT udi_interface.interface DEBUG interface:_message: QUEUING incoming message query

2024-04-29 18:33:03,062 MQTT udi_interface.interface DEBUG interface:_message: QUEUING incoming message query

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_parseInput: DEQUEING query

2024-04-29 18:33:03,062 MQTT udi_interface.interface DEBUG interface:_message: QUEUING incoming message query

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_parseInput: DEQUEING query

2024-04-29 18:33:03,062 MQTT udi_interface.interface DEBUG interface:_message: QUEUING incoming message query

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_parseInput: DEQUEING query

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_handleInput: PROCESS query message {'address': 'controller', 'requestId': '5'} from Polyglot

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_parseInput: DEQUEING query

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_handleInput: PROCESS query message {'address': 'controller', 'requestId': '5'} from Polyglot

2024-04-29 18:33:03,063 Command udi_interface ERROR query:query_onecall: Onecall data query failed

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_parseInput: DEQUEING query

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_handleInput: PROCESS query message {'address': 'controller', 'requestId': '5'} from Polyglot

2024-04-29 18:33:03,063 Command udi_interface ERROR query:query_onecall: Onecall data query failed

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_handleInput: PROCESS query message {'address': 'controller', 'requestId': '5'} from Polyglot

2024-04-29 18:33:03,063 Command udi_interface ERROR query:query_onecall: Onecall data query failed

2024-04-29 18:33:03,063 Command udi_interface.interface DEBUG interface:_handleInput: PROCESS query message {'address': 'controller', 'requestId': '5'} from Polyglot

2024-04-29 18:33:03,063 Command udi_interface ERROR query:query_onecall: Onecall data query failed

2024-04-29 18:33:03,063 Command udi_interface ERROR query:query_onecall: Onecall data query failed

Link to comment
16 hours ago, btreinders said:

Not working for me either now once I updated.  Are we saying we need a professional plan that costs money?  I can't see any that don't eventually say you have to pay $0.15 per 100 calls.  Says free at first and then requires a payment method.

version 4.0 of the plug-in uses the One Call 3.0 API and requires a subscription to the One Call 3.0 API.  Previous version used a different version of the API that is no longer supported by OpenWeatherMap.

The One Call 3.0 API allows for 1000 calls per day and if you exceed that, they will charge you.   

I don't believe you can sign up for a subscription without providing a payment method any longer.

  • Like 1
Link to comment

@Mike Carron Something is really wrong with that log info. How many queries did you do?  It shows 5 in that small bit of log.  Also, it's not showing any of the log messages that I would expect at debug level for a query.

I'd suggest power cycling the eisy and see if that helps.  

Link to comment

When I click on the FREE button 

image.thumb.png.da7dc702399d3a0e5b769e270d95ff2d.png

 

It take me to create an account if I am not logged in and says I am already logged in if I am logged in.  Nothing about the free API.

 

If I go to 

image.thumb.png.242a3265e3d7970d0719ea1ce9dc693b.png

and then select the Subscribe under the 1000 API calls per day for free it takes me to this

image.thumb.png.ad24807664b117e6c174f55a21a9857c.png

and as you can see it says $0.15 per 100 calls.  Are you saying that is only after the 1st 1000?

 

Thank you!

 

 

Edited by btreinders
Link to comment

@btreinders It only charges you after the 1,000 calls have been made at that rate.  You can also put a.limit on your plan of 1000 calls and it will reject (not process the call therefore no bill you) should you go above the 1000 in case you accidentally configure things that way. 

Edited by jwagner010
Link to comment

Bob Paauwe: I recycled the EISY as you suggested, when I redid the query I got this:

2024-04-30 13:00:49,073 MQTT udi_interface.interface DEBUG interface:_message: QUEUING incoming message query
2024-04-30 13:00:49,073 Command udi_interface.interface DEBUG interface:_parseInput: DEQUEING query
2024-04-30 13:00:49,073 Command udi_interface.interface DEBUG interface:_handleInput: PROCESS query message {'address': 'controller', 'requestId': '6'} from Polyglot
2024-04-30 13:00:49,074 Command udi_interface ERROR query:query_onecall: Onecall data query failed
 
OpenWeatherMap values are still all zero.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...