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

Aqara ZNJLBL01LM don´t show position anymore #23557

Open
matze20211 opened this issue Aug 8, 2024 · 75 comments
Open

Aqara ZNJLBL01LM don´t show position anymore #23557

matze20211 opened this issue Aug 8, 2024 · 75 comments
Labels
problem Something isn't working

Comments

@matze20211
Copy link

What happened?

Aqara ZNJLBL01LM don´t show position anymore

What did you expect to happen?

until one of the lasts updates, the position was shown from 0 - 100%

How to reproduce it (minimal and precise)

changing position slider will not initiate any message about position to mqtt server

Zigbee2MQTT version

1.39.1

Adapter firmware version

20230507

Adapter

Sonoff_Zigbee_3.0_USB_Dongle_Plus

Setup

PI

Debug log

No response

@matze20211 matze20211 added the problem Something isn't working label Aug 8, 2024
@avehome
Copy link

avehome commented Aug 8, 2024

Hi, I have exactly the same. Battery status etc. get all updated, but the device does not respond to open/close.

image

After removing/repairing the device, I can controle it again. I'll keep an eye on it for a while...

@Cameleon99
Copy link

Cameleon99 commented Aug 16, 2024

Same here, not sure what update changed it, position is always reported as 0 now. Previously it would be reported as 0 after moving, but and if you did a manual GET on the MQTT topic with payload below, this would force the current position to be refreshed, but this no longer appears to do anything.

GET payload from NodeRed - {"topic":"zigbee2mqtt/Office Blind/get","payload":"{"position": ""}"}

Also when you hit the 'refresh' button on Position the Z2M devices GUI under the Exposes tab, I can't see a message in the log, nor on the queue using MQTT Explorer. But if I change the position via the slider, a message appears in the log and MQTT explorer.

Hitting the 'Battery' refresh icon causes a message in the log and on MQTT Explorer. Hitting 'State' does nothing.

So something is happening specially with the position reporting and state? Setting position by the slider and calling open/close make the blind move, so they work.

@Cameleon99
Copy link

Cameleon99 commented Aug 17, 2024

Does this help from the logs? When I call position (this used to work), I get an error:

[2024-08-17 15:59:01] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Blind/get' with data '{"position":""}'
[2024-08-17 15:59:01] debug: z2m: Publishing get 'get' 'position' to 'Kitchen Blind'
[2024-08-17 15:59:01] debug: zhc:lumi: Not reading position of ZNJLBL01LM since device doesn't support it

Having a dig around, I found that if I manually read via the dev console - 'genAnalogOutput' : 'presentValue' I get this in the logs and the position value is updated. Forgive me if there are extra messages mixed in, I'm not 100% sure what I'm doing here!

2024-08-17 16:25:13] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Blind/1/set' with data '{"read":{"attributes":["presentValue"],"cluster":"genAnalogOutput","options":{}}}'
[2024-08-17 16:25:13] debug: z2m: Publishing 'set' 'read' to 'Kitchen Blind'
[2024-08-17 16:25:13] debug: zh:controller:endpoint: ZCL command 0x54ef4410006bb58d/1 genAnalogOutput.read(["presentValue"], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
[2024-08-17 16:25:13] debug: zh:zstack: sendZclFrameToEndpointInternal 0x54ef4410006bb58d:47304/1 (0,0,2)
[2024-08-17 16:25:13] debug: zh:zstack:znp: SREQ: --> AF - dataRequest - {"dstaddr":47304,"destendpoint":1,"srcendpoint":1,"clusterid":13,"transid":149,"options":0,"radius":30,"len":5,"data":{"type":"Buffer","data":[16,55,0,85,0]}}
[2024-08-17 16:25:13] debug: zh:zstack:unpi:writer: --> frame [254,15,36,1,200,184,1,1,13,0,149,0,30,5,16,55,0,85,0,171]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2024-08-17 16:25:13] debug: zh:zstack:znp: SRSP: <-- AF - dataRequest - {"status":0}
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext []
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,149,83]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,149,83]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,149] - 83
[2024-08-17 16:25:13] debug: zh:zstack:znp: AREQ: <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":149}
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext []
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: <-- [254,25,68,129,0,0,32,0,7,151,35,1,0,123,0,10,121,131,0,0,5,24,54,11,0,0,166,104,28,55]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext [254,25,68,129,0,0,32,0,7,151,35,1,0,123,0,10,121,131,0,0,5,24,54,11,0,0,166,104,28,55]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --> parsed 25 - 2 - 4 - 129 - [0,0,32,0,7,151,35,1,0,123,0,10,121,131,0,0,5,24,54,11,0,0,166,104,28] - 55
[2024-08-17 16:25:13] debug: zh:zstack:znp: AREQ: <-- AF - incomingMsg - {"groupid":0,"clusterid":32,"srcaddr":38663,"srcendpoint":35,"dstendpoint":1,"wasbroadcast":0,"linkquality":123,"securityuse":0,"timestamp":8616202,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[24,54,11,0,0]}}
[2024-08-17 16:25:13] debug: zh:controller: Received payload: clusterID=32, address=38663, groupID=0, endpoint=35, destinationEndpoint=1, wasBroadcast=false, linkQuality=123, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"manufacturerCode":null,"transactionSequenceNumber":54,"commandIdentifier":11},"payload":{"cmdId":0,"statusCode":0},"command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}}
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext []
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: <-- [254,31,68,129,0,0,13,0,200,184,1,1,0,132,0,51,124,131,0,0,11,24,55,1,85,0,0,57,0,0,200,66,187,107,28,224]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext [254,31,68,129,0,0,13,0,200,184,1,1,0,132,0,51,124,131,0,0,11,24,55,1,85,0,0,57,0,0,200,66,187,107,28,224]
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --> parsed 31 - 2 - 4 - 129 - [0,0,13,0,200,184,1,1,0,132,0,51,124,131,0,0,11,24,55,1,85,0,0,57,0,0,200,66,187,107,28] - 224
[2024-08-17 16:25:13] debug: zh:zstack:znp: AREQ: <-- AF - incomingMsg - {"groupid":0,"clusterid":13,"srcaddr":47304,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":132,"securityuse":0,"timestamp":8617011,"transseqnumber":0,"len":11,"data":{"type":"Buffer","data":[24,55,1,85,0,0,57,0,0,200,66]}}
[2024-08-17 16:25:13] debug: zh:controller: Received payload: clusterID=13, address=47304, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=132, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"manufacturerCode":null,"transactionSequenceNumber":55,"commandIdentifier":1},"payload":[{"attrId":85,"status":0,"dataType":57,"attrData":100}],"command":{"ID":1,"name":"readRsp","parameters":[{"name":"attrId","type":33},{"name":"status","type":32},{"name":"dataType","type":32,"conditions":[{"type":"statusEquals","value":0}]},{"name":"attrData","type":1000,"conditions":[{"type":"statusEquals","value":0}]}]}}
[2024-08-17 16:25:13] debug: zh:zstack:unpi:parser: --- parseNext []
[2024-08-17 16:25:13] debug: z2m: Received Zigbee message from 'Kitchen Blind', type 'readResponse', cluster 'genAnalogOutput', data '{"presentValue":100}' from endpoint 1 with groupID 0
[2024-08-17 16:25:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Blind', payload '{"battery":88,"charging_status":false,"device_temperature":null,"last_seen":"2024-08-17T15:25:13.516Z","linkquality":132,"motor_speed":"high","motor_state":null,"position":100,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
[2024-08-17 16:25:13] info: zhc:tz: Read result of 'genAnalogOutput': {"presentValue":100}

@Cameleon99
Copy link

I've also noticed that when changing the position MQTT is not reporting updates to the state, it is always STOP and always has the position as the old position. When I call 'genAnalogOutput' : 'presentValue' from the dev console, I then get the correct position in the logs.

I can see here - https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/lib/lumi.ts#L4699 - that ZNJLBL01LM has been excluded from polling the position and instead waits for the STOP event, but I don't believe that is coming for some reason and thus position is not updated.

It's also where the position call is erroring: "Not reading position of ZNJLBL01LM since device doesn't support it" - from here - https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/lib/lumi.ts#L4751

This may have caused it somehow or be related: #23056

@Koenkk can you help?

@Koenkk
Copy link
Owner

Koenkk commented Aug 18, 2024

Could you provide the debug log when changing the position and it doesn't update?

See this on how to enable debug logging.

@Cameleon99
Copy link

Cameleon99 commented Aug 18, 2024

@Koenkk - Thanks for looking. Sorry this seems to have a lot of other noise in it but left it so you can see all the messages. I took the blind from ~50% to fully open (100%). You can see in the logs the request to move to position 100 but later a message with position 77 which is what it shows in HA.

The blind is 'Kitchen Blind'

z2m_log.txt

@Koenkk
Copy link
Owner

Koenkk commented Aug 19, 2024

@Cameleon99 what was the last known working z2m version? Can you revert to that and post the debug log when changing the position?

@Cameleon99
Copy link

I don't think they ever has worked properly, I've never seen it update the status, or give updates to position. But the manual call to get position on MQTT would work as a workaround. What I was doing was catching the events in NodeRed from HA that were calling the blind to change position or open/close and for the next minute call get position every few seconds so that it looked like it was being updated automatically. With some recent change, we are now getting the error 'zhc:lumi: Not reading position of ZNJLBL01LM since device doesn't support it' which I can see in the code as linked above. I don't know when it happened as largely the blinds are fully automated, I have a light sensor outside and the all open/close with light levels. I just noticed recently that sometimes they wouldn't open or close automatically, and assumed it was an issue with Zigbee network or my coding, but then realised when I manually called get position, it was not returning anything any more. And I checked the position before opening/closing them which when they reported they were already open/closed, it meant the code did nothing. For now I've removed that check (it was there because some old blinds I had if they were open and you tried to open them, they would go full circle and try to close partially again, but these Sonoff ones don't do that)

Maybe there is something else wrong with my setup that means I can't get the state? I'm hesitant to try and update the F/W on the Zigbee stick as everything else works and calling from the dev console to fetch the position also works. Seems its been artificially restricted for some reason? Its a Sonoff ZBDongle-P (CC2652P) as far as I can tell, bought in May 2022.

@Koenkk
Copy link
Owner

Koenkk commented Aug 20, 2024

Can you see if reconfiguring the device via the z2m frontend fixes the issue? (yellow refresh button)

@matze20211
Copy link
Author

I m not shure witch old z2m worked, i will test it too.

matze

@Cameleon99
Copy link

Can you see if reconfiguring the device via the z2m frontend fixes the issue? (yellow refresh button)

As requested but hasn't made any difference.

Below, I run 3 commands (nothing in between), reconfigure, then tell it to open to 50 (which only puts one line in the log when I request it and at position 100), then after its finished moving (and no update), I did a read of 'genAnalogOutput' : 'presentValue' on the dev console and then it responds with 51%

info 2024-08-20 20:51:44z2m: Successfully configured 'Kitchen Blind'
info 2024-08-20 20:51:44z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/configure', payload '{"data":{"id":"Kitchen Blind"},"status":"ok","transaction":"k4jtk-1"}'

info 2024-08-20 20:52:04z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Blind', payload '{"battery":84,"charging_status":false,"device_temperature":null,"last_seen":"2024-08-20T19:52:04.618Z","linkquality":126,"motor_speed":"high","motor_state":null,"position":100,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

info 2024-08-20 20:52:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Blind', payload '{"battery":84,"charging_status":false,"device_temperature":null,"last_seen":"2024-08-20T19:52:59.071Z","linkquality":126,"motor_speed":"high","motor_state":null,"position":51,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

So it can get the position but we get no update on it moving, state is always STOP and running is null.

I also tried to go from position 51 to 0 and repeatedly called read of 'genAnalogOutput' : 'presentValue' from Dev Console while it was moving, the logs show the position go from 51 to 0 with no steps and keeps reporting position 0 as its still moving, state is STOP and running is null.

@Cameleon99
Copy link

Is it worth me upgrading the f/w? Been researching it a bit and for some reason I thought I needed a serial connection for it and a lot of poking about but it seems quite easy to just dismantle the stick, connect it to USB while holding the flash button and run the s/w to flash it.

Seems there are multiple options, what's the easiest/least error prone for CC2652P?

@ikeros
Copy link

ikeros commented Aug 21, 2024

Similar problems here. Rollers can be controller, opened and closed as expected, either via frontend or MQTT, no problems there. But all rollers seem to be stuck to the same position as they were before update.

I have similar experience with @Cameleon99. Position reporting has never worked properly. I was also using a workaround and called get state to expose new final location after 5 seconds delay to moving event. I have noticed some "random" state updates (once a day), but you can not rely on them, because it's not happening every time when roller is moving or stopped moving.

I just did an upgrade to the latest version last week. My previous backup was dated 16.6.2023 so probably version 1.31.0 (2023-06-01) was working correctly (with my workaround). Haven't tested anything between.

@matze20211
Copy link
Author

The position reporting has worked for me before, i don t know witch version.

@Koenkk
Copy link
Owner

Koenkk commented Aug 22, 2024

Could you try to bind all clusters to the coordinator and see if that helps (source endpoint should be 1)? It can be done from the frontend, example:

Screenshot 2024-08-22 at 22 11 03

@matze20211
Copy link
Author

No change, still no Position mrssage.

@Cameleon99
Copy link

Same here, no change. I have 3 of them and they all behave the same.

@Koenkk
Copy link
Owner

Koenkk commented Aug 26, 2024

Could you check if the issue is fixed with the following external converter:

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m,
  • in the frontend, check if the description of this device now ends with CUSTOM (this indicates the external converter has been loaded correctly)
  • check if issue is fixed

@Cameleon99
Copy link

Tried it and no change I'm afraid.

I couldn't see custom in the name, so took a look in the converter file and saw the description didn't include it, so added it to check it was being loaded and it is. Is the linked definitely for the custom converter?

@matze20211
Copy link
Author

here the same

@Koenkk
Copy link
Owner

Koenkk commented Aug 28, 2024

I updated the description, can you check if it is correctly loaded now?

@Cameleon99
Copy link

Correctly loaded with CUSTOM in description. No change in behaviour or logs, log only updates (in debug) on call to change position/open/close, no update to position.

What should we be seeing?

@Koenkk
Copy link
Owner

Koenkk commented Aug 30, 2024

Made a mistake, updated https://gist.github.com/Koenkk/c9d93a35cd8bfcd984ff138fe8f29e24, with this the position should immediately update when you set it.

@Cameleon99
Copy link

Cameleon99 commented Aug 30, 2024

Tried the new one and getting errors. Not sure why as I can see the bit that calls isString hasn't changed?

[2024-08-30 20:25:49] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Blind/set' with data '{ "position": 11 }'
[2024-08-30 20:25:49] debug: z2m: Publishing 'set' 'position' to 'Kitchen Blind'
[2024-08-30 20:25:49] error: z2m: Publish 'set' 'position' to 'Kitchen Blind' failed: 'ReferenceError: isString is not defined'
[2024-08-30 20:25:49] debug: z2m: ReferenceError: isString is not defined
at Object.convertSet (/app/data/extension/externally-loaded.js:48:17)
at Publish.onMQTTMessage (/app/lib/extension/publish.ts:277:52)
at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:23)
at EventEmitter.emit (node:events:529:35)
at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:115:22)
at MQTT.onMessage (/app/lib/mqtt.ts:147:27)
at MqttClient.emit (node:events:517:28)
at handlePublish (/app/node_modules/mqtt/src/lib/handlers/publish.ts:172:11)
at handle (/app/node_modules/mqtt/src/lib/handlers/index.ts:31:17)
at work (/app/node_modules/mqtt/src/lib/client.ts:762:17)
[2024-08-30 20:25:49] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'position' to 'Kitchen Blind' failed: 'ReferenceError: isString is not defined'","meta":{"friendly_name":"Kitchen Blind"},"type":"zigbee_publish_error"}'

@Cameleon99
Copy link

@Koenkk any ideas why I'm getting the error above?

@matze20211
Copy link
Author

i dont have these error, but the position is not updated with the new external converter

@Koenkk
Copy link
Owner

Koenkk commented Sep 2, 2024

@Cameleon99
Copy link

@Cameleon99 updated https://gist.github.com/Koenkk/c9d93a35cd8bfcd984ff138fe8f29e24, can you try again?

Thanks, solved the previous error but new one snuck in:

z2m: Publish 'get' 'position' to 'Office Blind' failed: 'ReferenceError: NS is not defined'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'get' 'position' to 'Office Blind' failed: 'ReferenceError: NS is not defined'","meta":{"friendly_name":"Office Blind"},"type":"zigbee_publish_error"}'

@Cameleon99
Copy link

Better but some weird behaviour.

  1. If CLOSED/OPEN, hit OPEN/CLOSE, then STOP, position reports OK and HA says Open (correct)
  2. If OPEN and I hit CLOSE, blind physically closes fully, and position reports as 0 but in HA says Open still (incorrect)
  3. If drag slider to 0, position reports as 0% and HA says Closed (correct).
  4. If I hit STOP when incorrectly stating OPEN/CLOSED updates correctly.

Logs:

Blind OPEN, request 84% - shows 84% - CORRECT

info 2024-09-05 21:23:23z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:23:23.230Z","linkquality":51,"motor_speed":"high","motor_state":null,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
info 2024-09-05 21:23:23z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:23:23.230Z","linkquality":51,"motor_speed":"high","motor_state":null,"position":84,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

Blind OPEN, request CLOSE (leave running)

info 2024-09-05 21:24:36z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:24:36.654Z","linkquality":45,"motor_speed":"high","motor_state":null,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
info 2024-09-05 21:24:36z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:24:36.654Z","linkquality":45,"motor_speed":"high","motor_state":null,"position":0,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

Hit STOP while running - position shows 46% - CORRECT

info 2024-09-05 21:24:45z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:24:45.847Z","linkquality":51,"motor_speed":"high","motor_state":null,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
info 2024-09-05 21:24:46z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:24:46.420Z","linkquality":48,"motor_speed":"high","motor_state":null,"position":46,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
info 2024-09-05 21:24:46z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:24:46.420Z","linkquality":48,"motor_speed":"high","motor_state":null,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

Hit CLOSE - left to fully close - position reported as 0 - HA shows 0% but Open - INCORRECT

info 2024-09-05 21:26:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:26:59.747Z","linkquality":51,"motor_speed":"high","motor_state":null,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
info 2024-09-05 21:26:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:26:59.747Z","linkquality":51,"motor_speed":"high","motor_state":null,"position":0,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

Hit STOP - position shows as 0 and HA shows Closed. - CORRECT

info 2024-09-05 21:26:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:26:59.747Z","linkquality":51,"motor_speed":"high","motor_state":null,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
info 2024-09-05 21:26:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Office Blind', payload '{"battery":42,"charging_status":false,"device_temperature":null,"last_seen":"2024-09-05T20:26:59.747Z","linkquality":51,"motor_speed":"high","motor_state":null,"position":0,"running":null,"state":"STOP","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'

Hopefully that makes sense!

@Koenkk
Copy link
Owner

Koenkk commented Sep 5, 2024

@matze20211
Copy link
Author

I don't have HA, but the end-position is shown correctly in FHEM and GUI , state always "STOP" after finishing "CLOSE" or "OPEN"

@Cameleon99
Copy link

Can you try with https://gist.github.com/Koenkk/c9d93a35cd8bfcd984ff138fe8f29e24 ?

Now from Open/100% (HA) doing CLOSE then STOP, it now reports Closed/0% in HA, position 0, but I can see this error which is probably stopping it getting the actual position.

error 2024-09-06 09:17:36z2m: Exception while calling fromZigbee converter: precisionRound is not defined}

@Koenkk
Copy link
Owner

Koenkk commented Sep 6, 2024

@lskeet
Copy link

lskeet commented Oct 8, 2024

@Cameleon99 fixed the error: https://gist.github.com/Koenkk/c9d93a35cd8bfcd984ff138fe8f29e24

Thanks @Koenkk.
I have tested the latest converter and it reports the current position correctly when stopped.
Note scenario 2 & 3 below where it would be ideal if it's possible to report that it's running/opening/closing but it is likely out of scope of this issue?

Tested:

  1. OPEN (100) > CLOSE
  2. OPEN > CLOSE (with STOP in between) It reports as Closed @ 0% while closing and updates to the correct position & state once stopped
  3. CLOSE > OPEN (with STOP in between) It reports as Open @ 100% while opening and updates to the correct position & state once stopped
  4. CLOSE > OPEN
  5. Specific position % change

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Oct 10, 2024
@Koenkk
Copy link
Owner

Koenkk commented Oct 10, 2024

Integrated the fix!

would be ideal if it's possible to report that it's running/opening/closing

I see it already exposes a running value, doesn't this work?

@lskeet
Copy link

lskeet commented Oct 10, 2024

I see it already exposes a running value, doesn't this work?

It's reporting null no matter how I operate the device:

{
    "battery": 95,
    "linkquality": 42,
    "motor_speed": "high",
    "position": 0,
    "state": "CLOSE",
    "update": {
        "installed_version": 3870,
        "latest_version": 3870,
        "state": "idle"
    },
    "update_available": false,
    "charging_status": null,
    "device_temperature": null,
    "motor_state": null,
    "running": null
}

@matze20211
Copy link
Author

That was my question, before 1.39 (?), the Position was reported from 0 to 100, i used it for animation of Rollers.

@Koenkk
Copy link
Owner

Koenkk commented Oct 10, 2024

@lskeet could you provide the debug log when closing the cover?

@matze20211 could you provide the debug log when the position was updated continuously pre 1.39?

See this on how to enable debug logging.

@matze20211
Copy link
Author

I cannot install a version lower than 1.31, with 1.31 the position is also not displayed.
but I am now unsure whether there really was a current position message with this device. I also have some TREDANSEN with which this works wonderfully. I may have mixed something up here. I am sorry.

@lskeet
Copy link

lskeet commented Oct 12, 2024

@Koenkk is this what you're after? Hope I managed to filter out the noise from other devices correctly


[2024-10-12 18:26:57] debug: 	z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Bedroom Shades/set' with data 'CLOSE'
[2024-10-12 18:26:57] debug: 	z2m: Publishing 'set' 'state' to 'Bedroom Shades'
[2024-10-12 18:26:57] debug: 	zh:controller:endpoint: ZCL command 0x54ef4410004a6959/1 genAnalogOutput.write({"presentValue":0}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false})
[2024-10-12 18:26:57] debug: 	zh:zstack: sendZclFrameToEndpointInternal 0x54ef4410004a6959:39060/1 (0,0,1)
[2024-10-12 18:26:57] debug: 	zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":39060,"destendpoint":1,"srcendpoint":1,"clusterid":13,"transid":24,"options":0,"radius":30,"len":10,"data":{"type":"Buffer","data":[16,22,2,85,0,57,0,0,0,0]}}
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:writer: --> frame [254,20,36,1,148,152,1,1,13,0,24,0,30,10,16,22,2,85,0,57,0,0,0,0,84]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2024-10-12 18:26:57] debug: 	zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,24,222]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,24,222]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,24] - 222
[2024-10-12 18:26:57] debug: 	zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":24}
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: <-- [254,24,68,129,0,0,13,0,148,152,1,1,0,90,0,122,78,31,0,0,4,24,22,4,0,85,72,28,162]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --- parseNext [254,24,68,129,0,0,13,0,148,152,1,1,0,90,0,122,78,31,0,0,4,24,22,4,0,85,72,28,162]
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --> parsed 24 - 2 - 4 - 129 - [0,0,13,0,148,152,1,1,0,90,0,122,78,31,0,0,4,24,22,4,0,85,72,28] - 162
[2024-10-12 18:26:57] debug: 	zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":13,"srcaddr":39060,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":90,"securityuse":0,"timestamp":2051706,"transseqnumber":0,"len":4,"data":{"type":"Buffer","data":[24,22,4,0]}}
[2024-10-12 18:26:57] debug: 	zh:controller: Received payload: clusterID=13, address=39060, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=90, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":22,"commandIdentifier":4},"payload":[{"status":0}],"command":{"ID":4,"name":"writeRsp","parameters":[{"name":"status","type":32},{"name":"attrId","type":33,"conditions":[{"type":"statusNotEquals","value":0}]}]}}
[2024-10-12 18:26:57] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-10-12 18:26:57] info: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Bedroom Shades', payload '{"battery":86,"charging_status":null,"device_temperature":null,"linkquality":90,"motor_speed":"high","motor_state":null,"position":0,"running":null,"state":"OPEN","update":{"installed_version":3870,"latest_version":3870,"state":"idle"},"update_available":false}'
[2024-10-12 18:27:52] debug: 	zh:zstack:unpi:parser: <-- [254,5,69,196,97,242,1,202,55,235]
[2024-10-12 18:27:52] debug: 	zh:zstack:unpi:parser: --- parseNext [254,5,69,196,97,242,1,202,55,235]
[2024-10-12 18:27:52] debug: 	zh:zstack:unpi:parser: --> parsed 5 - 2 - 5 - 196 - [97,242,1,202,55] - 235
[2024-10-12 18:27:52] debug: 	zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd - {"dstaddr":62049,"relaycount":1,"relaylist":[14282]}
[2024-10-12 18:27:52] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-10-12 18:28:04] debug: 	zh:zstack:unpi:parser: <-- [254,5,69,196,148,152,1,85,72,148]
[2024-10-12 18:28:04] debug: 	zh:zstack:unpi:parser: --- parseNext [254,5,69,196,148,152,1,85,72,148]
[2024-10-12 18:28:04] debug: 	zh:zstack:unpi:parser: --> parsed 5 - 2 - 5 - 196 - [148,152,1,85,72] - 148
[2024-10-12 18:28:04] debug: 	zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd - {"dstaddr":39060,"relaycount":1,"relaylist":[18517]}
[2024-10-12 18:28:04] debug: 	zh:zstack:unpi:parser: --- parseNext []

@Koenkk
Copy link
Owner

Koenkk commented Oct 13, 2024

It seems the device does not publish the running state (could be that there are multiple revisions of this device), the device also doesn't publish anything when it stops.

@matze20211
Copy link
Author

debug log with v31
log_v.31.txt

@lskeet
Copy link

lskeet commented Oct 15, 2024

It seems the device does not publish the running state (could be that there are multiple revisions of this device), the device also doesn't publish anything when it stops.

@Koenkk Is there something I can do to confirm that? Or could I force an update from the device?

May I also ask how or what are you looking for when you're looking at the logs in terms of the running state? Maybe I can try different permutations of operations that might somehow publish a running state without me bombarding this thread with a wall of log.

@Koenkk
Copy link
Owner

Koenkk commented Oct 15, 2024

You should see a "Received zigbee message" when closing/opening

@matata86
Copy link

matata86 commented Nov 2, 2024

After updating z2m to version 1.41.0, I can see the position of the blinds, but the open and close states don’t behave correctly. Also, if I start controlling the device manually, the state doesn’t update in z2m. The state only updates after I call stop, open, or close from z2m. The motor state and running attributes are also still empty.

@lskeet
Copy link

lskeet commented Nov 3, 2024

I'm experiencing the same issue as @matata86 as well.
@Koenkk was there a difference between the converter file and what was released?
I didn't experience the same issues when using the external converter file.

@fsecko1
Copy link

fsecko1 commented Nov 3, 2024

I have the same problem. The update status only happens after STOP is called from Z2m

@Koenkk
Copy link
Owner

Koenkk commented Nov 3, 2024

Interesting, does it work when using the converter file?

@matata86
Copy link

matata86 commented Nov 3, 2024

@Koenkk I'm using a ConBee III (with the latest firmware), can I use a converter with this coordinator?

I'm trying this code:
https://gist.github.com/Koenkk/c9d93a35cd8bfcd984ff138fe8f29e24

Do I have it set up correctly?

I don't see any changes.
image

@Koenkk
Copy link
Owner

Koenkk commented Nov 4, 2024

That's correct, you should CUSTOM in the device description on the about page

@matata86
Copy link

matata86 commented Nov 4, 2024

Yes, it was there. Unfortunately, no change in the device's behavior.

Copy link
Contributor

github-actions bot commented Jan 4, 2025

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jan 4, 2025
@bkonings
Copy link

bkonings commented Jan 4, 2025

I have the same issue, the bot is wrong this is not stale

@github-actions github-actions bot removed the stale Stale issues label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants