WAQI not updating system

I was happy with a few minutes of working WAQI component.

sensor 1:
  platform: waqi
  locations:
    - seoul

And it worked well untill I restarted my HA for the fourth time without changing anything to the config.
I keep getting following errors and the sensor is no longer showing up un HA.
Also not listed under STATES - Current entities

16-12-09 23:44:49 homeassistant.components.sensor.waqi: The following stations were returned: [5508, 4487, 1679, 1673, 1690, 4498, 4499, 1675, 1676, 1689, 1671, 1678, 4493, 4489, 1669, 1667, 1668, 1691, 1672, 1674]
16-12-09 23:45:13 homeassistant.components.sensor: Error while setting up platform waqi
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 150, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/waqi.py", line 54, in setup_platform
    dev.append(WaqiSensor(WaqiData(station), station))
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/waqi.py", line 67, in __init__
    self.update()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/waqi.py", line 115, in update
    self.data.update()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/util/__init__.py", line 296, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/waqi.py", line 132, in update
    self.data = pwaqi.getStationObservation(self._station_id)
  File "/var/opt/homeassistant/deps/pwaqi/__init__.py", line 50, in getStationObservation
    for res in r.json()["rxs"]["obs"]:
  File "/usr/local/lib/python3.4/dist-packages/requests/models.py", line 841, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode
    raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

These errors were not there before. I also did not update HA, It is still at

I saw that happening to me too. After HASS restart this issue was fixed. I’ve never seen that again.

I did several restarts as mentioned. Did not work. I even reinstalled HA. No luck.

But… Now I have removed home-assistant_v2.db and home-assistant.log and restarted it.
Now it works.

Okay. So there is definitely still an issue. When I check under devices I get following result for sensor.waqi_gwangjingu_seoul

{
  "attribution": "Data provided by the World Air Quality Index project",
  "dominentpol": "",
  "friendly_name": "WAQI Gwangjin-gu, Seoul",
  "humidity": 8,
  "icon": "mdi:cloud",
  "nitrogen_dioxide": 11,
  "ozone": 40,
  "particle": 80,
  "pressure": 6,
  "temperature": 25,
  "time": "2016-08-18T07:00:00+09:00",
  "unit_of_measurement": "AQI"
}

When I directly type this url https://wind.waqi.info/nsearch/station/Gwangjin-gu in a browser I get the following correct results with correct time.

{“dt”:“2.709986ms”,“term”:“gwangjin-gu”,“results”:[{“s”:{“a”:“139”,“t”:[“2016-12-13 19:00:00”,"+0900"],“n”:[“Gwangjin-gu, Seoul”,“광진구 서울”],“u”:“korea/seoul/gwangjin-gu”},“n”:[“Gwangjin-gu, Seoul, South Korea”],“x”:1672,“c”:“KR”,“z”:0}]}

So something is off for sure.

Same here. I actually had trouble getting this to even show up until I saw your URL test and it helped me to figure out the correct station/location name.

But now that I have it working, the sensor is showing a date of 1/26/17 when the URL test shows today’s date.

{"dt":"3.113324ms","term":"rahway","results":[{"s":{"a":"28","t":["2017-02-04 11:00:00","-0500"],"n":["Rahway PM, NewJersey"],"u":"usa/newjersey/rahway-pm"},"n":["Rahway PM, NewJersey, USA"],"x":3564,"c":"US","z":0}]}

Versus:

I just put in an issue for this:

https://github.com/home-assistant/home-assistant/issues/5809

@dennisaion and @bk86a - would appreciate you adding your observations to the issue if you get a chance.

I confirm there is an issue. I also just have set up this sensor and the collection date is January 28th…

Hope it can be solved…

Please post your observations to the GitHub Issue linked above as well. The devs will see the traffic and that gets a better response. Thanks!