homebridge-smart-irrigation icon indicating copy to clipboard operation
homebridge-smart-irrigation copied to clipboard

[BUG]

Open AscendK2 opened this issue 3 years ago • 2 comments

Thank you for developing an amazing product that integrates weather science and crop science to save water.

Describe the bug OpenWeatherMap.org has recently migrated from their call API protocol 2.5 to 3.0 The API keys they are now handing out with 1000 free calls per day only work with the API 3.0 protocol and one has to pay for a plan that works with the 2.5 protocol. New keys issues by OpenWeatherMap produce a 401 error when trying to pull weather data as the syntax of the call is incorrect.

To Reproduce

  1. Open a new OpenWeatherMap.org "One Call API 3.0" subscription. Place the key into Homebridge-Smart-Irrigation and a 401 error will be generated on each call due to the use of "2.5" in the call syntax instead of "3.0"

Expected behavior Successful API call did not occur due to syntax error.

Platform (please complete the following information):

  • Platform: Homebridge v1.5.0
  • Smart Irrigation V1.7.2
  • OpenWeatherMap "One Call API 3.0"

Suggested solution: Add a menu choice in HomebridgeSmartIrrigation-->Settings-->Primary Setup which toggles between API call syntax version 2.5 and 3.0 This will simply swap the numbers "2.5" and "3.0" in the API call syntax. By default it is set to 2.5 to provide compatibility for those current users who signed up for a key under API v2.5 but allows new users to select 3.0 to work with the new keys.

AscendK2 avatar Aug 25 '22 17:08 AscendK2

Thank you for pointing this out and the suggestion.. will try this out over the coming weekend and revert with the changes. Hopefully earlier than that if I'm able to find some time for this..

MTry avatar Aug 29 '22 09:08 MTry

This issue has resolved, no longer getting the error messages, API calls are working now. Thank you.

AscendK2 avatar Oct 25 '22 22:10 AscendK2