Page 2 of 2

Re: Refreshing Rate Information from the Octopus API for Dev

PostPosted: Sat May 16, 2020 11:01 am
by howartp
Code: Select all
Octopus Energy                  Applying the Afternoon Daily Rate Update from the Octopus API for Device Octopus EnergyL Tariff
   Octopus Energy                  Refreshing Daily Rate Information from the Octopus API for Device Octopus EnergyL Tariff
   Octopus Energy Error            Octopus API refresh failure (Yesterday refresh), Other error HTTPSConnectionPool(host='api.octopus.energy', port=443): Read timed out. (read timeout=1.0)
   Octopus Energy Error            Octopus API Refresh, Error in getting yesterday tariffs
   Octopus Energy Error            Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 78, in runConcurrentThread
  File "plugin.py", line 319, in update
UnboundLocalError: local variable 'average_rate_yest' referenced before assignment

   Octopus Energy Error            plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   Z-Wave                          sent "Power Meter - Quooker" on

Re: Refreshing Rate Information from the Octopus API for Dev

PostPosted: Sun May 17, 2020 5:25 am
by neilk
Peter,

I have published a pre-release version https://github.com/neilkplugins/Octopus_Energy-indigo-plugin/releases/tag/0.2.1-alpha that should address the issue whereby the variable can only be used if the API updated successfully (which I thought I had done). I also added the menu item option to force a refresh of all devices that both resolves any device inconsistency and will also test API connectivity at that point in time.

Did you see any more API timeouts occurring ? I will check the Octopus forums to see if any else sees similar issues and if we need more resilience here.

@ Any other users, not need to upgrade to this version unless you see the error Peter experienced, and this will be included in the next published version in the plugin store

Thanks,
Neil