GHenry Posted December 19, 2023 Posted December 19, 2023 (edited) PG3x v3.2.16, eisy v5.7.1 Yesterday I purchased and installed the OpenWeatherMap eisy node plugin, then rebooted. I got the 401 error, although my API key shows as correct and my email address is confirmed with OpenWeatherMap. Today starting at 14:46:53 I uninstalled and reinstalled the plugin with the same results, except that in the mobile app, the status of devices no longer shows up; ironically however OpenWeatherMap shows as “connected” in notifications, although I’m not sure where the mobile “bad gateway” is coming from. Screenshots and PG3x log attached. Obviously I’m missing something! Any insight? pg3-current 2.log Edited December 19, 2023 by GHenry
bpwwer Posted December 20, 2023 Posted December 20, 2023 The "Connected" means that the plug-in is running and is connected to PG3. The most common reason why no data is displayed is because OpenWeatherMap is rejecting the connection attempt from the plug-in. The reason for that will be logged in the plug-in's log if the log is set to debug level logging. OpenWeatherMap has supported a couple of different API's over the past few years and the API keys for them are not interchangeable. It's also possible that the API key's they are now assigning don't work with the API that the plug-in is using. Again, the log on debug may help determine this. Also, the query interval is set to 10 minutes, so make sure you're waiting at least that long for data to populate.
GHenry Posted December 20, 2023 Author Posted December 20, 2023 (edited) Thanks for the response. I’ve been waiting a lot longer than 10 minutes! I’ve attached the downloaded OWM debug-level log (it doesn’t show up on the PG3x page), which suggests that the API key is the problem. However, I’ve reconfirmed that it is correct. I also corrected the elevation to 220 meters, FWIW. Does any of that suggest a solution? debug 12.log Edited December 20, 2023 by GHenry Added log file
bpwwer Posted December 20, 2023 Posted December 20, 2023 Yes, it says the API key is invalid. I can't do anything about that as that's OpenWeatherMap reporting that error when that specific key is used. I'm not affiliated with OpenWeatherMap other than having my own account with my own API keys. As the response says, you can check https://openweathermap.org/faq#error401 Which just says: You can get the error 401 in the following cases: You did not specify your API key in API request. Your API key is not activated yet. Within the next couple of hours, it will be activated and ready to use. You are using wrong API key in API request. Please, check your right API key in personal account. You are using a Free subscription and try requesting data available in other subscriptions . For example, 16 days/daily forecast API, any historical weather data, Weather maps 2.0, etc). Please, check your subscription in your personal account. I believe the plug-in is using the "Professional Collections" API, but they've changed the API name/subscriptions since I developed the plug-in.
GHenry Posted December 20, 2023 Author Posted December 20, 2023 4 hours ago, bpwwer said: …I believe the plug-in is using the "Professional Collections" API, but they've changed the API name/subscriptions since I developed the plug-in. Will there be an update?
bpwwer Posted December 21, 2023 Posted December 21, 2023 Update for what? The plug-in works fine with the existing API, I'm using it without any issues.
GHenry Posted December 21, 2023 Author Posted December 21, 2023 2 hours ago, GHenry said: …they've changed the API name/subscriptions since I developed the plug-in. 13 minutes ago, bpwwer said: Update for what? The plug-in works fine with the existing API, I'm using it without any issues. Wish there had been a trial version…
Solution residualimages Posted December 21, 2023 Solution Posted December 21, 2023 (edited) On 12/19/2023 at 3:58 PM, GHenry said: I got the 401 error, although my API key shows as correct and my email address is confirmed with OpenWeatherMap I set this up today too, and continued to get that 401 error even after confirming email and verifying API keys etc, until I set up the Billing Name / Address / Payment Method (I chose PayPal) within OpenWeatherMap by clicking the Subscribe button -- I immediately also set the limit to 1000 API calls a day (it defaults to 2000), so I will never be charged for it. Once I did that "Subscribe" (even though its going to be free), the 401 errors went away and I got data -- both in my web browser when calling the URLs directly with my API key, as well as within the Nodeserver. Edited December 21, 2023 by residualimages 1
GHenry Posted December 21, 2023 Author Posted December 21, 2023 Yeah, that did it for mee too, thank you! Who'da thunk it? Thanks again! 1
bpwwer Posted December 21, 2023 Posted December 21, 2023 Ok, that's different. You didn't have to go through all that before.
GHenry Posted December 21, 2023 Author Posted December 21, 2023 41 minutes ago, bpwwer said: Ok, that's different. You didn't have to go through all that before. Maybe an update to the requirements for the node server?
Recommended Posts