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

ATTRIBUTE_FLAG_NONVOLATILE not really working. (CON-1219) #980

Closed
ronny-antoon opened this issue Jun 19, 2024 · 6 comments
Closed

ATTRIBUTE_FLAG_NONVOLATILE not really working. (CON-1219) #980

ronny-antoon opened this issue Jun 19, 2024 · 6 comments

Comments

@ronny-antoon
Copy link

Describe the bug
Iam trying to make the Window Device [Endpoint] store the current percentage in NVS,
My goal: After rebooting the device the current percentage should be as last known value if exist or 0.

by default the esp_matter window endpoint is adding this flag esp_matter::attribute_flags::ATTRIBUTE_FLAG_NONVOLATILE. so it should work as it is. Look at this Attribute creation.

when rebooting the esp32 this attributes goes 0 and not last known value from NVS.

What is the walk around to achieve this goal.?

Environment

  • ESP-Matter Commit Id: esp-idf registry 0.0.2
  • ESP-IDF Commit Id: v5.1.2
  • SoC (eg: ESP32 or ESP32-C3): ESP32
  • Apple Homepod mini version 17.5 , Apple iphone 13 version 17.5
@github-actions github-actions bot changed the title ATTRIBUTE_FLAG_NONVOLATILE not really working. ATTRIBUTE_FLAG_NONVOLATILE not really working. (CON-1219) Jun 19, 2024
@jadhavrohit924
Copy link
Contributor

@ronny-antoon CurrentPositionLiftPercentage is getting restored after reboot. I have tested with chip-tool. You might be looking for wrong attribute here? In Apple home TargetPositionLiftPercent100ths is reflecting in the UI and this attribute is volatile that why device is reseting the value to 0

@ronny-antoon
Copy link
Author

@ronny-antoon CurrentPositionLiftPercentage is getting restored after reboot. I have tested with chip-tool. You might be looking for wrong attribute here? In Apple home TargetPositionLiftPercent100ths is reflecting in the UI and this attribute is volatile that why device is reseting the value to 0

So you think if i change the 'TargetPositionLiftPercent100ths' to non volatile it should work in apple homekit?

@jadhavrohit924
Copy link
Contributor

Yes, but TargetPositionLiftPercent100ths is volatile defined by matter spec. So you should not change the quality of attribute.

@ronny-antoon
Copy link
Author

Yes, but TargetPositionLiftPercent100ths is volatile defined by matter spec. So you should not change the quality of attribute.

Okay, so what i can do to work around my problem.
Issue this in apple.!?

Or i can add after all the initialization

Change the attribute value of TargetPositionLiftPercent100ths to the attribute value of CurrentPositionLiftPercentage

?

@jadhavrohit924
Copy link
Contributor

Change the attribute value of TargetPositionLiftPercent100ths to the attribute value of CurrentPositionLiftPercentage?

You can definitely do that.

@ronny-antoon
Copy link
Author

Change the attribute value of TargetPositionLiftPercent100ths to the attribute value of CurrentPositionLiftPercentage?

You can definitely do that.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants