Closed tleegaard closed 5 years ago
Hello tleegaard,
I assume you are using HomeKit Python 0.15.0?
The first discover and the pairing look great. What exactly do you mean with "the
device is showing the temperature and humidity sensor, but not the CO2 sensor"?
The output of python3 -m homekit.get_accessories -f velux -a velux
seems to
include a section for the carbon-dioxide sensor (which shows 0, which is strange):
2.14: >carbon-dioxide<
2.15: Carbon Dioxide sensor () >name< [pr]
2.16: 0 () >carbon-dioxide.detected< [pr,ev]
2.17: 400.0 () >carbon-dioxide.level< [pr,ev]
Can you perform a
python3 -m homekit.get_characteristic -f velux -a velux -c 2.16 --log DEBUG
and see if the value changes?
Can you send me the result of
python3 -m homekit.remove_pairing -f velux -a velux -i D3:4E:DB:1E:AE:43 --log DEBUG
after you repaired the device?
Thanks for your report! The device seems to be the first bridge I met in the wild and I hope to fix it and get a shiny report for the list of supported devices (see the template).
Yes - I'm on 0.15.0 :)
In Home Assistant only the temperature and humidity sensors would show up - but maybe that is due to something in HA.
I also found out that I can unpair the gateway successfully with python3 -m homekit.remove_pairing -f velux -a velux
. I have to leave out the -i parameter.
The carbon dioxide sensor is calibrating for ~10 hours after batteries are inserted - for now the value is 0 - I will try running this again later today: python3 -m homekit.get_characteristic -f velux -a velux -c 2.16 --log DEBUG
2019-07-31 07:29:17,224 ip_implementation.py:0416 DEBUG init session
2019-07-31 07:29:21,126 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytes'>) b'\xe8\xb1{\x96\xf6\x83J4DP\xa4\xf7\x99\x98\xb3>\xd3WM\xe8\xa8\x00\xf2\x18\x05\x8b&\x10RB-<'
]
2019-07-31 07:29:21,157 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytearray'>) 0xe8b17b96f6834a344450a4f79998b33ed3574de8a800f218058b261052422d3c
]
2019-07-31 07:29:21,165 __init__.py:0075 DEBUG write message: [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytearray'>) 0xe8b17b96f6834a344450a4f79998b33ed3574de8a800f218058b261052422d3c
]
2019-07-31 07:29:21,382 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x02
3: (32 bytes/<class 'bytearray'>) 0xab19492643f930ee17e55ca5e1b73b28c752a9e2b4d4e1abdd6d268fb47a4f04
5: (101 bytes/<class 'bytearray'>) 0xe3f935d871917e21ba2e8471a03a8c7c683cf9d0b9d331cb8cd476f799b2b229969f3a3f440e67472604ca91a7bb714ed75a9bd13882419338703e95fa4a32954fdc48703f58fd3cb340e70359aed0cfc71e1591c3d491d895eb7474350696ccca19f378e7
]
2019-07-31 07:29:21,393 __init__.py:0082 DEBUG response: [
6: (1 bytes/<class 'bytearray'>) 0x02
3: (32 bytes/<class 'bytearray'>) 0xab19492643f930ee17e55ca5e1b73b28c752a9e2b4d4e1abdd6d268fb47a4f04
5: (101 bytes/<class 'bytearray'>) 0xe3f935d871917e21ba2e8471a03a8c7c683cf9d0b9d331cb8cd476f799b2b229969f3a3f440e67472604ca91a7bb714ed75a9bd13882419338703e95fa4a32954fdc48703f58fd3cb340e70359aed0cfc71e1591c3d491d895eb7474350696ccca19f378e7
]
2019-07-31 07:29:21,515 tlv.py:0117 DEBUG receiving [
1: (17 bytes/<class 'bytearray'>) 0x44333a34453a44423a31453a41453a3433
10: (64 bytes/<class 'bytearray'>) 0x0295250397bdd4726d637d2eacc18c7934b7a6e2c43f2e0d2262d58bd3eddeb5f6bdf552d1b30674049c65db2d0f85428e5e356165a53f5f76873c8fffe2b900
]
2019-07-31 07:29:21,626 tlv.py:0134 DEBUG sending [
1: (36 bytes/<class 'bytes'>) b'4fadf0b1-80b8-46aa-8b1c-08f7cd3f3df3'
10: (64 bytes/<class 'bytes'>) b'\x94\x18\xa5p\xfa\xe2r\x94\x02\xc0|`\xdd\xc3\xd1B\x88h\xf9\xab/\x06_\xfa\x0f\x90\xa8\x96\x11\xc4\xba\xc7\xf5\x93\x0e\xcb\\\x04F\xdd\xfb7=/\\Dc*/4.V?v}\xc7p6\x01\xb5W\xac\x94\x0b'
]
2019-07-31 07:29:21,842 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0xa2d059aa9071302550466ad9659f06872afe475f128bf322b2a1c8dc73fb74bfb0e61d4a52df994cc568c84d18722de29edec6f0f4277a6bb7c49bb750de90b1551fa2726951b0e052701f1396c7f6bbc94673aa11936e5c5389b85db22216e914e253186cca962488a8a687d3f57d0018bb75208efb36e8
]
2019-07-31 07:29:21,854 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0xa2d059aa9071302550466ad9659f06872afe475f128bf322b2a1c8dc73fb74bfb0e61d4a52df994cc568c84d18722de29edec6f0f4277a6bb7c49bb750de90b1551fa2726951b0e052701f1396c7f6bbc94673aa11936e5c5389b85db22216e914e253186cca962488a8a687d3f57d0018bb75208efb36e8
]
2019-07-31 07:29:21,872 __init__.py:0075 DEBUG write message: [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0xa2d059aa9071302550466ad9659f06872afe475f128bf322b2a1c8dc73fb74bfb0e61d4a52df994cc568c84d18722de29edec6f0f4277a6bb7c49bb750de90b1551fa2726951b0e052701f1396c7f6bbc94673aa11936e5c5389b85db22216e914e253186cca962488a8a687d3f57d0018bb75208efb36e8
]
2019-07-31 07:29:21,995 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x04
]
2019-07-31 07:29:22,007 __init__.py:0082 DEBUG response: [
6: (1 bytes/<class 'bytearray'>) 0x04
]
2019-07-31 07:29:22,032 ip_implementation.py:0443 DEBUG session established
2019-07-31 07:29:22,041 secure_http.py:0073 DEBUG handle request: b'GET /characteristics?id=2.16 HTTP/1.1\r\nHost: 192.168.1.157:5001\r\n\r\n'
{
"2.16": {
"value": 0
}
}
python3 -m homekit.remove_pairing -f velux -a velux --log DEBUG (omitting the -i part)
2019-07-31 07:33:39,662 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x01
0: (1 bytes/<class 'bytearray'>) 0x04
1: (36 bytes/<class 'bytes'>) b'4fadf0b1-80b8-46aa-8b1c-08f7cd3f3df3'
]
2019-07-31 07:33:39,694 ip_implementation.py:0416 DEBUG init session
2019-07-31 07:33:42,632 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytes'>) b'W\xed\x00\xbb\x13\xa8\xb6$\xaf:\x99Wa\xebY\xf8x@B\xa4\xa5\x8f\xae8\xd9=\xf1\x1b/Lq\x17'
]
2019-07-31 07:33:42,685 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytearray'>) 0x57ed00bb13a8b624af3a995761eb59f8784042a4a58fae38d93df11b2f4c7117
]
2019-07-31 07:33:42,695 __init__.py:0075 DEBUG write message: [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytearray'>) 0x57ed00bb13a8b624af3a995761eb59f8784042a4a58fae38d93df11b2f4c7117
]
2019-07-31 07:33:43,574 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x02
3: (32 bytes/<class 'bytearray'>) 0x4b819d15e0485fa8eabafecaa9667c77cd581e075c0707fb8beb8bf9d535bf4e
5: (101 bytes/<class 'bytearray'>) 0x92f9b782dcf215ebe7965f461c8bd3950ba0d6d90f18730e3a63460abe255564b62e929b8de731533cfec9a600304eaed4bd1efe56896010a59798a428e1041f251b27f35633608b35e969f0a5a240cdf1f85c783402ea25be88ee79141076ecd98dca3358
]
2019-07-31 07:33:43,587 __init__.py:0082 DEBUG response: [
6: (1 bytes/<class 'bytearray'>) 0x02
3: (32 bytes/<class 'bytearray'>) 0x4b819d15e0485fa8eabafecaa9667c77cd581e075c0707fb8beb8bf9d535bf4e
5: (101 bytes/<class 'bytearray'>) 0x92f9b782dcf215ebe7965f461c8bd3950ba0d6d90f18730e3a63460abe255564b62e929b8de731533cfec9a600304eaed4bd1efe56896010a59798a428e1041f251b27f35633608b35e969f0a5a240cdf1f85c783402ea25be88ee79141076ecd98dca3358
]
2019-07-31 07:33:43,770 tlv.py:0117 DEBUG receiving [
1: (17 bytes/<class 'bytearray'>) 0x44333a34453a44423a31453a41453a3433
10: (64 bytes/<class 'bytearray'>) 0x56abf4a5d7c8a26d7071e88fbb31dc1735d5e72f009611f9cbe833e49a34799104e5ad147d9bb91b07e55a6aa75ff49415c406ce77c2698a2894d1dce7a60707
]
2019-07-31 07:33:44,003 tlv.py:0134 DEBUG sending [
1: (36 bytes/<class 'bytes'>) b'4fadf0b1-80b8-46aa-8b1c-08f7cd3f3df3'
10: (64 bytes/<class 'bytes'>) b'\xc9q\xf9\xefo#\xfb]mDw\x06\xe83\xb9ll>4,\xd1\xb18\x1bX\x16\x0f\x8bw\x1c8i5\xd9i\xa0#\x16\xe0w\x95\xa8\xeb\x98\xb2\xf5[\x81c\xb2\x1a\xdb\xb1\xc5}\x08\x0f\xeed\x16\x18\xfb\xb0\x03'
]
2019-07-31 07:33:44,234 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0x735c15df4f577813b9cba6b682c267cf92914d5f2bc7cad6e3b51c4a9f0c827526e912d4592d41cf8981d7db39ed88f92100922c4864fdd552c1c48b499bb1985fdeef722491bd2d58ea5610118dcda06e15be8777397882a882958f0b14671dabb9f91cf82f08d5dbe3e639c2534af5b50a83828a37f552
]
2019-07-31 07:33:44,251 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0x735c15df4f577813b9cba6b682c267cf92914d5f2bc7cad6e3b51c4a9f0c827526e912d4592d41cf8981d7db39ed88f92100922c4864fdd552c1c48b499bb1985fdeef722491bd2d58ea5610118dcda06e15be8777397882a882958f0b14671dabb9f91cf82f08d5dbe3e639c2534af5b50a83828a37f552
]
2019-07-31 07:33:44,261 __init__.py:0075 DEBUG write message: [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0x735c15df4f577813b9cba6b682c267cf92914d5f2bc7cad6e3b51c4a9f0c827526e912d4592d41cf8981d7db39ed88f92100922c4864fdd552c1c48b499bb1985fdeef722491bd2d58ea5610118dcda06e15be8777397882a882958f0b14671dabb9f91cf82f08d5dbe3e639c2534af5b50a83828a37f552
]
2019-07-31 07:33:44,369 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x04
]
2019-07-31 07:33:44,380 __init__.py:0082 DEBUG response: [
6: (1 bytes/<class 'bytearray'>) 0x04
]
2019-07-31 07:33:44,395 ip_implementation.py:0443 DEBUG session established
2019-07-31 07:33:44,401 secure_http.py:0073 DEBUG handle request: b'POST /pairings HTTP/1.1\r\nHost: 192.168.1.157:5001\r\nContent-Type: application/hap+json\r\nContent-Length: 44\r\n\r\n\x06\x01\x01\x00\x01\x04\x01$4fadf0b1-80b8-46aa-8b1c-08f7cd3f3df3'
2019-07-31 07:33:45,129 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x02
]
2019-07-31 07:33:45,138 controller.py:0538 DEBUG response data: [[6, bytearray(b'\x02')]]
Pairing for "velux" was removed.
Ok, there is a misunderstanding in the meaning of the -I
parameter. I will opened a ticket to explain that better (#156).
The value of the CO2 sensor being constant 0 seems to be more an issue with the Accessory itself. Can you test with a iOS Device if the value changes there?
I'm not sure the 2.16 is the relevant value: python3 -m homekit.get_accessories -f velux -a velux
1.1: >accessory-information<
1.2: VELUX gateway () >name< [pr]
1.3: VELUX () >manufacturer< [pr]
1.4: VELUX Gateway () >model< [pr]
1.5: g37416e () >serial-number< [pr]
1.6: () >identify< [pw]
1.7: 61 () >firmware.revision< [pr]
1.8: >service<
1.9: 1.1.0 () >version< [pr]
2.1: >accessory-information<
2.2: VELUX Sensor () >name< [pr]
2.3: VELUX () >manufacturer< [pr]
2.4: VELUX Sensor () >model< [pr]
2.5: p0040fd () >serial-number< [pr]
2.7: () >identify< [pw]
2.6: 16 () >firmware.revision< [pr]
2.8: >temperature<
2.9: Temperature sensor () >name< [pr]
2.10: 22.7 () >temperature.current< [pr,ev]
2.11: >humidity<
2.12: Humidity sensor () >name< [pr]
2.13: 68.0 () >relative-humidity.current< [pr,ev]
2.14: >carbon-dioxide<
2.15: Carbon Dioxide sensor () >name< [pr]
2.16: 0 () >carbon-dioxide.detected< [pr,ev]
2.17: 903.0 () >carbon-dioxide.level< [pr,ev]
903 (2.17
) is the value shown in the Velux app.
python3 -m homekit.get_characteristic -f velux -a velux -c 2.17 --log DEBUG
2019-07-31 12:22:04,096 ip_implementation.py:0416 DEBUG init session
2019-07-31 12:22:06,933 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytes'>) b'\x9e\xe0\x0f\xd2\xc9\x0e\xe7\xc4f\x03t\x06\x1d()\xef\x158\xfb\x95\x02\xb2!6\x9cmTn\xde\xe45|'
]
2019-07-31 12:22:06,960 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytearray'>) 0x9ee00fd2c90ee7c4660374061d2829ef1538fb9502b221369c6d546edee4357c
]
2019-07-31 12:22:06,969 __init__.py:0075 DEBUG write message: [
6: (1 bytes/<class 'bytearray'>) 0x01
3: (32 bytes/<class 'bytearray'>) 0x9ee00fd2c90ee7c4660374061d2829ef1538fb9502b221369c6d546edee4357c
]
2019-07-31 12:22:07,546 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x02
3: (32 bytes/<class 'bytearray'>) 0xd7ea58a92eb021f849cf8352a9f06af2afc4348175399759e211be2af81ca87d
5: (101 bytes/<class 'bytearray'>) 0x095ad9eae8838b996880fb9c2a61ef7119de429abae8b6dbf7902ebcc531137c7f0ff0c8981c96c18398f92b22d29e2a9605c6da098060bc1e352803d9cf2d8afb668a91ccf594c5857f0844568fee74765cc8d4422c1e41334c9799900daba15e1fe6a425
]
2019-07-31 12:22:07,556 __init__.py:0082 DEBUG response: [
6: (1 bytes/<class 'bytearray'>) 0x02
3: (32 bytes/<class 'bytearray'>) 0xd7ea58a92eb021f849cf8352a9f06af2afc4348175399759e211be2af81ca87d
5: (101 bytes/<class 'bytearray'>) 0x095ad9eae8838b996880fb9c2a61ef7119de429abae8b6dbf7902ebcc531137c7f0ff0c8981c96c18398f92b22d29e2a9605c6da098060bc1e352803d9cf2d8afb668a91ccf594c5857f0844568fee74765cc8d4422c1e41334c9799900daba15e1fe6a425
]
2019-07-31 12:22:07,676 tlv.py:0117 DEBUG receiving [
1: (17 bytes/<class 'bytearray'>) 0x44333a34453a44423a31453a41453a3433
10: (64 bytes/<class 'bytearray'>) 0xc80ef91969c0106ec4c6ca991c722c2e0c819655eefde5d69d23d66718a6bf1dd610be7901a0aabf27eaefece7b14c7a19f9eea86f4c6dbc7fad03598927cc08
]
2019-07-31 12:22:07,789 tlv.py:0134 DEBUG sending [
1: (36 bytes/<class 'bytes'>) b'5c818b22-5fbd-4f4a-a094-cb736ef53eeb'
10: (64 bytes/<class 'bytes'>) b'\xee\x91\x8f\x1ax>\x02zI/\r^\xe5\xbf\xc7C\xf0\x95?\x8f#W\x1a\xf3\xe2\xa7\x83j\xae\xcfh\xa2(\xa7\xcd\x06\xac\x04\x12\x80|w\xc2p\xbbT:8\x1fl_\xe9\x81xZ\xa1\xeaq\xf8\x89i\xcf\x9c\x04'
]
2019-07-31 12:22:07,902 tlv.py:0134 DEBUG sending [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0xb7a43a000bef4819de462c4a7f96c1df7805363b1c913f41af14c2ba1ceedcd702439b856aed965df79fd66f3e13c4cb6592ea91828900c8f1677a9ad034a9be4b5521590ff88d43676a35dc8306c6d419f7e65e70e426454483e9081da22dddcaea26aa2607280490d425d8bd74157c9641369e059fb7b1
]
2019-07-31 12:22:07,914 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0xb7a43a000bef4819de462c4a7f96c1df7805363b1c913f41af14c2ba1ceedcd702439b856aed965df79fd66f3e13c4cb6592ea91828900c8f1677a9ad034a9be4b5521590ff88d43676a35dc8306c6d419f7e65e70e426454483e9081da22dddcaea26aa2607280490d425d8bd74157c9641369e059fb7b1
]
2019-07-31 12:22:07,925 __init__.py:0075 DEBUG write message: [
6: (1 bytes/<class 'bytearray'>) 0x03
5: (120 bytes/<class 'bytearray'>) 0xb7a43a000bef4819de462c4a7f96c1df7805363b1c913f41af14c2ba1ceedcd702439b856aed965df79fd66f3e13c4cb6592ea91828900c8f1677a9ad034a9be4b5521590ff88d43676a35dc8306c6d419f7e65e70e426454483e9081da22dddcaea26aa2607280490d425d8bd74157c9641369e059fb7b1
]
2019-07-31 12:22:08,032 tlv.py:0117 DEBUG receiving [
6: (1 bytes/<class 'bytearray'>) 0x04
]
2019-07-31 12:22:08,042 __init__.py:0082 DEBUG response: [
6: (1 bytes/<class 'bytearray'>) 0x04
]
2019-07-31 12:22:08,057 ip_implementation.py:0443 DEBUG session established
2019-07-31 12:22:08,064 secure_http.py:0073 DEBUG handle request: b'GET /characteristics?id=2.17 HTTP/1.1\r\nHost: 192.168.1.157:5001\r\n\r\n'
{
"2.17": {
"value": 921.0
}
}
Ah so carbon-dioxide.level
is the current measurement and carbon-dioxide.detected
might be if it is over a threshold?
That could probably be the case - I haven't seen the carbon-dioxide.detected
value change though :-)
We don't have a Home Assistant entity to map HomeKit CO2 sensors to to HomeAssistant sensors, i'm not sure that there is actually any problem on the homekit_python side.
Hey @tleegaard, I"d love to have a PR from you with a filled Template. What do you think?
Absolutely! For now I only have the gateway and the climate sensor up and running. But when the motorized windows are installed I will fill out the template :-)
With help from @Jc2k I have got the CO2 sensor available in Home Assistant now:
Thats cool!
@jlusiardi --> https://github.com/jlusiardi/homekit_python/pull/157
I've managed to pair the Velux Gateway with Home Assistant as Homekit controller, and the device is showing the temperature and humidity sensor, but not the CO2 sensor. I thought I would give this a try, to see the raw output of HomeKit Python:
(For the record - I have only tinkered with KIX300 (gateway) and KLA300 (indoor sensor) for now, as I'm awaiting the motorized windows to be installed)
python3 -m homekit.discover
python3 -m homekit.pair -d D3:4E:DB:1E:AE:43 -p RED-AC-TED -f velux -a velux --log debug
python3 -m homekit.get_accessories -f velux -a velux
Also it won't unpair:
python3 -m homekit.remove_pairing -f velux -a velux -i D3:4E:DB:1E:AE:43
python3 -m homekit.discover