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

Bticino K4027C cover position not working #19509

Closed
syntesys87 opened this issue Nov 1, 2023 · 81 comments
Closed

Bticino K4027C cover position not working #19509

syntesys87 opened this issue Nov 1, 2023 · 81 comments
Labels
problem Something isn't working

Comments

@syntesys87
Copy link

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

@syntesys87 syntesys87 added the problem Something isn't working label Nov 1, 2023
@syntesys87
Copy link
Author

Also, I found that in the new release of ZigBee2MQTT there is this commit: Koenkk/zigbee-herdsman-converters#6333... Could this be ported also for Bticino K4027C?

Thank you.

@syntesys87
Copy link
Author

syntesys87 commented Nov 3, 2023

@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).

@FabianMangold
Copy link
Contributor

FabianMangold commented Nov 3, 2023

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.

@syntesys87
Copy link
Author

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.

@FabianMangold
Copy link
Contributor

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 ?

@syntesys87
Copy link
Author

syntesys87 commented Nov 3, 2023

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.

@FabianMangold
Copy link
Contributor

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".

@syntesys87
Copy link
Author

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.

@FabianMangold
Copy link
Contributor

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 ?

@syntesys87
Copy link
Author

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

@FabianMangold
Copy link
Contributor

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 #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.

@syntesys87
Copy link
Author

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.

@FabianMangold
Copy link
Contributor

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

@syntesys87
Copy link
Author

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.

@FabianMangold
Copy link
Contributor

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 ?

@syntesys87
Copy link
Author

syntesys87 commented Nov 3, 2023

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.

@FabianMangold
Copy link
Contributor

Can you provide you database.db here please ?

@syntesys87
Copy link
Author

No problem, do you need it with a shutter configured? Because, at the moment, they are all connected with original GW.

@FabianMangold
Copy link
Contributor

FabianMangold commented Nov 3, 2023

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

@syntesys87
Copy link
Author

database.db.zip

Here attached the file. Now i try temporal mode :)

@syntesys87
Copy link
Author

syntesys87 commented Nov 3, 2023

This is the video of the temporal try. When it starts, it goes on red led and then the switch sets into up_down_stop.

@FabianMangold
Copy link
Contributor

Can you please leave the system running for a while and re-upload the database.db ? Unfortunately it doesn't contain yet any attributes, which makes it kind of worthless for now.
Thanks a lot.

@FabianMangold
Copy link
Contributor

Thanks for the video, that helps :)
Can you switch it to temporal, and really wait for the blind to go to the upper stop. Once it is there, give it a couple of seconds, and then press the switch. Just don't touch the switch until the blind is in a steady position.

@syntesys87
Copy link
Author

Yes, no problem, I will send the new file tomorrow, so that attributes could be populated.
In the video, I start from the upper position, but when I click the down button, happens red led and exit from calibration.

@philippk75
Copy link

hello, with my bticino N4027C the poistion control works, i calibrated it with specific calibration automatic mode, also different percentsges of positions work.

@syntesys87
Copy link
Author

database.db.zip
Here attached new database.db.
@philippk75 what firmware are you running in your N4027C?

@philippk75
Copy link

database.db.zip Here attached new database.db. @philippk75 what firmware are you running in your N4027C?

Firmware-Date
20230406
Firmware-Version
0036

@syntesys87
Copy link
Author

The version is the same, mine switches has also 0036 firmware. Do you have blinds with tilt or lift only? Could the problem be related to that?

@syntesys87
Copy link
Author

@FabianMangold yes, this issue could be closed!
I have not reproduced led problem on my hardware 13 switch, but in all the other hardware 9 switches.
Thank you for the support, you are great!

@FabianMangold
Copy link
Contributor

My pleasure @syntesys87, happy to help if i can.
It's odd, if seems that the issue is somehow linked to the hardware ID. Users in the thread i mentioned above report exactly this issue. It might be worth reaching out to Legrand via their forum and ask for some guidance there.
Can you please mark this issue as solved, since you are the one that has opened it ?
Cheers

@syntesys87
Copy link
Author

@FabianMangold yes, it's very strange... As it's strange that there are multiple hardware IDs for the same component... There isn't any parameter or code that is useful to identify che switch. Here #16948 (comment) you can find the procedure to workaround the blinking green led problem.

Thank you for your effort!

@r0bb10
Copy link

r0bb10 commented Nov 14, 2023

I finally managed to get my 7x K4027C working (firmware 36) using the method posted here and get rid of the stupid K4510C Gateway.

It was really a pain to fix the green flashing light because in this mode it's not fully paired and the calibration procedure cannot be started.. the first 2 K4027C paired fine but the others was fail&repeat a lot.. eventually fixed and got the purple light on all of them (fully paired) and then the calibration procedure can be started (up+down button for 5 sec).

@andreapx
Copy link

I finally managed to get my 7x K4027C working (firmware 36) using the method posted here and get rid of the stupid K4510C Gateway.

@r0bb10 How did you update the bTicino devices? I keep getting the error Device didn't respond to OTA request
I was able to update a couple of K4027C and those I was able to fully pair, but I can't fully pair the other with older firmware.

@r0bb10
Copy link

r0bb10 commented Nov 19, 2023

I finally managed to get my 7x K4027C working (firmware 36) using the method posted here and get rid of the stupid K4510C Gateway.

@r0bb10 How did you update the bTicino devices? I keep getting the error Device didn't respond to OTA request I was able to update a couple of K4027C and those I was able to fully pair, but I can't fully pair the other with older firmware.

i have a K4510C gateway and use it only to update the devices, never managed to ota update from z2m or zha.

@andreapx
Copy link

i have a K4510C gateway and use it only to update the devices, never managed to ota update from z2m or zha.

You've never tried with Z2M or you've tried and failed?

@r0bb10
Copy link

r0bb10 commented Nov 19, 2023

i have a K4510C gateway and use it only to update the devices, never managed to ota update from z2m or zha.

You've never tried with Z2M or you've tried and failed?

never tried.

@andreapx
Copy link

andreapx commented Nov 19, 2023

To update the devices with the gateway do you have to pair them all to it and then pair them back to Z2M?

@r0bb10
Copy link

r0bb10 commented Nov 19, 2023

To update the devices with the gateway do you have to pair them all to it and then pair them back to Z2M?

exactly, i had everything paired with the bticino gateway, some with new firmware some with older one, i left them all connected and they slowly updated to the latest available and then moved them to z2m (and then to zha).

@andreapx
Copy link

exactly, i had everything paired with the bticino gateway, some with new firmware some with older one, i left them all connected and they slowly updated to the latest available and then moved them to z2m (and then to zha).

Damn! I have about 70 devices, it's unthinkable!
Thanks for the feedback!

@andreapx
Copy link

To update the devices with the gateway do you have to pair them all to it and then pair them back to Z2M?

exactly, i had everything paired with the bticino gateway, some with new firmware some with older one, i left them all connected and they slowly updated to the latest available and then moved them to z2m (and then to zha).

@r0bb10 How did you update the firmware with the bTicino gateway? I've paired some roller shutter, I see that they have different firmware, but I can't find anywhere the option to update the firmware.

@r0bb10
Copy link

r0bb10 commented Nov 26, 2023

To update the devices with the gateway do you have to pair them all to it and then pair them back to Z2M?

exactly, i had everything paired with the bticino gateway, some with new firmware some with older one, i left them all connected and they slowly updated to the latest available and then moved them to z2m (and then to zha).

@r0bb10 How did you update the firmware with the bTicino gateway? I've paired some roller shutter, I see that they have different firmware, but I can't find anywhere the option to update the firmware.

as far as i know you cannot force the update, it's the gateway that handles the update for downstream devices periodically, once paired let them sit and they will update themselves over a period of time.

i know it's annoying but everything bticino (or legrand) does is annoying.

@andreapx
Copy link

To update the devices with the gateway do you have to pair them all to it and then pair them back to Z2M?

exactly, i had everything paired with the bticino gateway, some with new firmware some with older one, i left them all connected and they slowly updated to the latest available and then moved them to z2m (and then to zha).

@r0bb10 How did you update the firmware with the bTicino gateway? I've paired some roller shutter, I see that they have different firmware, but I can't find anywhere the option to update the firmware.

as far as i know you cannot force the update, it's the gateway that handles the update for downstream devices periodically, once paired let them sit and they will update themselves over a period of time.

i know it's annoying but everything bticino (or legrand) does is annoying.

Damn, really? They are VERY annoying!
I hoped that I could pair 2/3 at a time, update them and then pair them back to Z2M, but it seems that it will take a long while if I can't force the updates.
Thanks for the info!

@andreapx
Copy link

andreapx commented Dec 2, 2023

@r0bb10 Do you remember about how long did they take to update? For me it's been a week but none of the 3 got updated.

@r0bb10
Copy link

r0bb10 commented Dec 2, 2023

@r0bb10 Do you remember about how long did they take to update? For me it's been a week but none of the 3 got updated.

it's variable, some of the K4411C and K4027C i have got updated almost immediatelly, other K4027C and some K4531C where so slow i dont even remember how much it took, but long.

bticino always amazing.

@r0bb10
Copy link

r0bb10 commented Jan 6, 2024

@andreapx did you manage to update and pair them correctly? does everything work?

@andreapx
Copy link

andreapx commented Jan 6, 2024

@r0bb10 no, unfortunately they are not updating

@philippk75
Copy link

i also have problems with updating, some work, other don‘t work

@syntesys87
Copy link
Author

I opened the issue #20221 3 weeks ago, indicating logs and problem.

@r0bb10
Copy link

r0bb10 commented Apr 15, 2024

@r0bb10 no, unfortunately they are not updating

@andreapx so i finally moved away from zha and switched the whole zigbee network to z2m, works way way better (binding and positions).. after the migration i tested the ota function in z2m and all bticino devices had an update that worked pretty much immediately.

k4027c + k4027cwi + k4531c + k4003c and even fc80gcs were updated ota.

image

@andreapx
Copy link

@r0bb10 no, unfortunately they are not updating

@andreapx so i finally moved away from zha and switched the whole zigbee network to z2m, works way way better (binding and positions).. after the migration i tested the ota function in z2m and all bticino devices had an update that worked pretty much immediately.

k4027c + k4027cwi + k4531c + k4003c and even fc80gcs were updated ota.

Damn! Mine still don't want to update, I still get failed (OTA: Device didn't respond to OTA request).
Do you remember the version before the OTA? Mine are:

  • 001c
  • 002c
  • 003c
  • 003e
  • 0036

Thanks!

@dadino
Copy link

dadino commented Apr 15, 2024

@r0bb10 no, unfortunately they are not updating

@andreapx so i finally moved away from zha and switched the whole zigbee network to z2m, works way way better (binding and positions).. after the migration i tested the ota function in z2m and all bticino devices had an update that worked pretty much immediately.
k4027c + k4027cwi + k4531c + k4003c and even fc80gcs were updated ota.

Damn! Mine still don't want to update, I still get failed (OTA: Device didn't respond to OTA request). Do you remember the version before the OTA? Mine are:

  • 001c
  • 002c
  • 003c
  • 003e
  • 0036

Thanks!

I've got a [K4003C/L4003C/N4003C/NT4003C] at firmware version 001c that doesn't want to update. I had to update all the others via the BTicino hub, it took 4 days.

@andreapx
Copy link

Let's hope that the problem is the old firmware.
Do you get a correct position ant tilt?

@dadino
Copy link

dadino commented Apr 15, 2024

Let's hope that the problem is the old firmware. Do you get a correct position ant tilt?

No not at all, I've tried even with the original hub. I think there is a problem with the motor.

@r0bb10
Copy link

r0bb10 commented Apr 15, 2024

@r0bb10 no, unfortunately they are not updating

@andreapx so i finally moved away from zha and switched the whole zigbee network to z2m, works way way better (binding and positions).. after the migration i tested the ota function in z2m and all bticino devices had an update that worked pretty much immediately.
k4027c + k4027cwi + k4531c + k4003c and even fc80gcs were updated ota.

Damn! Mine still don't want to update, I still get failed (OTA: Device didn't respond to OTA request). Do you remember the version before the OTA? Mine are:

  • 001c
  • 002c
  • 003c
  • 003e
  • 0036

Thanks!

they were all firmware 0036, build date did not change but version jumped to 0053.. (i had the k4003c acting wierd with the ota respond request but eventually it also updated after several tries).

using the method described (the double pair) allows to calibrate them, and position works.

image

image

z2m exposes position AND tilt, and i dont want the entities to have tilt so i had to filter the devices in homeassistant:

image

@philippk75
Copy link

hello,

i also don't want the tilt funktion, it doesn't work for me. to filter this i have to make this customize_glob.yaml?

can i insert the text above?

Best regards

@FabianMangold
Copy link
Contributor

FabianMangold commented Apr 19, 2024

Hello,
I've just submitted PR#7412 to disable the tilt control.
By default, the tilt control will be displayed.

Hope this helps!
Cheers

grafik

@developerGM
Copy link

I have solved the problem abount position:

  1. restart zigbee2mqtt integration
  2. during restart, hold press on cover reset button...wait red light and than release button
  3. wait 2seconds and than click (1 tap) on cover reset button again...now you can see the green light flashing
  4. when zigbee2mqtt finish restart the green led will stop flashing and you can listen a little sound
  5. configuration now is completed
  6. than, to calibrate cover, press up and down buttons in the same time for about 5 seconds...when you see a yellow led flashing, release the buttons and wait about 5minutes...the cover will start to calibrate automatically

with these steps solve the problem

I have another problem...when I use the card to show cover position, I haven't a refresh of the state...I need to refresh state position forcing click on refresh button...why??

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

7 participants