Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA 0.89.2 使用aligenie报错哈 #7

Closed
jamesho0 opened this issue Mar 16, 2019 · 5 comments
Closed

HA 0.89.2 使用aligenie报错哈 #7

jamesho0 opened this issue Mar 16, 2019 · 5 comments

Comments

@jamesho0
Copy link

用frp穿透 HA 0.89.2 配置完成后 在获取设备处报错了。

2019-03-16 10:01:56 INFO (MainThread) [custom_components.aligenie] Handle Request: {'header': {'name': 'DiscoveryDevices', 'messageId': '7d3453d-b442-4e96-ae3d-2fd2e4564fce5', 'namespace': 'AliGenie.Iot.Device.Discovery', 'payLoadVersion': 1}, 'payload': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJ565frrerDfff9.eyJleHAiOjE1ODQyMzc3MTIsImlhdCI6MTU1MjcwMTcxMiwiaXNzIjoiYjIyY2VkNDBhYzI3NGRmMGE5MDUzMWQyNzE1ZGFlYzMifQ._Pxaw3KJZQZQRpUhoEw5Bcfrrgw45wrAnDOUw'}}
2019-03-16 10:01:57 ERROR (MainThread) [custom_components.aligenie] Traceback (most recent call last):
File "/home/pi/.homeassistant/custom_components/aligenie.py", line 106, in handleRequest
result = discoveryDevice()
File "/home/pi/.homeassistant/custom_components/aligenie.py", line 169, in discoveryDevice
deviceName = guessDeviceName(entity_id, attributes, places, aliases)
File "/home/pi/.homeassistant/custom_components/aligenie.py", line 373, in guessDeviceName
if name == aliases['key'] or name in aliases['value']:
TypeError: list indices must be integers or slices, not str

@fireinice
Copy link

借问一下有没有碰到天猫精灵平台返回token不正确的问题?:(

@jamesho0
Copy link
Author

借问一下有没有碰到天猫精灵平台返回token不正确的问题?:(

出现过一次 再刷新就没有了, 可能是网速慢了 没响应到数据的问题

@fireinice
Copy link

多谢,在home-assistant日志里能看到对auth/token的访问么?我这里好像只能看到对auth/authorize的访问,怎么刷似乎都不行。

@lulee007
Copy link

lulee007 commented Aug 22, 2019

错误在这第 373 行:

# Name validation
   for alias in aliases:
     if name == aliases['key'] or name in aliases['value']:

应该为:

# Name validation
   for alias in aliases:
     if name == alias['key'] or name in alias['value']:

@Yonsm
Copy link
Owner

Yonsm commented Aug 29, 2019

妈呀真的是,感谢反馈,已更新。但是话说,我都不启用别名检查啊,地址全部用小写,关闭别名检查

@Yonsm Yonsm closed this as completed Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants