Bticino K4027C cover position not working
What happened?
I added to Zigbee2Mqtt my 6 covers Bticino K4027C; the problem is that the setting of cover position does not work; works only 0-100 for open or close.
This is the status JSON: { "linkquality": 128, "position": 100, "state": "CLOSE", "tilt": 0, "update": { "installed_version": 3556351, "latest_version": 3556351, "state": "idle" }, "action": null, "led_in_dark": null, "update_available": null }
And I have not activated "No position support" because in this JSON I see that I have the latest version.
What did you expect to happen?
The cover sets the right position.
How to reproduce it (minimal and precise)
Add a new BTicino device and try to set the position.
Zigbee2MQTT version
1.33.1-1
Adapter firmware version
7.3.1.0 build 176
Adapter
EZSP v12 SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2
Debug log
No response
Also, I found that in the new release of ZigBee2MQTT there is this commit: https://github.com/Koenkk/zigbee-herdsman-converters/pull/6333... Could this be ported also for Bticino K4027C?
Thank you.
@Koenkk @FabianMangold I opened yesterday this issue after seeing your pull request and I would integrate it into K4027C, because the cover position and the calibration is not working (I don't know il tilt works, I have covers without tilt)... How did you approach the debug of NLLV firmware and the tries you did for make this working? I would debug how it works in the app and replicate it in Zigbee2MQTT.
I see from logs of Netatmo plugin in Home Assistant this: 2023-11-03 11:47:33.293 DEBUG (MainThread) [pyatmo.home] Setting state for home (62134d6bd95995623b03a8ba) according to {'modules': [{'id': '---', 'target_position': 49, 'bridge': ---'}]} (I removed MAC addresses from component and bridge).
HI @syntesys87, Thanks for opening this new issue, much appreciated.
Just to be on the same page, you are running HA with Z2M right ? I am not familiar with this setup, but the PR ended up in the Zigbee-herdsman-converters 15.105.0 and is thus available in the latest stable release of Z2m (v1.33.2). Can you please let us know which version of Z2M you are running ? The switch should now be detected as a Legrand 067776A and bring all the features you are looking for.
Thanks your feedback.
Thank you for the support! I'm using 1.33.2 with HomeAssistant 2023.11.0, last version of everything. Everything is connected to ITEAD Sonoff ZBDongle-E (ZigBee 3.0 USB Dongle Plus v2) with last firmware. The device is recognized (after last update of Z2M) as 067776A. The device works only on up-down-stop, automatic calibration in classic_nllv is not working, works on specific_nllv (but useless, because the position after calibration doesn't work), not working in manual with temporal and venetian.
My pleasure, thanks for the update. It makes more sense now. I've updated the comment regarding the calibration modes in the PR#6333. Basically, classic_nllv seems to be identical to up_down_stop, no calibration required. specific_nllv is the mode that features the automatic calibration. You may need to calibrate the blind several time before achieving good results, but i found the temporal mode to be more precise as well! Z2M doesn't do anything here, it merely sets the switch in the right mode, the "rest" is done by the switch firmware itself. We can only hope that newer firmware versions may improve those calibration methods. When you say the manual temporal / venetian calibration does not work, do you mean the "calibration procedure" or the results afterwards ?
I mean the calibration procedure, I tested temporal yesterday, following this: "Once the blind is in the up position, start the calibration by pressing and holding the down button, until the blind reaches to bottom stop. Once there, the relay should click. " At the end, the relay does not click. If I follow the procedure, the blind does not move anymore, also pressing physical buttons.
Okay, that might be somewhat different on the Bticino. Just skip that part, and continue. Do you have an original gateway and the corresponding app ? If so, you could try to calibrate the device using those "tools" and update our procedures. Again, those procedures were determined OK for the Legrand 067776 / 067776A "only".
It seems that when I press the reset button for run the association, it loses the calibration; I already tested readding to original gateway, calibrating and readding to zigbee2mqtt, but this does not work.
The calibration is "stored" in the switch, and re-associating indeed seems to clear those values. Nevertheless, can you try the "same calibration" procedure once the device is associate to Z2M ? Is the procedure any different from the one that we had described in the PR ticket ?
The procedure is the same, on original app it runs an automatic calibration and then it works. With Z2M I set the shutter in specific_nllv mode and it runs automatic calibration... The procedure seems the same! In the process there are two things different: the red led does not turn off after the association with Z2M and if I hold up+down button for ten seconds, it doesn't run automatic calibration
I was actually tallking about the manual calibration process, not the automatic one. "What" does work when your use the original app ? The position report ?
Regarding the LED, there is another thread / user reporting the same issue, which i cannot reproduce on my own devices. (See https://github.com/Koenkk/zigbee2mqtt/issues/19108#). Why would you press Up+Down? Switching modes via Z2M is sufficient to bring the switch into the calibration mode, there is no need for physically pressing the buttons.
Yes, but tried also original method for seeing the result. Regarding manual mode, from BTicino it works in this mode: press down button until it closes, press up button until it opens, press down button until the blind touches the window surface, press up button to reopen... But setting temporal mode, after I press the up button, it exit from calibration procedure.
OK for the calibration, to be investigated.
Yes, but tried also original method for seeing the result. What does "Yes" refer to?
- Does the position report work after the automatic calibration ? Does it as reliably in Z2M as it does in the original app
- Just to confirm: Tilt doesn't work in that mode right ? Neither in Z2M nor with the original GW
Yes was an ok for the up+down press for calibration 😁 After automatic calibration, it continues to report 0-100-50 (open, close, other positions), not, for example, 27 or 69. I don't have blinds with tilt, only up-down.
Sorry for the stupid questions, just making sure we are talking about the same things.
Okay, that is really odd, the automatic calibration or temporal mode should actually enable proper position reporting. Is this also the case with the original GW or only Z2M ?
With Z2M seems that is not working, with original GW everything works as expeced; also, the position reporting works well with the original Netatmo integration in Home Assistant.
If you want/need, I can do some video and post here.
Can you provide you database.db here please ?
No problem, do you need it with a shutter configured? Because, at the moment, they are all connected with original GW.
Yes please, whenever you have time, no hurry. And please retry the temporal calibration. I've updated the procedure, just realized that there was a typo in there. :) Thanks a lot