|
发表于 2018-11-3 12:53:43
|
显示全部楼层
本帖最后由 淘子 于 2018-11-3 16:22 编辑
解决了。换成这个就能收到数据。
/api/gpslogger?gps=%LOCN&device=设备名&battery=%BATT&provider=gps&api_password=密码
----------------
始终有一个错误:
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 66, in staticresource_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 66, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 68, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 66, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 68, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 113, in handle
result = await result
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
res = func(*args, **kw)
File "/config/custom_components/device_tracker/gpsloggerSelf.py", line 94, in get
accuracy = int(float(data['accuracy']))
ValueError: could not convert string to float: '%LOCACC' |
|