madchicken/homebridge-zigbee-nt

getSystemMode in zig-bee-client returns an error

maccoylton opened this issue · 6 comments

Experimenting with using the functions in zig-bee-client to to read attributes, using getSystemMode, I get the error:-

Reading 'system_mode' for 'Office Radiator' failed: 'TypeError: converter.convertGet is not a function'

Can you give me more details about the device you are using?
Also a log from HB could help.

This was on a thermostat device (TRV), will have some time next week to provide additional logs

[13/12/2021, 16:37:30] [ZigBee] Reading KEY 'system_mode' from 'Office Radiator'
[13/12/2021, 16:37:30] [ZigBee] Reading 'system_mode' for 'Office Radiator' failed: 'TypeError: converter.convertGet is not a function'
[13/12/2021, 16:37:30] [ZigBee] TypeError: converter.convertGet is not a function
at ZigBeeClient. (/usr/lib/node_modules/homebridge-zigbee-nt/src/zigbee/zig-bee-client.ts:159:52)
at Generator.next ()
at /usr/lib/node_modules/homebridge-zigbee-nt/dist/zigbee/zig-bee-client.js:8:71
at new Promise ()
at __awaiter (/usr/lib/node_modules/homebridge-zigbee-nt/dist/zigbee/zig-bee-client.js:4:12)
at ZigBeeClient.readDeviceState (/usr/lib/node_modules/homebridge-zigbee-nt/dist/zigbee/zig-bee-client.js:109:16)
at ZigBeeClient. (/usr/lib/node_modules/homebridge-zigbee-nt/src/zigbee/zig-bee-client.ts:482:17)
at Generator.next ()
at /usr/lib/node_modules/homebridge-zigbee-nt/dist/zigbee/zig-bee-client.js:8:71
at new Promise ()

https://www.zigbee2mqtt.io/devices/TS0601_thermostat.html

Could it be something to do with handling of nested attributes as the is part of climate?

If I try with any of the attributes of climate that support get, I see the same

I took a quick look to the device definition in the herdsman converter lib, and to me it seems they forgot some converter and messed up with the documentation. For example I can't find a converter for system_mode even if it is declared as exposed feature. Also, none of the configured properties has a getConverter: this means that none of the properties is readable (you just have the set). This is the reason why you get that error.
I am checking the code in zigbee2MQTT to see if they changed something recently in that part, but I can't find any evidence...

Stale issue message