Awair Indoor Sensor Integration suddenly started failing

So i had the Awair connected and running fine 3 days ago with the following config

  - platform: awair
    access_token: eyJ0eXAiOiJKV1QiLCJhxxxxOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMTUyNzxxxx.ItpdVsQpcgfenyyxxxxxxMZ_prb4FMpW2qMecMXsTqg
    devices:
      - uuid: awair_xxxxx

And it was running fine by showing the dashboard badges for sensors, however for past 3 days or so I noticed the following error in the log

2019-04-03 17:10:12 WARNING (MainThread) [homeassistant.components.sensor] Platform awair not ready yet. Retrying in 180 seconds.
2019-04-03 17:13:13 ERROR (MainThread) [homeassistant.components.sensor.awair] Unexpected Awair API error: The query 
Devices {
    devices {
        uuid
        deviceType
        deviceId
        name
        preference
        macAddress
        room {
            id
            name
            kind
            Space {
                id
                kind
                location {
                    name
                    timezone
                    lat
                    lon
                }
            }
        }
    }
} with variables None is invalid.

Tried restarting HassIO 0.90.0 on my Rpi3 several times however it persists and all awair information is gone. I can still connect to my awair using its android mobile app and it shows all info correctly.

Can anyone be kind enough to debug whats gone wrong, is the API syntax from Awair side is changed and hence HA is not able to fetch the info.

Thanks for your help

1 Like

I have same issue between HA 0.90.2 and Awair devices.

I have the same problem. After upgrading to 0.91 I tried reverting back to a snapshot of 0.90.2, but the problem was still there. I am able to get data using the terminal command provided by awair: http://developer-apis.awair.is/v1/users/self/devices/:device_type/:device_id/air-data/latest
But the awair sensors are not shown in home assistant anymore.

Is this a change in the Awair API or due to a change in the new sensor-setup i HA version 0.91?

I’m having the same issue. Running 91.0

I have the same problem. Also with 0.91 but the problem appears a few hours before 0.91 was published, so seems to be changes in the API

So is it solved in 0.91 ??

No it’s not solved in 0.91. Seems to be a change in the API that broke it.

Well same situation. Pity I am not technically able enough to debug and identify the changes to the API .

So commenting out the Awair integration for the time being to avoid overloading the HA log.

Hopefully the devs would have taken notice to work it out soon. Do we have to follow any other bug or change request reporting channel to include this change in the backlog.

Request to keep this topic posted for any updates.

Thanks.

change lon and lat to longitude and latitude in this file
/srv/homeassistant/lib/python3.6/site-packages/python_awair/const.py then restart … working after that change

1 Like

Tried doing it on HassIO 0.91.0

There is nothing inside /srv folder in my installation, hence cannot reach

/srv/homeassistant/lib/python3.6/site-packages/python_awair/const.py

Thanks.

i’m on docker and its:
/usr/local/lib/python3.7/site-packages/python_awair/const.py

i’m going to cp it out and edit and cp back see if that fixes it

confirmed changing const.py lines 47 & 48 as per @danmarotta5 works :slight_smile:

EDIT: change requesthere
will be going in to 0.91.3 release

Well the following path not available in my HassIO installation 0.91.0

site-packages/python_awair/const.py

Hi everyone, thanks for raising this issue! As @jaburges mentioned the changes should be merged in the next/latest update of HA.

Feelin kinda stoopid because I can’t get this to work. Rasp Pi, installed latest 2 days ago. I know there’s a new one coming, but for my own sake I want to try to follow the instructions above to change it. However, in /usr/local/lib/python3.7/site-packages I don’t see python_awair

Is this something I need to install manually?