Jump to content

Ambient Weather API Parse Error


Go to solution Solved by bpwwer,

Recommended Posts

I just installed this plugin, and there appears to be an API issue with the response parsing:

2024-07-11 19:31:27.074 MQTT       udi_interface.interface INFO     interface:_message: Profile installation finished
2024-07-11 19:32:24.346 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message shortPoll
2024-07-11 19:32:24.347 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING shortPoll
2024-07-11 19:32:24.347 Command    udi_interface.interface DEBUG    interface:_handleInput: PROCESS shortPoll message {} from Polyglot
2024-07-11 19:32:24.347 Thread-3 (poll) udi_interface      DEBUG    ambient-poly:poll: ShortPoll: shortPoll True https://api.ambientweather.net/v1/devices?applicationKey=7651edae3d7b44ee8ab5c3359b0c99469f30bf3d2a1d4f2c995b25d9c01a2cd3&apiKey=REDACTED
2024-07-11 19:32:24.479 Thread-3 (poll) udi_interface      ERROR    station:Query: Parsing failed: string indices must be integers, not 'str'

 

Link to comment
  • Solution
17 hours ago, JSylvia007 said:

I just installed this plugin, and there appears to be an API issue with the response parsing:

2024-07-11 19:31:27.074 MQTT       udi_interface.interface INFO     interface:_message: Profile installation finished
2024-07-11 19:32:24.346 MQTT       udi_interface.interface DEBUG    interface:_message: QUEUING incoming message shortPoll
2024-07-11 19:32:24.347 Command    udi_interface.interface DEBUG    interface:_parseInput: DEQUEING shortPoll
2024-07-11 19:32:24.347 Command    udi_interface.interface DEBUG    interface:_handleInput: PROCESS shortPoll message {} from Polyglot
2024-07-11 19:32:24.347 Thread-3 (poll) udi_interface      DEBUG    ambient-poly:poll: ShortPoll: shortPoll True https://api.ambientweather.net/v1/devices?applicationKey=7651edae3d7b44ee8ab5c3359b0c99469f30bf3d2a1d4f2c995b25d9c01a2cd3&apiKey=REDACTED
2024-07-11 19:32:24.479 Thread-3 (poll) udi_interface      ERROR    station:Query: Parsing failed: string indices must be integers, not 'str'

 

Most likely, it's an error in the results sent by Ambient.  You can check that by taking the URL where you redacted the key and cut and pasting that into a browser tab/window.  

If you just generated the key, it may take some time before Ambient actually activates the key and it works.

Link to comment
9 minutes ago, bpwwer said:

Most likely, it's an error in the results sent by Ambient.  You can check that by taking the URL where you redacted the key and cut and pasting that into a browser tab/window.  

If you just generated the key, it may take some time before Ambient actually activates the key and it works.

It was exactly that.  Might want to update your documentation saying that Ambient can take a long time to activate the API Key.  In my case I played with it for almost an hour and it didn't work.  This morning I restarted the service in Polyglot and it all came through immediately.

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...