VirgilClyne / iRingo

解锁完整的 Apple功能和集成服务
GNU General Public License v3.0
9.2k stars 348 forks source link

WAQI APIv2无法检测到附近的监测站 #76

Closed Danrusty closed 2 years ago

Danrusty commented 2 years ago

重写模块在quanx已经订阅了 15296862-1ACC-4AC8-94EB-B57BE6EB5F3D 资源解析器也打开了,但打开天气app以后默认的第一个本地天气aqi始终无法被修改成us区域,provider还是默认的Qweather. 0B24C8C7-3F2B-4B1F-8393-CBE94526F432

查看quanx的日志如下:

🔔Apple Weather AQI v3.1.0, 开始! 2022/04/22 21:51:00:932 [JS Console]: ⚠ Apple Weather AQI v3.1.0, Set Environment Variables 2022/04/22 21:51:00:941 [JS Console]: 🎉 Apple Weather AQI v3.1.0, Set Environment Variables Settings: object Settings内容: {"Switch":true,"NextHour":{"Switch":true},"AQI":{"Switch":true,"Mode":"WAQI Private","Location":"Station","Auth":"申请的私人token","Scale":"EPA_NowCast.2201"},"Map":{"AQI":true}} 2022/04/22 21:51:00:945 [JS Console]: 🚧 Apple Weather AQI v3.1.0 Params: {"ver":"v2","language":"en-US","lat":"30.503","lng":"114.417"} 2022/04/22 21:51:00:947 [JS Console]: 🚧 Apple Weather AQI v3.1.0, providerName = QWeather 2022/04/22 21:51:00:949 [JS Console]: 🎉 Apple Weather AQI v3.1.0, 需要替换AQI 2022/04/22 21:51:00:950 [JS Console]: 🚧 Apple Weather AQI v3.1.0, 工作模式: waqi.info 私有API 2022/04/22 21:51:00:952 [JS Console]: 🚧 Apple Weather AQI v3.1.0, 定位精度: 观测站 2022/04/22 21:51:00:953 [JS Console]: ⚠ Apple Weather AQI v3.1.0, WAQI input: {"api":"v2","lat":"30.503","lng":"114.417"} 2022/04/22 21:51:00:955 [JS Console]: ⚠ Apple Weather AQI v3.1.0, Get WAQI Request, type: Nearest 2022/04/22 21:51:00:957 [JS Console]: 获取最近站点 2022/04/22 21:51:00:959 [JS Console]: ⚠ Apple Weather AQI v3.1.0, Get WAQI Data, type: Nearest 2022/04/22 21:51:02:293 [JS Console]: 🎉 Apple Weather AQI v3.1.0, GetData:Nearest完成 idx: null 观测站: null AQI: null 2022/04/22 21:51:02:296 [JS Console]: 🚧 Apple Weather AQI v3.1.0, WAQI output: {"station":null,"idx":null} 2022/04/22 21:51:02:299 [JS Console]: ⚠ Apple Weather AQI v3.1.0, WAQI input: {"token":"decff1be15d478de35a7d1dedff89d086a8c0cf3","idx":null} 2022/04/22 21:51:02:301 [JS Console]: ⚠ Apple Weather AQI v3.1.0, Get WAQI Request, type: StationFeed 2022/04/22 21:51:02:302 [JS Console]: 获取站点信息 2022/04/22 21:51:02:304 [JS Console]: ⚠ Apple Weather AQI v3.1.0, Get WAQI Data, type: StationFeed 2022/04/22 21:51:02:475 [JS Console]: 🎉 Apple Weather AQI v3.1.0, GetData:StationFeed完成 idx: undefined 观测站: undefined AQI: undefined 2022/04/22 21:51:02:478 [JS Console]: 🚧 Apple Weather AQI v3.1.0, WAQI output: null 2022/04/22 21:51:02:482 [JS Console]: ⚠️ Apple Weather AQI v3.1.0, outputAQI检测 AQI data v2 2022/04/22 21:51:02:484 [JS Console]: ⚠️ Apple Weather AQI v3.1.0, classifyAirQualityLevel, Error aqiIndex: undefined 2022/04/22 21:51:02:487 [JS Console]: ❗️Apple Weather AQI v3.1.0, 错误! RangeError: Invalid Date 2022/04/22 21:51:02:489 [JS Console]: 🔔Apple Weather AQI v3.1.0, 结束! 🕛 1.568 秒 感觉好像是没有获取到最近的监测站。 但是手动添加的其他区域均可以正常显示: 030D3950-F101-4759-ABCF-7E0188F243A8 非常奇怪。求大佬帮忙

Danrusty commented 2 years ago

系统版本15.4

WordlessEcho commented 2 years ago

日志里有你的私人信息(lat, lng, token),记得保护一下

WordlessEcho commented 2 years ago

token你要删掉,你用的私有token,我建议你现在去重新申请一下 然后说回正题,我发现APIv2不能检测到附近的监测站,但APIv1可以,所以是API的问题,我觉得可以考虑做一个workaround @VirgilClyne

Danrusty commented 2 years ago

日志里有你的私人信息(lat, lng, token),记得保护一下

感谢,把token删掉了。刚还没注意。经纬度我就留着了,我还怀疑是不是因为武汉附近就两个监测点,它搜索监测站的范围有个阈值,然后没找到就报错了。但是我单独添加武汉的话又能找到,就非常奇怪

VirgilClyne commented 2 years ago

已复现 洪山区这个地点使用“观测站”精度时,无法搜索到周边观测站 当切换至“城市”精度时,可以正确获得来自黄冈观测站的数据 会做一个并发查询机制,取用最快获得的可用数据

Danrusty commented 2 years ago

好嘞,我先试试,感谢大佬

WordlessEcho commented 2 years ago

Keep issue open as it is not resolved. 问题尚未解决,先保持issue open

Danrusty commented 2 years ago

Keep issue open as it is not resolved. 问题尚未解决,先保持issue open

好的,抱歉表述刚才不准确,我的问题已解决,但bug尚待修复。

WordlessEcho commented 2 years ago

你的编辑记录也要记得删掉 @Danrusty image

Danrusty commented 2 years ago

你的编辑记录也要记得删掉 @Danrusty image

感谢提醒。已删除。

gdopera commented 2 years ago

日志里有你的私人信息(lat, lng, token),记得保护一下

老大又见到你了

WordlessEcho commented 2 years ago

临时解决方案: 申请API token:Air Quality Open Data Platform API Token Request Form 将定位精度切换为「城市」

WordlessEcho commented 2 years ago

已在v4版天气模块中修复