feversky / aligenie Goto Github PK
View Code? Open in Web Editor NEWhome assistant custom component for tmall genie
License: MIT License
home assistant custom component for tmall genie
License: MIT License
Logger: homeassistant.setup
Source: util/async_.py:96
First occurred: 上午9:46:13 (1 occurrences)
Last logged: 上午9:46:13
Error during setup of component aligenie
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/aligenie.py", line 86, in async_setup
_places = json.loads(urlopen('https://open.bot.tmall.com/oauth/api/placelist').read().decode('utf-8'))['data']
File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.8/urllib/request.py", line 1393, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.8/urllib/request.py", line 1350, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
self.send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1266, in send_request
self.putrequest(method, url, **skips)
File "/usr/src/homeassistant/homeassistant/util/async.py", line 120, in protected_loop_func
check_loop()
File "/usr/src/homeassistant/homeassistant/util/async.py", line 96, in check_loop
end = found_frame.filename.index("/", start)
ValueError: substring not found
发现有些设备并没有添加需要的参数也会被自动添加到天猫精灵。
Ha里根据Broadlink Climate添加了Fan。 并可以控制开关和风速,风速名称在Jason里把原来的low, medium , high改为了1挡,2挡-6挡。 如图。
天猫精灵目前可以控制打开风扇和关闭风扇,但是无法调整风速。
说:天猫精灵,风速调为1挡
HA日志如下
2019-06-29 20:24:23 INFO (MainThread) [custom_components.aligenie] Handle Request: {'header': {'messageId': '8e5f8aad-0086-4d8b-9ba4-ab698afd28fd', 'name': 'SetWindSpeed', 'namespace': 'AliGenie.Iot.Device.Control', 'payLoadVersion': 1}, 'payload': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI3NzFkMTFiMjdiYzM0NGZmOWIwOGQ1NTkwZjYwMjJjZSIsImlhdCI6MTU2MTgwNTY2NywiZXhwIjoxNTkzMzQxNjY3fQ.LODcpK-P3oAOjswzU1cH-vBmY2V2gsQM-LIdYeBue2w', 'attribute': 'windspeed', 'deviceId': 'fan.ke_ting_feng_shan', 'deviceType': 'fan', 'value': '1'}}
2019-06-29 20:24:23 ERROR (MainThread) [custom_components.aligenie] Traceback (most recent call last):
File "/config/custom_components/aligenie.py", line 102, in post
response = await handleRequest(data)
File "/config/custom_components/aligenie.py", line 137, in handleRequest
result = await controlDevice(name, payload)
File "/config/custom_components/aligenie.py", line 247, in controlDevice
result = await _hass.services.async_call(domain, service, data, True)
File "/usr/src/app/homeassistant/core.py", line 1118, in async_call
raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service fan.set_wind_speed not found')
hass 里已经可以控制空调,但是通过天猫精灵无法控制。
Hi,
Do you mind to share how a foreigner can register a AliGenie Voice Developer account in https://open.aligenie.com/?
In the registration page, the verification documents only opens to China, Hong Kong, Macau & Hong Kong, as per screenshot below:
As a foreigner, I can’t register an account as I don’t own a China identification document for verification purpose.
Thanks.
Is it possible to retain "English" friendly name so that the device could be used by Google Assistant or Amazon Echo? Is it possible to define aligenie_friendlyname to specify name required by aligenie? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.