Another component for ZiGate


#162

Ok, That was not the most helpful debug, hopefully this will help:

2018-11-21 19:06:46 WARNING (Thread-3) [zigate] No response after command 0x0120
2018-11-21 19:06:49 WARNING (Thread-3) [zigate] No response after command 0x0120
2018-11-21 19:06:52 WARNING (Thread-3) [zigate] No response after command 0x0120
2018-11-21 19:06:55 WARNING (Thread-3) [zigate] No response after command 0x0120
2018-11-21 19:06:58 WARNING (Thread-3) [zigate] No response after command 0x0100
2018-11-21 19:07:01 WARNING (Thread-3) [zigate] No response after command 0x0100
2018-11-21 19:07:04 WARNING (Thread-3) [zigate] No response after command 0x0100
2018-11-21 19:07:07 WARNING (Thread-3) [zigate] No response after command 0x0100
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 0, ‘data’: 1, ‘name’: ‘zcl_version’, ‘value’: 1}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 1, ‘data’: 2, ‘name’: ‘application_version’, ‘value’: 2}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 2, ‘data’: 1, ‘name’: ‘stack_version’, ‘value’: 1}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 3, ‘data’: 1, ‘name’: ‘hardware_version’, ‘value’: 1}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 4, ‘data’: ‘Philips’, ‘name’: ‘manufacturer’, ‘value’: ‘Philips’}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 5, ‘data’: ‘LTW010’, ‘name’: ‘type’, ‘value’: ‘LTW010’}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 6, ‘data’: ‘20161206’, ‘name’: ‘datecode’, ‘value’: ‘20161206’}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 0, ‘addr’: ‘5eb9’, ‘attribute’: 7, ‘data’: 1, ‘name’: ‘power_source’, ‘value’: 1}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 6, ‘addr’: ‘5eb9’, ‘attribute’: 0, ‘data’: False, ‘name’: ‘onoff’, ‘value’: False}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 8, ‘addr’: ‘5eb9’, ‘attribute’: 0, ‘data’: 254, ‘name’: ‘current_level’, ‘value’: 100}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 768, ‘addr’: ‘5eb9’, ‘attribute’: 2, ‘data’: 0, ‘name’: ‘remaining_time’, ‘value’: 0}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 768, ‘addr’: ‘5eb9’, ‘attribute’: 3, ‘data’: 29011, ‘name’: ‘current_x’, ‘value’: 0.4426727294921875}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 768, ‘addr’: ‘5eb9’, ‘attribute’: 4, ‘data’: 26613, ‘name’: ‘current_y’, ‘value’: 0.4060821533203125}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 768, ‘addr’: ‘5eb9’, ‘attribute’: 7, ‘data’: 343, ‘name’: ‘colour_temperature’, ‘value’: 2915}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 768, ‘addr’: ‘5eb9’, ‘attribute’: 8, ‘data’: 2, ‘name’: ‘colour_mode’, ‘value’: 2}
2018-11-21 19:07:07 DEBUG (Thread-3) [custom_components.zigate] Update attribute for device Device 0017880103d9cfcd (5eb9) LTW010 {‘endpoint’: 11, ‘cluster’: 768, ‘addr’: ‘5eb9’, ‘attribute’: 16, ‘data’: 3, ‘name’: ‘nb_primaries’, ‘value’: 3}


#163

@doudz
I just paired “TRADFRI control outlet” at it appears at light :frowning:
Is it a known issue ?

My Zigate.json :

 {
            "addr": "2cd7",
            "endpoints": [
                {
                    "clusters": [
                        {
                            "attributes": [
                                {
                                    "attribute": 0,
                                    "data": 3,
                                    "name": "zcl_version",
                                    "value": 3
                                },
                                {
                                    "attribute": 1,
                                    "data": 20,
                                    "name": "application_version",
                                    "value": 20
                                },
                                {
                                    "attribute": 2,
                                    "data": 97,
                                    "name": "stack_version",
                                    "value": 97
                                },
                                {
                                    "attribute": 3,
                                    "data": 1,
                                    "name": "hardware_version",
                                    "value": 1
                                },
                                {
                                    "attribute": 4,
                                    "data": "IKEA of Sweden",
                                    "name": "manufacturer",
                                    "value": "IKEA of Sweden"
                                },
                                {
                                    "attribute": 5,
                                    "data": "TRADFRI control outlet",
                                    "name": "type",
                                    "value": "TRADFRI control outlet"
                                },
                                {
                                    "attribute": 6,
                                    "data": "\u0000\u00000\u0001\u0000\u0000\u0000",
                                    "name": "datecode",
                                    "value": "\u0000\u00000\u0001\u0000\u0000\u0000"
                                }
                            ],
                            "cluster": 0
                        },
                        {
                            "attributes": [
                                {
                                    "attribute": 0,
                                    "data": true,
                                    "name": "onoff",
                                    "value": true
                                }
                            ],
                            "cluster": 6
                        },
                        {
                            "attributes": [
                                {
                                    "attribute": 0,
                                    "data": 254,
                                    "name": "current_level",
                                    "value": 100
                                }
                            ],
                            "cluster": 8
                        }
                    ],
                    "device": 266,
                    "endpoint": 1,
                    "in_clusters": [
                        0,
                        3,
                        4,
                        5,
                        6,
                        8,
                        64636
                    ],
                    "out_clusters": [
                        5,
                        25,
                        32
                    ],
                    "profile": 260
                },
                {
                    "clusters": [],
                    "device": 16,
                    "endpoint": 2,
                    "in_clusters": [
                        4096
                    ],
                    "out_clusters": [
                        4096
                    ],
                    "profile": 49246
                },
                {
                    "clusters": [],
                    "device": 97,
                    "endpoint": 242,
                    "in_clusters": [
                        33
                    ],
                    "out_clusters": [
                        33
                    ],
                    "profile": 41440
                }
            ],
            "info": {
                "addr": "2cd7",
                "bit_field": "0100000000000001",
                "descriptor_capability": "00000000",
                "ieee": "000d6ffffe106e35",
                "last_seen": "2018-12-09 14:23:23",
                "mac_capability": "10001110",
                "manufacturer_code": 4476,
                "max_buffer": 82,
                "max_rx": 82,
                "max_tx": 82,
                "rssi": 174,
                "server_mask": 11264
            }
        }

How to convert it to a outlet swith ? :slightly_smiling_face:

Thnaks.


#164

It’s known issue yes, but zigbee data says there’s level control and in Home Assistant world a switch with level control is a light.
if really this device has no level control, I have to find a way to ignore the level information


#165

Now that your componend use iee and not addr anymore, do you advice to remove devices from zigate.json and core.entity_registry to restart discover process ?


#166

from core.entity_registry, why not to have a clean config but not from zigate.json
If you remove entry from zigate.json in many case you should consider pair again your device
Except if IEEE is missing in zigate.json.


#167

Ok finally I have edited entities from gui to respect your new naming conventions.

But after that I’ve update the component to latest version and got this errors in logs:

2018-12-10 14:08:47 DEBUG (SyncWorker_3) [zigate] Try loading persistent file
2018-12-10 14:08:47 INFO (MainThread) [homeassistant.core] Timer:starting
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-10 14:08:47 ERROR (SyncWorker_3) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-10 14:08:47 DEBUG (SyncWorker_3) [zigate] Load success
2018-12-10 14:08:47 INFO (SyncWorker_3) [zigate] Searching ZiGate port
2018-12-10 14:08:47 INFO (SyncWorker_3) [zigate] ZiGate found at /dev/ttyUSB1


#168

Looks like you have a XIAOMI Cube, recent change provide rotation angle, so I suggest you to rotate the cube and the problem will be solved


#169

We can’t hide anything from you :sweat_smile:

But rotate the cube did not change the error.
Do I try to pair it again ?


#170

The problem is in the zigate.json there probably somthing like'expire_value': '' you could try to change it to 'expire_value': 0
or pair it again


#171

I’ve tried this:
shutdown hass

sed -i ‘s/“expire_value”: “”/“expire_value”: 0/’ zigate.json

But after restart I get the error again.
And “expire_value”: “”, is back

The issue is I don’t only have the cube with this issue.
Aqara wall switch with fireline are also impacted as they display also a movement detector (but I don’t think there’s really one )


#172

Oh, you’ll have to replace 'data': '' by 'data': 0 for entries where you set 'expire_value': 0


#173

Sorry but the problem is stil there with more errors:

2018-12-11 08:51:42 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2018-12-11 08:51:42 INFO (MainThread) [homeassistant.core] Timer:starting
2018-12-11 08:51:42 DEBUG (SyncWorker_8) [zigate] Try loading persistent file
2018-12-11 08:51:42 ERROR (SyncWorker_8) [zigate] Failed to eval “round(value, 2)” using “”
2018-12-11 08:51:42 ERROR (SyncWorker_8) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
TypeError: type str doesn’t define round method

2018-12-11 08:51:42 ERROR (SyncWorker_8) [zigate] Failed to eval “cube_decode(value)” using “0”
2018-12-11 08:51:42 ERROR (SyncWorker_8) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 257, in cube_decode
elif value & 0x0080 != 0: # flip180
TypeError: unsupported operand type(s) for &: ‘str’ and ‘int’

2018-12-11 08:51:42 ERROR (SyncWorker_8) [zigate] Failed to eval “cube_decode(value)” using “0”
2018-12-11 08:51:42 ERROR (SyncWorker_8) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 257, in cube_decode
elif value & 0x0080 != 0: # flip180
TypeError: unsupported operand type(s) for &: ‘str’ and ‘int’


#174

I think your zigate.json is incorrect, could you post it here ?


#175

yes sure,

sorry about this, and in fact everything runs fine in hass so no emergency here to be honest.

Thanks


#176

I think the problem is here : https://github.com/biau/HomeAssistantConfig/blob/master/zigate.json#L1072
You should set data: 0.0


#177

looks better but I’ve still one error remaining even after re associate the cube:
2018-12-17 14:22:06 DEBUG (SyncWorker_18) [zigate] Try loading persistent file
2018-12-17 14:22:06 ERROR (SyncWorker_18) [zigate] Failed to eval “cube_decode(value)” using “0”
2018-12-17 14:22:06 ERROR (SyncWorker_18) [zigate] Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 100, in update
‘self’: self})
File “”, line 1, in
File “/config/deps/lib/python3.6/site-packages/zigate/clusters.py”, line 257, in cube_decode
elif value & 0x0080 != 0: # flip180
TypeError: unsupported operand type(s) for &: ‘str’ and ‘int’


#178

Same problem here :


replace "data": "0" by "data": 0.0


#179

Were’s the donate link ?? :wink:

One last question: are you on 0.84 ?


#180

Yes, I’m using 0.84.3, since few minutes :grin:

(And now there’s a donate button, feel free to buy me a beer :wink: )


#181

Excellent ! I’ll upgrade tonight thanks.